Skip to content

Commit

Permalink
Drop support for Node 6 and 11. (#61)
Browse files Browse the repository at this point in the history
Drop support for Node 6 and 11.
  • Loading branch information
rwjblue authored Jun 17, 2019
2 parents ba4abd8 + b886a82 commit ac63297
Show file tree
Hide file tree
Showing 6 changed files with 2,234 additions and 1,934 deletions.
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
language: node_js
node_js:
- "10"
- "12"

sudo: false
dist: trusty
Expand Down Expand Up @@ -33,13 +33,13 @@ jobs:

- stage: additional tests
env: NAME=floating dependencies
install: yarn install --no-lockfile --non-interactive --ignore-engines
install: yarn install --no-lockfile --non-interactive
script: yarn test

- env: NAME=Node_6
node_js: "6"
- name: "Node 10"
node_js: "10"

- env: NAME=Node_8
- name: "Node 8"
node_js: "8"


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

install:
- yarn install --ignore-engines
- yarn install

script:
- yarn test
3 changes: 2 additions & 1 deletion commands/global/new.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ module.exports.handler = function handler(options) {
jest: pkg.devDependencies.jest,
coveralls: pkg.devDependencies.coveralls,
},
engines: pkg.engines,
jest: {
testEnvironment: 'node',
},
Expand All @@ -93,7 +94,7 @@ module.exports.handler = function handler(options) {
---
language: node_js
node_js:
- "6"
- "8"
sudo: false
dist: trusty
Expand Down
31 changes: 15 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,37 +34,36 @@
"test": "qunit tests/**/*-test.js"
},
"dependencies": {
"@babel/parser": "^7.3.2",
"@babel/parser": "^7.4.5",
"chalk": "^2.4.2",
"common-tags": "^1.8.0",
"execa": "^1.0.0",
"fs-extra": "^7.0.1",
"globby": "^9.0.0",
"import-cwd": "^2.1.0",
"fs-extra": "^8.0.1",
"globby": "^9.2.0",
"import-cwd": "^3.0.0",
"import-local": "^2.0.0",
"jscodeshift": "^0.6.3",
"pkg-up": "^2.0.0",
"recast": "^0.17.3",
"jscodeshift": "^0.6.4",
"pkg-up": "^3.1.0",
"recast": "^0.18.1",
"yargs": "^13.2.0"
},
"devDependencies": {
"broccoli-test-helper": "^2.0.0",
"co": "^4.6.0",
"coveralls": "^3.0.3",
"eslint": "^5.14.0",
"coveralls": "^3.0.4",
"eslint": "^5.16.0",
"eslint-config-prettier": "^4.0.0",
"eslint-plugin-node": "^8.0.1",
"eslint-plugin-prettier": "^3.0.1",
"jest": "^24.1.0",
"eslint-plugin-node": "^9.1.0",
"eslint-plugin-prettier": "^3.1.0",
"jest": "^24.8.0",
"prettier": "^1.16.4",
"qunit": "^2.9.1",
"release-it": "^12.2.1",
"qunit": "^2.9.2",
"release-it": "^12.3.0",
"release-it-lerna-changelog": "^1.0.3",
"require-so-slow": "^1.2.0",
"walk-sync": "^1.1.3"
},
"engines": {
"node": "6.* || 8.* || >= 10"
"node": "8.* || 10.* || >= 12"
},
"publishConfig": {
"registry": "https://registry.npmjs.org"
Expand Down
37 changes: 18 additions & 19 deletions src/bin-support.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

function runTransform(binRoot, transformName, args) {
async function runTransform(binRoot, transformName, args) {
const globby = require('globby');
const execa = require('execa');
const chalk = require('chalk');
Expand All @@ -9,27 +9,26 @@ function runTransform(binRoot, transformName, args) {

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

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

let jscodeshiftPkg = require('jscodeshift/package');
let jscodeshiftPath = path.dirname(require.resolve('jscodeshift/package'));
let binPath = path.join(jscodeshiftPath, jscodeshiftPkg.bin.jscodeshift);
let jscodeshiftPkg = require('jscodeshift/package');
let jscodeshiftPath = path.dirname(require.resolve('jscodeshift/package'));
let binPath = path.join(jscodeshiftPath, jscodeshiftPkg.bin.jscodeshift);

return execa(binPath, ['-t', transformPath, '--extensions', 'js,ts', ...paths], {
stdio: 'inherit',
env: {
CODEMOD_CLI_ARGS: JSON.stringify(options),
},
});
})
.catch(error => {
console.error(chalk.red(error.stack)); // eslint-disable-line no-console
process.exitCode = 1;

throw error;
return execa(binPath, ['-t', transformPath, '--extensions', 'js,ts', ...foundPaths], {
stdio: 'inherit',
env: {
CODEMOD_CLI_ARGS: JSON.stringify(options),
},
});
} catch (error) {
console.error(chalk.red(error.stack)); // eslint-disable-line no-console
process.exitCode = 1;

throw error;
}
}

module.exports = {
Expand Down
Loading

0 comments on commit ac63297

Please sign in to comment.