Skip to content

Commit cd635d4

Browse files
committedNov 5, 2018
Require Node.js 8
1 parent 2bcfee7 commit cd635d4

File tree

2 files changed

+17
-12
lines changed

2 files changed

+17
-12
lines changed
 

‎index.js

+12-7
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ module.exports = (helpMessage, options) => {
2020
helpMessage = '';
2121
}
2222

23-
options = Object.assign({
23+
options = {
2424
pkg: readPkgUp.sync({
2525
cwd: parentDir,
2626
normalize: false
@@ -32,8 +32,9 @@ module.exports = (helpMessage, options) => {
3232
autoHelp: true,
3333
autoVersion: true,
3434
booleanDefault: false,
35-
hardRejection: true
36-
}, options);
35+
hardRejection: true,
36+
...options
37+
};
3738

3839
if (options.hardRejection) {
3940
hardRejection();
@@ -50,9 +51,10 @@ module.exports = (helpMessage, options) => {
5051
options.flags
5152
) : options.flags;
5253

53-
let minimistoptions = Object.assign({
54-
arguments: options.input
55-
}, minimistFlags);
54+
let minimistoptions = {
55+
arguments: options.input,
56+
...minimistFlags
57+
};
5658

5759
minimistoptions = decamelizeKeys(minimistoptions, '-', {exclude: ['stopEarly', '--']});
5860

@@ -63,7 +65,10 @@ module.exports = (helpMessage, options) => {
6365
minimistoptions = buildMinimistOptions(minimistoptions);
6466

6567
if (minimistoptions['--']) {
66-
minimistoptions.configuration = Object.assign({}, minimistoptions.configuration, {'populate--': true});
68+
minimistoptions.configuration = {
69+
...minimistoptions.configuration,
70+
'populate--': true
71+
};
6772
}
6873

6974
const {pkg} = options;

‎package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"url": "sindresorhus.com"
1111
},
1212
"engines": {
13-
"node": ">=6"
13+
"node": ">=8"
1414
},
1515
"scripts": {
1616
"test": "xo && ava"
@@ -38,19 +38,19 @@
3838
"console"
3939
],
4040
"dependencies": {
41-
"camelcase-keys": "^4.0.0",
41+
"camelcase-keys": "^5.0.0",
4242
"decamelize-keys": "^1.0.0",
4343
"hard-rejection": "^1.0.0",
4444
"minimist-options": "^3.0.1",
4545
"normalize-package-data": "^2.3.4",
46-
"read-pkg-up": "^3.0.0",
46+
"read-pkg-up": "^4.0.0",
4747
"redent": "^2.0.0",
4848
"trim-newlines": "^2.0.0",
49-
"yargs-parser": "^10.0.0"
49+
"yargs-parser": "^11.0.0"
5050
},
5151
"devDependencies": {
5252
"ava": "^0.25.0",
53-
"execa": "^0.10.0",
53+
"execa": "^1.0.0",
5454
"indent-string": "^3.0.0",
5555
"xo": "^0.23.0"
5656
},

0 commit comments

Comments
 (0)
Please sign in to comment.