[Pkg-javascript-commits] [node-strip-ansi] 01/03: New upstream version 4.0.0

Paolo Greppi paolog-guest at moszumanska.debian.org
Tue Sep 19 10:10:40 UTC 2017


This is an automated email from the git hooks/post-receive script.

paolog-guest pushed a commit to branch master
in repository node-strip-ansi.

commit 106adbb35517fd0a32e4ea809de08d41955a31e7
Author: Paolo Greppi <paolo.greppi at libpf.com>
Date:   Tue Sep 19 09:19:56 2017 +0200

    New upstream version 4.0.0
---
 .editorconfig  |  5 +----
 .gitattributes |  1 +
 .travis.yml    |  7 +++----
 index.js       |  6 ++----
 license        | 20 ++++----------------
 package.json   | 11 +++--------
 readme.md      | 18 ++++++++++++------
 test.js        |  8 ++++----
 8 files changed, 30 insertions(+), 46 deletions(-)

diff --git a/.editorconfig b/.editorconfig
index 8f9d77e..1c6314a 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -7,9 +7,6 @@ charset = utf-8
 trim_trailing_whitespace = true
 insert_final_newline = true
 
-[{package.json,*.yml}]
+[*.yml]
 indent_style = space
 indent_size = 2
-
-[*.md]
-trim_trailing_whitespace = false
diff --git a/.gitattributes b/.gitattributes
index 176a458..391f0a4 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1 +1,2 @@
 * text=auto
+*.js text eol=lf
diff --git a/.travis.yml b/.travis.yml
index dedfc07..7d69d74 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,6 +1,5 @@
-sudo: false
 language: node_js
 node_js:
-  - 'iojs'
-  - '0.12'
-  - '0.10'
+  - '8'
+  - '6'
+  - '4'
diff --git a/index.js b/index.js
index 099480f..96e0292 100644
--- a/index.js
+++ b/index.js
@@ -1,6 +1,4 @@
 'use strict';
-var ansiRegex = require('ansi-regex')();
+const ansiRegex = require('ansi-regex');
 
-module.exports = function (str) {
-	return typeof str === 'string' ? str.replace(ansiRegex, '') : str;
-};
+module.exports = input => typeof input === 'string' ? input.replace(ansiRegex(), '') : input;
diff --git a/license b/license
index 654d0bf..e7af2f7 100644
--- a/license
+++ b/license
@@ -1,21 +1,9 @@
-The MIT License (MIT)
+MIT License
 
 Copyright (c) Sindre Sorhus <sindresorhus at gmail.com> (sindresorhus.com)
 
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
 
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/package.json b/package.json
index 301685b..555f194 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "strip-ansi",
-  "version": "3.0.1",
+  "version": "4.0.0",
   "description": "Strip ANSI escape codes",
   "license": "MIT",
   "repository": "chalk/strip-ansi",
@@ -9,13 +9,8 @@
     "email": "sindresorhus at gmail.com",
     "url": "sindresorhus.com"
   },
-  "maintainers": [
-    "Sindre Sorhus <sindresorhus at gmail.com> (sindresorhus.com)",
-    "Joshua Boy Nicolai Appelman <joshua at jbna.nl> (jbna.nl)",
-    "JD Ballard <i.am.qix at gmail.com> (github.com/qix-)"
-  ],
   "engines": {
-    "node": ">=0.10.0"
+    "node": ">=4"
   },
   "scripts": {
     "test": "xo && ava"
@@ -48,7 +43,7 @@
     "text"
   ],
   "dependencies": {
-    "ansi-regex": "^2.0.0"
+    "ansi-regex": "^3.0.0"
   },
   "devDependencies": {
     "ava": "*",
diff --git a/readme.md b/readme.md
index cb7d9ff..dc76f0c 100644
--- a/readme.md
+++ b/readme.md
@@ -1,22 +1,22 @@
 # strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi)
 
-> Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)
+> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code)
 
 
 ## Install
 
 ```
-$ npm install --save strip-ansi
+$ npm install strip-ansi
 ```
 
 
 ## Usage
 
 ```js
-var stripAnsi = require('strip-ansi');
+const stripAnsi = require('strip-ansi');
 
-stripAnsi('\u001b[4mcake\u001b[0m');
-//=> 'cake'
+stripAnsi('\u001B[4mUnicorn\u001B[0m');
+//=> 'Unicorn'
 ```
 
 
@@ -28,6 +28,12 @@ stripAnsi('\u001b[4mcake\u001b[0m');
 - [chalk](https://github.com/chalk/chalk) - Terminal string styling done right
 
 
+## Maintainers
+
+- [Sindre Sorhus](https://github.com/sindresorhus)
+- [Josh Junon](https://github.com/qix-)
+
+
 ## License
 
-MIT © [Sindre Sorhus](http://sindresorhus.com)
+MIT
diff --git a/test.js b/test.js
index 13e15da..b613c91 100644
--- a/test.js
+++ b/test.js
@@ -1,13 +1,13 @@
 import test from 'ava';
-import fn from './';
+import m from '.';
 
 test('strip color from string', t => {
-	t.is(fn('\u001b[0m\u001b[4m\u001b[42m\u001b[31mfoo\u001b[39m\u001b[49m\u001b[24mfoo\u001b[0m'), 'foofoo');
+	t.is(m('\u001B[0m\u001B[4m\u001B[42m\u001B[31mfoo\u001B[39m\u001B[49m\u001B[24mfoo\u001B[0m'), 'foofoo');
 });
 
 test('strip color from ls command', t => {
-	t.is(fn('\u001b[00;38;5;244m\u001b[m\u001b[00;38;5;33mfoo\u001b[0m'), 'foo');
+	t.is(m('\u001B[00;38;5;244m\u001B[m\u001B[00;38;5;33mfoo\u001B[0m'), 'foo');
 });
 test('strip reset;setfg;setbg;italics;strike;underline sequence from string', t => {
-	t.is(fn('\x1b[0;33;49;3;9;4mbar\x1b[0m'), 'bar');
+	t.is(m('\u001B[0;33;49;3;9;4mbar\u001B[0m'), 'bar');
 });

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-strip-ansi.git



More information about the Pkg-javascript-commits mailing list