Skip to content

Commit 6a25566

Browse files
committed
Require Node.js 6 and upgrade dependencies
1 parent e8d149c commit 6a25566

File tree

6 files changed

+58
-57
lines changed

6 files changed

+58
-57
lines changed

.gitattributes

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
* text=auto
2-
*.js text eol=lf
1+
* text=auto eol=lf

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
node_modules
2+
yarn.lock

.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock=false

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
language: node_js
22
node_js:
3+
- '10'
34
- '8'
45
- '6'
5-
- '4'

package.json

+50-50
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,52 @@
11
{
2-
"name": "strip-ansi",
3-
"version": "4.0.0",
4-
"description": "Strip ANSI escape codes",
5-
"license": "MIT",
6-
"repository": "chalk/strip-ansi",
7-
"author": {
8-
"name": "Sindre Sorhus",
9-
"email": "[email protected]",
10-
"url": "sindresorhus.com"
11-
},
12-
"engines": {
13-
"node": ">=4"
14-
},
15-
"scripts": {
16-
"test": "xo && ava"
17-
},
18-
"files": [
19-
"index.js"
20-
],
21-
"keywords": [
22-
"strip",
23-
"trim",
24-
"remove",
25-
"ansi",
26-
"styles",
27-
"color",
28-
"colour",
29-
"colors",
30-
"terminal",
31-
"console",
32-
"string",
33-
"tty",
34-
"escape",
35-
"formatting",
36-
"rgb",
37-
"256",
38-
"shell",
39-
"xterm",
40-
"log",
41-
"logging",
42-
"command-line",
43-
"text"
44-
],
45-
"dependencies": {
46-
"ansi-regex": "^3.0.0"
47-
},
48-
"devDependencies": {
49-
"ava": "*",
50-
"xo": "*"
51-
}
2+
"name": "strip-ansi",
3+
"version": "4.0.0",
4+
"description": "Strip ANSI escape codes",
5+
"license": "MIT",
6+
"repository": "chalk/strip-ansi",
7+
"author": {
8+
"name": "Sindre Sorhus",
9+
"email": "[email protected]",
10+
"url": "sindresorhus.com"
11+
},
12+
"engines": {
13+
"node": ">=6"
14+
},
15+
"scripts": {
16+
"test": "xo && ava"
17+
},
18+
"files": [
19+
"index.js"
20+
],
21+
"keywords": [
22+
"strip",
23+
"trim",
24+
"remove",
25+
"ansi",
26+
"styles",
27+
"color",
28+
"colour",
29+
"colors",
30+
"terminal",
31+
"console",
32+
"string",
33+
"tty",
34+
"escape",
35+
"formatting",
36+
"rgb",
37+
"256",
38+
"shell",
39+
"xterm",
40+
"log",
41+
"logging",
42+
"command-line",
43+
"text"
44+
],
45+
"dependencies": {
46+
"ansi-regex": "^4.0.0"
47+
},
48+
"devDependencies": {
49+
"ava": "^0.25.0",
50+
"xo": "^0.23.0"
51+
}
5252
}

test.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import test from 'ava';
2-
import m from '.';
2+
import stripAnsi from '.';
33

44
test('strip color from string', t => {
5-
t.is(m('\u001B[0m\u001B[4m\u001B[42m\u001B[31mfoo\u001B[39m\u001B[49m\u001B[24mfoo\u001B[0m'), 'foofoo');
5+
t.is(stripAnsi('\u001B[0m\u001B[4m\u001B[42m\u001B[31mfoo\u001B[39m\u001B[49m\u001B[24mfoo\u001B[0m'), 'foofoo');
66
});
77

88
test('strip color from ls command', t => {
9-
t.is(m('\u001B[00;38;5;244m\u001B[m\u001B[00;38;5;33mfoo\u001B[0m'), 'foo');
9+
t.is(stripAnsi('\u001B[00;38;5;244m\u001B[m\u001B[00;38;5;33mfoo\u001B[0m'), 'foo');
1010
});
1111

1212
test('strip reset;setfg;setbg;italics;strike;underline sequence from string', t => {
13-
t.is(m('\u001B[0;33;49;3;9;4mbar\u001B[0m'), 'bar');
13+
t.is(stripAnsi('\u001B[0;33;49;3;9;4mbar\u001B[0m'), 'bar');
1414
});

0 commit comments

Comments
 (0)