Skip to content

Commit a8824fc

Browse files
committedFeb 19, 2020
Update
1 parent 8899e0a commit a8824fc

File tree

9 files changed

+5120
-3882
lines changed

9 files changed

+5120
-3882
lines changed
 

‎.travis.yml

+23-21
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,35 @@
1+
---
12
branches:
23
only:
3-
- master
4-
- develop
5-
- "/^greenkeeper/.*$/"
6-
- "/^feature/.*$/"
4+
- master
5+
- develop
6+
- /^greenkeeper/.*$/
7+
- /^feature/.*$/
78
language: node_js
89
node_js:
9-
- stable
10-
- 11
11-
- 10
12-
- 9
13-
- 8
10+
- stable
11+
- 12
12+
- 11
13+
- 10
1414
env:
1515
global:
16-
- CC_TEST_REPORTER_ID=71353381ba1b658ffa6a6525569e63a14976d3de21d7dfa9bf4c109d19983243
16+
- CC_TEST_REPORTER_ID=71353381ba1b658ffa6a6525569e63a14976d3de21d7dfa9bf4c109d19983243
1717
before_install:
18-
- "[[ $(node -v) =~ ^v12.*$ ]] || npm install -g npm@latest"
19-
- npm install -g greenkeeper-lockfile
20-
install: npm install
18+
- npm i -g npm
19+
- npm install -g greenkeeper-lockfile
20+
install: npm ci --no-optional
2121
before_script:
22-
- greenkeeper-lockfile-update
23-
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64
24-
> ./cc-test-reporter
25-
- chmod +x ./cc-test-reporter
26-
- "./cc-test-reporter before-build"
22+
- greenkeeper-lockfile-update
23+
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
24+
- chmod +x ./cc-test-reporter
25+
- "./cc-test-reporter before-build"
2726
after_script:
28-
- greenkeeper-lockfile-upload
29-
- "[ $TRAVIS_NODE_VERSION = stable ] && nyc report --reporter=lcov && ./cc-test-reporter
30-
after-build --debug -t lcov --exit-code $TRAVIS_TEST_RESULT || echo 'Coverage skipped'"
27+
- greenkeeper-lockfile-upload
28+
- "[ $TRAVIS_NODE_VERSION = stable ] && nyc report --reporter=lcov && ./cc-test-reporter
29+
after-build --debug -t lcov --exit-code $TRAVIS_TEST_RESULT || echo 'Coverage skipped'"
3130
notifications:
3231
slack:
3332
secure: k8prVQTufAadnHw3WL31uoidomdKCxLd3Xoe2pJveKSkCWHJfvrEknkSY3tB99OxLqKG7VfD8946m6FuTg171s6K7Yzv6sDCJZCkxWaBWZ6xlPjyapkz+xzVQJpFhmuE6dxIOH8BvOkM+EqHxjhcJE5iUjwXyV9YxEPAO3AqQFtjz08Bh+6d4HI77iNpb8MkPiqzplcrG4TXHceBxV5mvjmatPAaZAsq9Yi/toj2oOmHYYjDWXtHEdfkOQNuuWZzlcuDtkpxhJGEp9Xh06AQWJOlvivLCwvDqyZbVZ7bZsep6TD8Tu7HgP3UiIEUxfM4/tcjo80wolSmMa8f0rCdSxbYBBEoy4UmLn68QCgFA5twUEOsY914wx4NvKvy+ZQapskqsGt/UawL8TQmRVdPKoCAqtUbrdR53DsX731RApvMxvpi0inESzS96uJgY6ZsJL+zOUDizGVPJ1M/QdHtQU4Bw5ZOEZJEy6YupcmNIdyFxkTi2942H7z/YUpuEY3fYN2kenYTNFe/fhTpFWlI1kvJwZOHh4/Q7QhhmdqxXRzhDBsgl5UYA1JcPekOUhw844eRS8sG3cVCsts275cdYV7czNQw40PU1dN//QpcJ67KM0VRMX1ewxlglFFTeOrsG7ssOFmAEC7ebeaognt9bdfyXI32BZ16DNm4Vd97vkU=
33+
cache:
34+
directories:
35+
- "$HOME/.npm"

‎bin/termng

+27-19
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const repository = {
3535
url: "https://github.com/thebespokepixel/term-ng.git"
3636
};
3737
const engines = {
38-
node: ">=8.0"
38+
node: ">=10.0"
3939
};
4040
const keywords = [
4141
"24bit",
@@ -51,7 +51,7 @@ const keywords = [
5151
];
5252
const author = "Mark Griffiths <mark@thebespokepixel.com> (http://thebespokepixel.com/)";
5353
const copyright = {
54-
year: "2019",
54+
year: "2020",
5555
owner: "The Bespoke Pixel"
5656
};
5757
const license = "MIT";
@@ -60,31 +60,32 @@ const bugs = {
6060
};
6161
const homepage = "https://github.com/thebespokepixel/term-ng#readme";
6262
const devDependencies = {
63-
"@babel/core": "^7.5.5",
64-
"@babel/preset-env": "^7.5.5",
65-
ava: "^2.2.0",
63+
"@ava/babel": "^1.0.1",
64+
"@babel/core": "^7.8.4",
65+
"@babel/preset-env": "^7.8.4",
66+
ava: "^3.3.0",
6667
"babel-plugin-lodash": "^3.3.4",
67-
"documentation-theme-bespoke": "^1.0.0",
68+
"documentation-theme-bespoke": "^1.1.2",
6869
gulp: "^4.0.2",
6970
"gulp-better-rollup": "^4.0.1",
7071
"gulp-chmod": "^3.0.0",
71-
"gulp-rename": "^1.3.0",
72+
"gulp-rename": "^2.0.0",
7273
"gulp-strip-comments": "^2.5.2",
73-
nyc: "^14.1.1",
74-
rollup: "^1.19.4",
74+
nyc: "^15.0.0",
75+
rollup: "^1.31.1",
7576
"rollup-plugin-babel": "^4.3.3",
76-
"rollup-plugin-commonjs": "^10.0.2",
77+
"rollup-plugin-commonjs": "^10.1.0",
7778
"rollup-plugin-json": "^4.0.0",
7879
"rollup-plugin-node-resolve": "^5.2.0",
79-
xo: "^0.24.0"
80+
xo: "^0.26.1"
8081
};
8182
const dependencies = {
82-
"@thebespokepixel/meta": "^1.0.4",
83+
"@thebespokepixel/meta": "^2.0.1",
8384
"read-pkg": "^5.2.0",
8485
trucolor: "^1.0.6",
8586
truwrap: "^1.0.5",
86-
"update-notifier": "^3.0.1",
87-
yargs: "^13.3.0"
87+
"update-notifier": "^4.1.0",
88+
yargs: "^15.1.0"
8889
};
8990
const xo = {
9091
semicolon: false,
@@ -97,6 +98,12 @@ const xo = {
9798
"src/docs/example.js"
9899
]
99100
};
101+
const ava = {
102+
babel: true,
103+
files: [
104+
"test/*.js"
105+
]
106+
};
100107
const badges = {
101108
github: "thebespokepixel",
102109
npm: "thebespokepixel",
@@ -176,12 +183,13 @@ var pkg = {
176183
devDependencies: devDependencies,
177184
dependencies: dependencies,
178185
xo: xo,
186+
ava: ava,
179187
badges: badges
180188
};
181189

182190
const itermSession = process.env.ITERM_SESSION_ID && process.env.ITERM_SESSION_ID.indexOf(':') > 0;
183-
const colorTermTruecolor = process.env.COLORTERM && process.env.COLORTERM.indexOf('truecolor') >= 0;
184-
const termColor16m = process.env.TERM_COLOR && process.env.TERM_COLOR.indexOf('16m') >= 0;
191+
const colorTermTruecolor = process.env.COLORTERM && process.env.COLORTERM.includes('truecolor');
192+
const termColor16m = process.env.TERM_COLOR && process.env.TERM_COLOR.includes('16m');
185193
const has16m = itermSession || colorTermTruecolor || termColor16m;
186194

187195
if (has16m && !/-color/.test(process.argv.join(''))) {
@@ -320,7 +328,7 @@ If user-agent is used, the command will return the string on stdout and exit sta
320328
321329
${clr.title}Usage:${clr.title.out}
322330
${clr.command}termng ${clr.option}[command]${clr.option.out}`;
323-
const epilogue = `${clr.title}© 2016 The Bespoke Pixel. ${clr.grey}Released under the MIT License.${clr.grey.out}`;
331+
const epilogue = `${clr.title}${metadata.copyright}. ${clr.grey}Released under the MIT License.${clr.grey.out}`;
324332

325333
if (!(process.env.USER === 'root' && process.env.SUDO_USER !== process.env.USER)) {
326334
updateNotifier({
@@ -332,7 +340,7 @@ if (argv.help) {
332340
renderer.write(usage);
333341
renderer.break(2);
334342
renderer.write(_yargs.getUsageInstance().help());
335-
renderer.break();
343+
renderer.break(2);
336344
renderer.write(epilogue);
337345
renderer.break(2);
338346
process.exit(0);
@@ -343,7 +351,7 @@ if (argv.version) {
343351
process.exit(0);
344352
}
345353

346-
if (argv._.indexOf('user-agent') !== -1) {
354+
if (argv._.includes('user-agent')) {
347355
process.stdout.write(termNG.software);
348356
process.exit(0);
349357
}

‎index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use strict';
22

33
const itermSession = process.env.ITERM_SESSION_ID && process.env.ITERM_SESSION_ID.indexOf(':') > 0;
4-
const colorTermTruecolor = process.env.COLORTERM && process.env.COLORTERM.indexOf('truecolor') >= 0;
5-
const termColor16m = process.env.TERM_COLOR && process.env.TERM_COLOR.indexOf('16m') >= 0;
4+
const colorTermTruecolor = process.env.COLORTERM && process.env.COLORTERM.includes('truecolor');
5+
const termColor16m = process.env.TERM_COLOR && process.env.TERM_COLOR.includes('16m');
66
const has16m = itermSession || colorTermTruecolor || termColor16m;
77

88
if (has16m && !/-color/.test(process.argv.join(''))) {

‎index.mjs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const itermSession = process.env.ITERM_SESSION_ID && process.env.ITERM_SESSION_ID.indexOf(':') > 0;
2-
const colorTermTruecolor = process.env.COLORTERM && process.env.COLORTERM.indexOf('truecolor') >= 0;
3-
const termColor16m = process.env.TERM_COLOR && process.env.TERM_COLOR.indexOf('16m') >= 0;
2+
const colorTermTruecolor = process.env.COLORTERM && process.env.COLORTERM.includes('truecolor');
3+
const termColor16m = process.env.TERM_COLOR && process.env.TERM_COLOR.includes('16m');
44
const has16m = itermSession || colorTermTruecolor || termColor16m;
55

66
if (has16m && !/-color/.test(process.argv.join(''))) {

‎package-lock.json

+5,037-3,816
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+22-15
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"url": "https://github.com/thebespokepixel/term-ng.git"
2626
},
2727
"engines": {
28-
"node": ">=8.0"
28+
"node": ">=10.0"
2929
},
3030
"keywords": [
3131
"24bit",
@@ -41,7 +41,7 @@
4141
],
4242
"author": "Mark Griffiths <mark@thebespokepixel.com> (http://thebespokepixel.com/)",
4343
"copyright": {
44-
"year": "2019",
44+
"year": "2020",
4545
"owner": "The Bespoke Pixel"
4646
},
4747
"license": "MIT",
@@ -50,31 +50,32 @@
5050
},
5151
"homepage": "https://github.com/thebespokepixel/term-ng#readme",
5252
"devDependencies": {
53-
"@babel/core": "^7.5.5",
54-
"@babel/preset-env": "^7.5.5",
55-
"ava": "^2.2.0",
53+
"@ava/babel": "^1.0.1",
54+
"@babel/core": "^7.8.4",
55+
"@babel/preset-env": "^7.8.4",
56+
"ava": "^3.3.0",
5657
"babel-plugin-lodash": "^3.3.4",
57-
"documentation-theme-bespoke": "^1.0.0",
58+
"documentation-theme-bespoke": "^1.1.2",
5859
"gulp": "^4.0.2",
5960
"gulp-better-rollup": "^4.0.1",
6061
"gulp-chmod": "^3.0.0",
61-
"gulp-rename": "^1.3.0",
62+
"gulp-rename": "^2.0.0",
6263
"gulp-strip-comments": "^2.5.2",
63-
"nyc": "^14.1.1",
64-
"rollup": "^1.19.4",
64+
"nyc": "^15.0.0",
65+
"rollup": "^1.31.1",
6566
"rollup-plugin-babel": "^4.3.3",
66-
"rollup-plugin-commonjs": "^10.0.2",
67+
"rollup-plugin-commonjs": "^10.1.0",
6768
"rollup-plugin-json": "^4.0.0",
6869
"rollup-plugin-node-resolve": "^5.2.0",
69-
"xo": "^0.24.0"
70+
"xo": "^0.26.1"
7071
},
7172
"dependencies": {
72-
"@thebespokepixel/meta": "^1.0.4",
73+
"@thebespokepixel/meta": "^2.0.1",
7374
"read-pkg": "^5.2.0",
7475
"trucolor": "^1.0.6",
7576
"truwrap": "^1.0.5",
76-
"update-notifier": "^3.0.1",
77-
"yargs": "^13.3.0"
77+
"update-notifier": "^4.1.0",
78+
"yargs": "^15.1.0"
7879
},
7980
"xo": {
8081
"semicolon": false,
@@ -87,6 +88,12 @@
8788
"src/docs/example.js"
8889
]
8990
},
91+
"ava": {
92+
"babel": true,
93+
"files": [
94+
"test/*.js"
95+
]
96+
},
9097
"badges": {
9198
"github": "thebespokepixel",
9299
"npm": "thebespokepixel",
@@ -146,4 +153,4 @@
146153
]
147154
]
148155
}
149-
}
156+
}

‎src/cli.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {truwrap} from 'truwrap'
88
import yargs from 'yargs'
99
import meta from '@thebespokepixel/meta'
1010
import updateNotifier from 'update-notifier'
11-
import pkg from '../package'
11+
import pkg from '../package.json'
1212
import termNG from '.'
1313

1414
const clr = simple({format: 'sgr'})
@@ -62,7 +62,7 @@ If user-agent is used, the command will return the string on stdout and exit sta
6262
${clr.title}Usage:${clr.title.out}
6363
${clr.command}termng ${clr.option}[command]${clr.option.out}`
6464

65-
const epilogue = `${clr.title}© 2016 The Bespoke Pixel. ${clr.grey}Released under the MIT License.${clr.grey.out}`
65+
const epilogue = `${clr.title}${metadata.copyright}. ${clr.grey}Released under the MIT License.${clr.grey.out}`
6666

6767
if (!(process.env.USER === 'root' && process.env.SUDO_USER !== process.env.USER)) {
6868
updateNotifier({
@@ -74,7 +74,7 @@ if (argv.help) {
7474
renderer.write(usage)
7575
renderer.break(2)
7676
renderer.write(_yargs.getUsageInstance().help())
77-
renderer.break()
77+
renderer.break(2)
7878
renderer.write(epilogue)
7979
renderer.break(2)
8080
process.exit(0)
@@ -85,7 +85,7 @@ if (argv.version) {
8585
process.exit(0)
8686
}
8787

88-
if (argv._.indexOf('user-agent') !== -1) {
88+
if (argv._.includes('user-agent')) {
8989
process.stdout.write(termNG.software)
9090
process.exit(0)
9191
}

‎src/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
/* eslint complexity:0 */
55

66
const itermSession = process.env.ITERM_SESSION_ID && process.env.ITERM_SESSION_ID.indexOf(':') > 0
7-
const colorTermTruecolor = process.env.COLORTERM && (process.env.COLORTERM.indexOf('truecolor') >= 0)
8-
const termColor16m = process.env.TERM_COLOR && (process.env.TERM_COLOR.indexOf('16m') >= 0)
7+
const colorTermTruecolor = process.env.COLORTERM && process.env.COLORTERM.includes('truecolor')
8+
const termColor16m = process.env.TERM_COLOR && process.env.TERM_COLOR.includes('16m')
99

1010
const has16m = itermSession || colorTermTruecolor || termColor16m
1111

‎test/cli.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {exec} from 'child_process'
22
import test from 'ava'
3-
import pkg from '../package'
3+
import pkg from '../package.json'
44

55
const expectedVersion = pkg.version
66

0 commit comments

Comments
 (0)
Please sign in to comment.