Skip to content

Commit 55cf3bd

Browse files
committedFeb 20, 2020
Update
1 parent 25e4939 commit 55cf3bd

14 files changed

+5795
-3808
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=ba42fc27c58fe141f19793fa5acb42d4d229da491a4c7a1568ba50a69a009e1f
16+
- CC_TEST_REPORTER_ID=ba42fc27c58fe141f19793fa5acb42d4d229da491a4c7a1568ba50a69a009e1f
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: b30+M8/fYAvUaYwnjMRVgpf63V84HkaMHO6j/RSE8vCyPLF0kxJYlc1lsemGfR1czvEUxNz+IIvDhbdLdkeF7Fpdq2gLBa4MTEpBuzKGtwqC9Tup3u0hg1haNd0oGmMSextH4e2wvdaFXK+rIYebAYhNoP5qeW6OqtyqNVblL7I=
33+
cache:
34+
directories:
35+
- "$HOME/.npm"

‎bin/truwrap

+30-22
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const bugs = {
4343
url: "https://github.com/thebespokepixel/truwrap/issues"
4444
};
4545
const copyright = {
46-
year: "2019",
46+
year: "2020",
4747
owner: "The Bespoke Pixel"
4848
};
4949
const scripts = {
@@ -56,45 +56,46 @@ const scripts = {
5656
coverage: "nyc ava && nyc report --reporter=lcov --report-dir test/coverage; open test/coverage/lcov-report/index.html"
5757
};
5858
const devDependencies = {
59-
"@babel/core": "^7.5.5",
60-
"@babel/preset-env": "^7.5.5",
61-
ava: "^2.2.0",
59+
"@ava/babel": "^1.0.1",
60+
"@babel/core": "^7.8.4",
61+
"@babel/preset-env": "^7.8.4",
62+
ava: "^3.3.0",
6263
"babel-plugin-lodash": "^3.3.4",
63-
"documentation-theme-bespoke": "^1.0.0",
64+
"documentation-theme-bespoke": "^1.1.2",
6465
gulp: "^4.0.2",
6566
"gulp-better-rollup": "^4.0.1",
6667
"gulp-chmod": "^3.0.0",
67-
"gulp-rename": "^1.4.0",
68-
nyc: "^14.1.1",
69-
rollup: "^1.19.4",
68+
"gulp-rename": "^2.0.0",
69+
nyc: "^15.0.0",
70+
rollup: "^1.31.1",
7071
"rollup-plugin-babel": "^4.3.3",
71-
"rollup-plugin-commonjs": "^10.0.2",
72+
"rollup-plugin-commonjs": "^10.1.0",
7273
"rollup-plugin-json": "^4.0.0",
7374
"rollup-plugin-node-resolve": "^5.2.0",
74-
"semver-regex": "^3.1.0",
75-
xo: "^0.24.0"
75+
"semver-regex": "^3.1.1",
76+
xo: "^0.26.1"
7677
};
7778
const dependencies = {
78-
"@thebespokepixel/meta": "^1.0.4",
79-
"@thebespokepixel/n-selector": "^1.0.4",
80-
"@thebespokepixel/string": "^0.5.8",
81-
"ansi-regex": "^4.1.0",
79+
"@thebespokepixel/meta": "^2.0.1",
80+
"@thebespokepixel/n-selector": "^2.0.0",
81+
"@thebespokepixel/string": "^1.0.0",
82+
"ansi-regex": "^5.0.0",
8283
columnify: "^1.5.4",
8384
"common-tags": "^1.8.0",
8485
"deep-assign": "^3.0.0",
85-
"es6-promisify": "^6.0.1",
86+
"es6-promisify": "^6.0.2",
8687
"get-stdin": "^7.0.0",
8788
lodash: "^4.17.15",
8889
"os-locale": "^4.0.0",
89-
"read-pkg-up": "^6.0.0",
90-
"term-ng": "^1.0.4",
90+
"read-pkg-up": "^7.0.1",
91+
"term-ng": "^2.0.0",
9192
trucolor: "^1.0.6",
92-
"update-notifier": "^3.0.1",
93-
verbosity: "^1.1.2",
94-
yargs: "^13.3.0"
93+
"update-notifier": "^4.1.0",
94+
verbosity: "^2.0.0",
95+
yargs: "^15.1.0"
9596
};
9697
const engines = {
97-
node: ">=8.0"
98+
node: ">=10.0"
9899
};
99100
const homepage = "https://github.com/thebespokepixel/truwrap";
100101
const keywords = [
@@ -124,6 +125,12 @@ const xo = {
124125
"test/coverage/**"
125126
]
126127
};
128+
const ava = {
129+
babel: true,
130+
files: [
131+
"test/*.js"
132+
]
133+
};
127134
const badges = {
128135
github: "thebespokepixel",
129136
npm: "thebespokepixel",
@@ -203,6 +210,7 @@ var pkg = {
203210
license: license,
204211
repository: repository,
205212
xo: xo,
213+
ava: ava,
206214
badges: badges
207215
};
208216

‎package-lock.json

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

‎package.json

+30-23
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"url": "https://github.com/thebespokepixel/truwrap/issues"
1818
},
1919
"copyright": {
20-
"year": "2019",
20+
"year": "2020",
2121
"owner": "The Bespoke Pixel"
2222
},
2323
"scripts": {
@@ -30,45 +30,46 @@
3030
"coverage": "nyc ava && nyc report --reporter=lcov --report-dir test/coverage; open test/coverage/lcov-report/index.html"
3131
},
3232
"devDependencies": {
33-
"@babel/core": "^7.5.5",
34-
"@babel/preset-env": "^7.5.5",
35-
"ava": "^2.2.0",
33+
"@ava/babel": "^1.0.1",
34+
"@babel/core": "^7.8.4",
35+
"@babel/preset-env": "^7.8.4",
36+
"ava": "^3.3.0",
3637
"babel-plugin-lodash": "^3.3.4",
37-
"documentation-theme-bespoke": "^1.0.0",
38+
"documentation-theme-bespoke": "^1.1.2",
3839
"gulp": "^4.0.2",
3940
"gulp-better-rollup": "^4.0.1",
4041
"gulp-chmod": "^3.0.0",
41-
"gulp-rename": "^1.4.0",
42-
"nyc": "^14.1.1",
43-
"rollup": "^1.19.4",
42+
"gulp-rename": "^2.0.0",
43+
"nyc": "^15.0.0",
44+
"rollup": "^1.31.1",
4445
"rollup-plugin-babel": "^4.3.3",
45-
"rollup-plugin-commonjs": "^10.0.2",
46+
"rollup-plugin-commonjs": "^10.1.0",
4647
"rollup-plugin-json": "^4.0.0",
4748
"rollup-plugin-node-resolve": "^5.2.0",
48-
"semver-regex": "^3.1.0",
49-
"xo": "^0.24.0"
49+
"semver-regex": "^3.1.1",
50+
"xo": "^0.26.1"
5051
},
5152
"dependencies": {
52-
"@thebespokepixel/meta": "^1.0.4",
53-
"@thebespokepixel/n-selector": "^1.0.4",
54-
"@thebespokepixel/string": "^0.5.8",
55-
"ansi-regex": "^4.1.0",
53+
"@thebespokepixel/meta": "^2.0.1",
54+
"@thebespokepixel/n-selector": "^2.0.0",
55+
"@thebespokepixel/string": "^1.0.0",
56+
"ansi-regex": "^5.0.0",
5657
"columnify": "^1.5.4",
5758
"common-tags": "^1.8.0",
5859
"deep-assign": "^3.0.0",
59-
"es6-promisify": "^6.0.1",
60+
"es6-promisify": "^6.0.2",
6061
"get-stdin": "^7.0.0",
6162
"lodash": "^4.17.15",
6263
"os-locale": "^4.0.0",
63-
"read-pkg-up": "^6.0.0",
64-
"term-ng": "^1.0.4",
64+
"read-pkg-up": "^7.0.1",
65+
"term-ng": "^2.0.0",
6566
"trucolor": "^1.0.6",
66-
"update-notifier": "^3.0.1",
67-
"verbosity": "^1.1.2",
68-
"yargs": "^13.3.0"
67+
"update-notifier": "^4.1.0",
68+
"verbosity": "^2.0.0",
69+
"yargs": "^15.1.0"
6970
},
7071
"engines": {
71-
"node": ">=8.0"
72+
"node": ">=10.0"
7273
},
7374
"homepage": "https://github.com/thebespokepixel/truwrap",
7475
"keywords": [
@@ -98,6 +99,12 @@
9899
"test/coverage/**"
99100
]
100101
},
102+
"ava": {
103+
"babel": true,
104+
"files": [
105+
"test/*.js"
106+
]
107+
},
101108
"badges": {
102109
"github": "thebespokepixel",
103110
"npm": "thebespokepixel",
@@ -157,4 +164,4 @@
157164
]
158165
]
159166
}
160-
}
167+
}

‎src/cli/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import getStdin from 'get-stdin'
1010
import updateNotifier from 'update-notifier'
1111
import {stripIndent} from 'common-tags'
1212
import {box} from '@thebespokepixel/string'
13-
import pkg from '../../package'
13+
import pkg from '../../package.json'
1414
import {colorReplacer} from '../lib/colour'
1515
import help from './help'
1616
import {truwrap, console, metadata, parsePanel} from '..'

‎src/lib/classes/line-fitter.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint unicorn/prefer-trim-start-end:0,unicorn/prefer-string-slice:0 */
12
/* ─────────────────────╮
23
│ truwrap line fitting │
34
╰──────────────────────┴────────────────────────────────────────────────────── */

‎src/lib/classes/tokeniser.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint unicorn/prefer-trim-start-end:0 */
12
/* ──────────────────╮
23
│ truwrap tokeniser │ Handle the tokenisation of source text
34
╰───────────────────┴───────────────────────────────────────────────────────── */

‎test/cli-10.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import path from 'path'
22
import {readFileSync} from 'fs'
33
import {exec} from 'child_process'
44
import test from 'ava'
5-
import pkg from '../package'
5+
import pkg from '../package.json'
66

77
const expectedVersion = pkg.version
88

@@ -16,7 +16,7 @@ test.cb(`Module name/version is '${pkg.name} v${expectedVersion}'.`, t => {
1616

1717
const width = path.basename(__filename, '.js').split('-')[1] // 10, 20, 40, 60, 80, 100
1818

19-
if ([40, 60, 80, 100].indexOf(Number(width)) !== -1) {
19+
if ([40, 60, 80, 100].includes(Number(width))) {
2020
test.cb(`Panel: width = ${width} left = 0, right = 0`, t => {
2121
const fixture = readFileSync(`./test/fixtures/out/panel-${width}-0-0.txt`, 'utf8')
2222
exec(

‎test/cli-100.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import path from 'path'
22
import {readFileSync} from 'fs'
33
import {exec} from 'child_process'
44
import test from 'ava'
5-
import pkg from '../package'
5+
import pkg from '../package.json'
66

77
const expectedVersion = pkg.version
88

@@ -16,7 +16,7 @@ test.cb(`Module name/version is '${pkg.name} v${expectedVersion}'.`, t => {
1616

1717
const width = path.basename(__filename, '.js').split('-')[1] // 10, 20, 40, 60, 80, 100
1818

19-
if ([40, 60, 80, 100].indexOf(Number(width)) !== -1) {
19+
if ([40, 60, 80, 100].includes(Number(width))) {
2020
test.cb(`Panel: width = ${width} left = 0, right = 0`, t => {
2121
const fixture = readFileSync(`./test/fixtures/out/panel-${width}-0-0.txt`, 'utf8')
2222
exec(

‎test/cli-20.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import path from 'path'
22
import {readFileSync} from 'fs'
33
import {exec} from 'child_process'
44
import test from 'ava'
5-
import pkg from '../package'
5+
import pkg from '../package.json'
66

77
const expectedVersion = pkg.version
88

@@ -16,7 +16,7 @@ test.cb(`Module name/version is '${pkg.name} v${expectedVersion}'.`, t => {
1616

1717
const width = path.basename(__filename, '.js').split('-')[1] // 10, 20, 40, 60, 80, 100
1818

19-
if ([40, 60, 80, 100].indexOf(Number(width)) !== -1) {
19+
if ([40, 60, 80, 100].includes(Number(width))) {
2020
test.cb(`Panel: width = ${width} left = 0, right = 0`, t => {
2121
const fixture = readFileSync(`./test/fixtures/out/panel-${width}-0-0.txt`, 'utf8')
2222
exec(

‎test/cli-40.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import path from 'path'
22
import {readFileSync} from 'fs'
33
import {exec} from 'child_process'
44
import test from 'ava'
5-
import pkg from '../package'
5+
import pkg from '../package.json'
66

77
const expectedVersion = pkg.version
88

@@ -16,7 +16,7 @@ test.cb(`Module name/version is '${pkg.name} v${expectedVersion}'.`, t => {
1616

1717
const width = path.basename(__filename, '.js').split('-')[1] // 10, 20, 40, 60, 80, 100
1818

19-
if ([40, 60, 80, 100].indexOf(Number(width)) !== -1) {
19+
if ([40, 60, 80, 100].includes(Number(width))) {
2020
test.cb(`Panel: width = ${width} left = 0, right = 0`, t => {
2121
const fixture = readFileSync(`./test/fixtures/out/panel-${width}-0-0.txt`, 'utf8')
2222
exec(

‎test/cli-60.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import path from 'path'
22
import {readFileSync} from 'fs'
33
import {exec} from 'child_process'
44
import test from 'ava'
5-
import pkg from '../package'
5+
import pkg from '../package.json'
66

77
const expectedVersion = pkg.version
88

@@ -16,7 +16,7 @@ test.cb(`Module name/version is '${pkg.name} v${expectedVersion}'.`, t => {
1616

1717
const width = path.basename(__filename, '.js').split('-')[1] // 10, 20, 40, 60, 80, 100
1818

19-
if ([40, 60, 80, 100].indexOf(Number(width)) !== -1) {
19+
if ([40, 60, 80, 100].includes(Number(width))) {
2020
test.cb(`Panel: width = ${width} left = 0, right = 0`, t => {
2121
const fixture = readFileSync(`./test/fixtures/out/panel-${width}-0-0.txt`, 'utf8')
2222
exec(

‎test/cli-80.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import path from 'path'
22
import {readFileSync} from 'fs'
33
import {exec} from 'child_process'
44
import test from 'ava'
5-
import pkg from '../package'
5+
import pkg from '../package.json'
66

77
const expectedVersion = pkg.version
88

@@ -16,7 +16,7 @@ test.cb(`Module name/version is '${pkg.name} v${expectedVersion}'.`, t => {
1616

1717
const width = path.basename(__filename, '.js').split('-')[1] // 10, 20, 40, 60, 80, 100
1818

19-
if ([40, 60, 80, 100].indexOf(Number(width)) !== -1) {
19+
if ([40, 60, 80, 100].includes(Number(width))) {
2020
test.cb(`Panel: width = ${width} left = 0, right = 0`, t => {
2121
const fixture = readFileSync(`./test/fixtures/out/panel-${width}-0-0.txt`, 'utf8')
2222
exec(

‎test/module.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import stream from 'stream'
22
import test from 'ava'
33
import semverRegex from 'semver-regex'
4-
import pkg from '../package'
4+
import pkg from '../package.json'
55
import {truwrap, metadata} from '..'
66

77
const StreamProxy = new stream.PassThrough()

0 commit comments

Comments
 (0)
Please sign in to comment.