Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Require Node.js 8
  • Loading branch information
sindresorhus committed Nov 5, 2018
1 parent 2bcfee7 commit cd635d4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
19 changes: 12 additions & 7 deletions index.js
Expand Up @@ -20,7 +20,7 @@ module.exports = (helpMessage, options) => {
helpMessage = '';
}

options = Object.assign({
options = {
pkg: readPkgUp.sync({
cwd: parentDir,
normalize: false
Expand All @@ -32,8 +32,9 @@ module.exports = (helpMessage, options) => {
autoHelp: true,
autoVersion: true,
booleanDefault: false,
hardRejection: true
}, options);
hardRejection: true,
...options
};

if (options.hardRejection) {
hardRejection();
Expand All @@ -50,9 +51,10 @@ module.exports = (helpMessage, options) => {
options.flags
) : options.flags;

let minimistoptions = Object.assign({
arguments: options.input
}, minimistFlags);
let minimistoptions = {
arguments: options.input,
...minimistFlags
};

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

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

if (minimistoptions['--']) {
minimistoptions.configuration = Object.assign({}, minimistoptions.configuration, {'populate--': true});
minimistoptions.configuration = {
...minimistoptions.configuration,
'populate--': true
};
}

const {pkg} = options;
Expand Down
10 changes: 5 additions & 5 deletions package.json
Expand Up @@ -10,7 +10,7 @@
"url": "sindresorhus.com"
},
"engines": {
"node": ">=6"
"node": ">=8"
},
"scripts": {
"test": "xo && ava"
Expand Down Expand Up @@ -38,19 +38,19 @@
"console"
],
"dependencies": {
"camelcase-keys": "^4.0.0",
"camelcase-keys": "^5.0.0",
"decamelize-keys": "^1.0.0",
"hard-rejection": "^1.0.0",
"minimist-options": "^3.0.1",
"normalize-package-data": "^2.3.4",
"read-pkg-up": "^3.0.0",
"read-pkg-up": "^4.0.0",
"redent": "^2.0.0",
"trim-newlines": "^2.0.0",
"yargs-parser": "^10.0.0"
"yargs-parser": "^11.0.0"
},
"devDependencies": {
"ava": "^0.25.0",
"execa": "^0.10.0",
"execa": "^1.0.0",
"indent-string": "^3.0.0",
"xo": "^0.23.0"
},
Expand Down

0 comments on commit cd635d4

Please sign in to comment.