Skip to content

Commit ac63297

Browse files
author
Robert Jackson
authored
Drop support for Node 6 and 11. (#61)
Drop support for Node 6 and 11.
2 parents ba4abd8 + b886a82 commit ac63297

6 files changed

Lines changed: 2234 additions & 1934 deletions

File tree

.travis.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
language: node_js
33
node_js:
4-
- "10"
4+
- "12"
55

66
sudo: false
77
dist: trusty
@@ -33,13 +33,13 @@ jobs:
3333

3434
- stage: additional tests
3535
env: NAME=floating dependencies
36-
install: yarn install --no-lockfile --non-interactive --ignore-engines
36+
install: yarn install --no-lockfile --non-interactive
3737
script: yarn test
3838

39-
- env: NAME=Node_6
40-
node_js: "6"
39+
- name: "Node 10"
40+
node_js: "10"
4141

42-
- env: NAME=Node_8
42+
- name: "Node 8"
4343
node_js: "8"
4444

4545

@@ -48,7 +48,7 @@ before_install:
4848
- export PATH=$HOME/.yarn/bin:$PATH
4949

5050
install:
51-
- yarn install --ignore-engines
51+
- yarn install
5252

5353
script:
5454
- yarn test

commands/global/new.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ module.exports.handler = function handler(options) {
7979
jest: pkg.devDependencies.jest,
8080
coveralls: pkg.devDependencies.coveralls,
8181
},
82+
engines: pkg.engines,
8283
jest: {
8384
testEnvironment: 'node',
8485
},
@@ -93,7 +94,7 @@ module.exports.handler = function handler(options) {
9394
---
9495
language: node_js
9596
node_js:
96-
- "6"
97+
- "8"
9798
9899
sudo: false
99100
dist: trusty

package.json

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,37 +34,36 @@
3434
"test": "qunit tests/**/*-test.js"
3535
},
3636
"dependencies": {
37-
"@babel/parser": "^7.3.2",
37+
"@babel/parser": "^7.4.5",
3838
"chalk": "^2.4.2",
3939
"common-tags": "^1.8.0",
4040
"execa": "^1.0.0",
41-
"fs-extra": "^7.0.1",
42-
"globby": "^9.0.0",
43-
"import-cwd": "^2.1.0",
41+
"fs-extra": "^8.0.1",
42+
"globby": "^9.2.0",
43+
"import-cwd": "^3.0.0",
4444
"import-local": "^2.0.0",
45-
"jscodeshift": "^0.6.3",
46-
"pkg-up": "^2.0.0",
47-
"recast": "^0.17.3",
45+
"jscodeshift": "^0.6.4",
46+
"pkg-up": "^3.1.0",
47+
"recast": "^0.18.1",
4848
"yargs": "^13.2.0"
4949
},
5050
"devDependencies": {
5151
"broccoli-test-helper": "^2.0.0",
52-
"co": "^4.6.0",
53-
"coveralls": "^3.0.3",
54-
"eslint": "^5.14.0",
52+
"coveralls": "^3.0.4",
53+
"eslint": "^5.16.0",
5554
"eslint-config-prettier": "^4.0.0",
56-
"eslint-plugin-node": "^8.0.1",
57-
"eslint-plugin-prettier": "^3.0.1",
58-
"jest": "^24.1.0",
55+
"eslint-plugin-node": "^9.1.0",
56+
"eslint-plugin-prettier": "^3.1.0",
57+
"jest": "^24.8.0",
5958
"prettier": "^1.16.4",
60-
"qunit": "^2.9.1",
61-
"release-it": "^12.2.1",
59+
"qunit": "^2.9.2",
60+
"release-it": "^12.3.0",
6261
"release-it-lerna-changelog": "^1.0.3",
6362
"require-so-slow": "^1.2.0",
6463
"walk-sync": "^1.1.3"
6564
},
6665
"engines": {
67-
"node": "6.* || 8.* || >= 10"
66+
"node": "8.* || 10.* || >= 12"
6867
},
6968
"publishConfig": {
7069
"registry": "https://registry.npmjs.org"

src/bin-support.js

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
function runTransform(binRoot, transformName, args) {
3+
async function runTransform(binRoot, transformName, args) {
44
const globby = require('globby');
55
const execa = require('execa');
66
const chalk = require('chalk');
@@ -9,27 +9,26 @@ function runTransform(binRoot, transformName, args) {
99

1010
let { paths, options } = parseTransformArgs(args);
1111

12-
return globby(paths)
13-
.then(paths => {
14-
let transformPath = path.join(binRoot, '..', 'transforms', transformName, 'index.js');
12+
try {
13+
let foundPaths = await globby(paths);
14+
let transformPath = path.join(binRoot, '..', 'transforms', transformName, 'index.js');
1515

16-
let jscodeshiftPkg = require('jscodeshift/package');
17-
let jscodeshiftPath = path.dirname(require.resolve('jscodeshift/package'));
18-
let binPath = path.join(jscodeshiftPath, jscodeshiftPkg.bin.jscodeshift);
16+
let jscodeshiftPkg = require('jscodeshift/package');
17+
let jscodeshiftPath = path.dirname(require.resolve('jscodeshift/package'));
18+
let binPath = path.join(jscodeshiftPath, jscodeshiftPkg.bin.jscodeshift);
1919

20-
return execa(binPath, ['-t', transformPath, '--extensions', 'js,ts', ...paths], {
21-
stdio: 'inherit',
22-
env: {
23-
CODEMOD_CLI_ARGS: JSON.stringify(options),
24-
},
25-
});
26-
})
27-
.catch(error => {
28-
console.error(chalk.red(error.stack)); // eslint-disable-line no-console
29-
process.exitCode = 1;
30-
31-
throw error;
20+
return execa(binPath, ['-t', transformPath, '--extensions', 'js,ts', ...foundPaths], {
21+
stdio: 'inherit',
22+
env: {
23+
CODEMOD_CLI_ARGS: JSON.stringify(options),
24+
},
3225
});
26+
} catch (error) {
27+
console.error(chalk.red(error.stack)); // eslint-disable-line no-console
28+
process.exitCode = 1;
29+
30+
throw error;
31+
}
3332
}
3433

3534
module.exports = {

0 commit comments

Comments
 (0)