From cd635d4ed378035eac9d82edc1718716cd6bd95d Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Mon, 5 Nov 2018 16:31:41 +0700 Subject: [PATCH] Require Node.js 8 --- index.js | 19 ++++++++++++------- package.json | 10 +++++----- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/index.js b/index.js index 1da76c7..6945ad6 100644 --- a/index.js +++ b/index.js @@ -20,7 +20,7 @@ module.exports = (helpMessage, options) => { helpMessage = ''; } - options = Object.assign({ + options = { pkg: readPkgUp.sync({ cwd: parentDir, normalize: false @@ -32,8 +32,9 @@ module.exports = (helpMessage, options) => { autoHelp: true, autoVersion: true, booleanDefault: false, - hardRejection: true - }, options); + hardRejection: true, + ...options + }; if (options.hardRejection) { hardRejection(); @@ -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', '--']}); @@ -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; diff --git a/package.json b/package.json index f84a2cf..9e32c7b 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "url": "sindresorhus.com" }, "engines": { - "node": ">=6" + "node": ">=8" }, "scripts": { "test": "xo && ava" @@ -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" },