Skip to content

Commit 333fcea

Browse files
committed
feature(package) drop support of node < 8
1 parent f936def commit 333fcea

File tree

3 files changed

+17
-12
lines changed

3 files changed

+17
-12
lines changed

.eslintrc

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,16 @@
33
"node": true
44
},
55
"parserOptions": {
6-
"ecmaVersion": 6,
7-
"sourceType": "module"
6+
"ecmaVersion": 2018,
87
},
98
"rules": {
109
"indent": ["error", 4]
1110
},
12-
"extends": ["eslint:recommended"]
11+
"extends": [
12+
"eslint:recommended",
13+
"plugin:node/recommended"
14+
],
15+
"plugins": [
16+
"node"
17+
]
1318
}

lib/spawnify.js

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

33
const path = require('path');
4-
const EventEmitter = require('events').EventEmitter;
4+
const {EventEmitter} = require('events');
55
const util = require('util');
66
const assert = require('assert');
7-
const child_process = require('child_process');
7+
const {exec, spawn} = require('child_process');
88

9-
const exec = child_process.exec;
109
const tryCatch = require('try-catch');
1110
const tildify = require('tildify');
1211
const untildify = require('untildify');
1312

1413
const WIN = process.platform === 'win32';
15-
const spawn = child_process.spawn;
1614

1715
const find = require('glob');
1816
const win = require('win32');
@@ -33,9 +31,10 @@ module.exports = (command, options) => {
3331
const isCWD = options.cwd;
3432
const cwd = isCWD ? untildify(options.cwd) : process.cwd();
3533

36-
return new Spawnify(command, Object.assign({}, options, {
37-
cwd
38-
}));
34+
return new Spawnify(command, {
35+
...options,
36+
cwd,
37+
});
3938
};
4039

4140
function Spawnify(command, options) {

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"spawnify": "bin/spawnify.js"
1818
},
1919
"engines": {
20-
"node": ">=4.0.0"
20+
"node": ">=8.3.0"
2121
},
2222
"dependencies": {
2323
"glob": "^7.1.0",
@@ -27,6 +27,7 @@
2727
"win32": "^2.0.0"
2828
},
2929
"devDependencies": {
30-
"eslint": "^4.0.0"
30+
"eslint": "^4.0.0",
31+
"eslint-plugin-node": "^8.0.0"
3132
}
3233
}

0 commit comments

Comments
 (0)