From 8a4f1ad4159c2a73f23ee3257a4bb2978bb638ec Mon Sep 17 00:00:00 2001 From: xcatliu Date: Thu, 9 Mar 2017 11:08:38 +0800 Subject: [PATCH 001/108] Fix require arguments in README.md It may confuse people if we `require('..')` in README.md I changed it to `require('commander')` --- Readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Readme.md b/Readme.md index 821d791c2..9c5cacfeb 100644 --- a/Readme.md +++ b/Readme.md @@ -137,7 +137,7 @@ program.parse(process.argv); ```js #!/usr/bin/env node -var program = require('../'); +var program = require('commander'); program .version('0.0.1') @@ -162,7 +162,7 @@ Angled brackets (e.g. ``) indicate required input. Square brackets (e.g. `[ ```js // file: ./examples/pm -var program = require('..'); +var program = require('commander'); program .version('0.0.1') From 20493bb59f350a4e30c03a69f13228450f9a541e Mon Sep 17 00:00:00 2001 From: Gabriel Monteiro Nepomuceno Date: Sun, 9 Apr 2017 06:48:16 +0100 Subject: [PATCH 002/108] On SemVer you do not start from 0.0.1 You should not start one application with a fix but with an implementation of a new feature. this is why I think that this approach it is better than 0.0.1 --- Readme.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Readme.md b/Readme.md index 821d791c2..8ce94db19 100644 --- a/Readme.md +++ b/Readme.md @@ -28,7 +28,7 @@ var program = require('commander'); program - .version('0.0.1') + .version('0.1.0') .option('-p, --peppers', 'Add peppers') .option('-P, --pineapple', 'Add pineapple') .option('-b, --bbq-sauce', 'Add bbq sauce') @@ -66,7 +66,7 @@ function increaseVerbosity(v, total) { } program - .version('0.0.1') + .version('0.1.0') .usage('[options] ') .option('-i, --integer ', 'An integer argument', parseInt) .option('-f, --float ', 'A float argument', parseFloat) @@ -91,7 +91,7 @@ console.log(' args: %j', program.args); ## Regular Expression ```js program - .version('0.0.1') + .version('0.1.0') .option('-s --size ', 'Pizza size', /^(large|medium|small)$/i, 'medium') .option('-d --drink [drink]', 'Drink', /^(coke|pepsi|izze)$/i) .parse(process.argv); @@ -115,7 +115,7 @@ console.log(' drink: %j', program.drink); var program = require('commander'); program - .version('0.0.1') + .version('0.1.0') .command('rmdir [otherDirs...]') .action(function (dir, otherDirs) { console.log('rmdir %s', dir); @@ -140,7 +140,7 @@ program.parse(process.argv); var program = require('../'); program - .version('0.0.1') + .version('0.1.0') .arguments(' [env]') .action(function (cmd, env) { cmdValue = cmd; @@ -165,7 +165,7 @@ Angled brackets (e.g. ``) indicate required input. Square brackets (e.g. `[ var program = require('..'); program - .version('0.0.1') + .version('0.1.0') .command('install [name]', 'install one or more packages') .command('search [query]', 'search with optional query') .command('list', 'list packages installed', {isDefault: true}) @@ -227,7 +227,7 @@ You can enable `--harmony` option in two ways: var program = require('commander'); program - .version('0.0.1') + .version('0.1.0') .option('-f, --foo', 'enable some foo') .option('-b, --bar', 'enable some bar') .option('-B, --baz', 'enable some baz'); @@ -281,7 +281,7 @@ var program = require('commander'); var colors = require('colors'); program - .version('0.0.1') + .version('0.1.0') .command('getstream [url]', 'get stream URL') .parse(process.argv); @@ -305,7 +305,7 @@ function make_red(txt) { var program = require('commander'); program - .version('0.0.1') + .version('0.1.0') .option('-C, --chdir ', 'change the working directory') .option('-c, --config ', 'set config path. defaults to ./deploy.conf') .option('-T, --no-tests', 'ignore test hook'); From 8049258a4dddf0e5769a26ef8c919f8e81c1316a Mon Sep 17 00:00:00 2001 From: abetomo Date: Mon, 19 Jun 2017 10:10:58 +0900 Subject: [PATCH 003/108] Do not test older versions --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7dcfc0812..609950076 100755 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,6 @@ language: node_js sudo: false node_js: - - "0.6" - - "0.8" - "0.10" - "0.12" - "io.js" From 4c7c1cf11c8469f13b1ca81495f386d8fade1723 Mon Sep 17 00:00:00 2001 From: abetomo Date: Mon, 19 Jun 2017 10:11:30 +0900 Subject: [PATCH 004/108] Add new version --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 609950076..69878dc81 100755 --- a/.travis.yml +++ b/.travis.yml @@ -8,4 +8,6 @@ node_js: - "3" - "4" - "6" + - "7" + - "8" - "node" From 579f670c9487bf50e7a1dd0e7fc633347d97f7b3 Mon Sep 17 00:00:00 2001 From: abetomo Date: Mon, 19 Jun 2017 12:04:35 +0900 Subject: [PATCH 005/108] Do not test older versions https://github.com/nodejs/LTS/ --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 69878dc81..a833f361f 100755 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,6 @@ language: node_js sudo: false node_js: - - "0.10" - - "0.12" - "io.js" - "2" - "3" From 5ac0439d21e1d318438ca8e564f8e2ee9eba42d1 Mon Sep 17 00:00:00 2001 From: abetomo Date: Mon, 19 Jun 2017 12:10:59 +0900 Subject: [PATCH 006/108] Do not test older versions https://github.com/nodejs/LTS/ --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index a833f361f..abb05cb9b 100755 --- a/.travis.yml +++ b/.travis.yml @@ -2,8 +2,6 @@ language: node_js sudo: false node_js: - "io.js" - - "2" - - "3" - "4" - "6" - "7" From b8882827094cf212126219aa75ecd13ff4b29c93 Mon Sep 17 00:00:00 2001 From: abetomo Date: Mon, 19 Jun 2017 12:11:27 +0900 Subject: [PATCH 007/108] Add version 5 --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index abb05cb9b..588ddfd2a 100755 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,7 @@ sudo: false node_js: - "io.js" - "4" + - "5" - "6" - "7" - "8" From 45ce0326895564e3148cde1ff194b30e2801ea9f Mon Sep 17 00:00:00 2001 From: abetomo Date: Mon, 19 Jun 2017 12:11:44 +0900 Subject: [PATCH 008/108] Remove io.js --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 588ddfd2a..eac7b8a5b 100755 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: node_js sudo: false node_js: - - "io.js" - "4" - "5" - "6" From 98e66bcbc3e397d81455184e540165aefc45a161 Mon Sep 17 00:00:00 2001 From: twk-b Date: Tue, 16 Feb 2016 21:43:55 -0700 Subject: [PATCH 009/108] #330 make .option defaultValue and fn and .version flag optional --- index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 5344efb08..e7861e682 100644 --- a/index.js +++ b/index.js @@ -350,8 +350,8 @@ Command.prototype.action = function(fn) { * * @param {String} flags * @param {String} description - * @param {Function|Mixed} fn or default - * @param {Mixed} defaultValue + * @param {Function|*} [fn] or default + * @param {*} [defaultValue] * @return {Command} for chaining * @api public */ @@ -823,7 +823,7 @@ Command.prototype.variadicArgNotLast = function(name) { * which will print the version number when passed. * * @param {String} str - * @param {String} flags + * @param {String} [flags] * @return {Command} for chaining * @api public */ From 8870675aa189d84014779b53760544a0e614cb40 Mon Sep 17 00:00:00 2001 From: abetomo Date: Mon, 19 Jun 2017 20:13:55 +0900 Subject: [PATCH 010/108] version bump 2.10.0 --- History.md | 20 ++++++++++++++++++++ package.json | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/History.md b/History.md index 1b47439cb..23f1b6752 100644 --- a/History.md +++ b/History.md @@ -1,4 +1,24 @@ +2.10.0 / 2017-06-19 +================== + * Update .travis.yml. drop support for older node.js versions. + * Fix require arguments in README.md + * On SemVer you do not start from 0.0.1 + * Add missing semi colon in readme + * Add save param to npm install + * node v6 travis test + * Update Readme_zh-CN.md + * Allow literal '--' to be passed-through as an argument + * Test subcommand alias help + * link build badge to master branch + * Support the alias of Git style sub-command + * added keyword commander for better search result on npm + * Fix Sub-Subcommands + * test node.js stable + * Fixes TypeError when a command has an option called `--description` + * Update README.md to make it beginner friendly and elaborate on the difference between angled and square brackets. + * Add chinese Readme file + 2.9.0 / 2015-10-13 ================== diff --git a/package.json b/package.json index fb7a2bba0..cc0ba957d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "commander", - "version": "2.9.0", + "version": "2.10.0", "description": "the complete solution for node.js command-line programs", "keywords": [ "commander", From 5c977073b72f711412c73afd049ca2a0a95732a9 Mon Sep 17 00:00:00 2001 From: Will V Date: Sat, 24 Jun 2017 16:32:45 +0100 Subject: [PATCH 011/108] Updated link to ruby commander in readme files --- Readme.md | 3 +-- Readme_zh-CN.md | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Readme.md b/Readme.md index 8fb920a59..3135a9443 100644 --- a/Readme.md +++ b/Readme.md @@ -6,7 +6,7 @@ [![NPM Downloads](https://img.shields.io/npm/dm/commander.svg?style=flat)](https://www.npmjs.org/package/commander) [![Join the chat at https://gitter.im/tj/commander.js](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/tj/commander.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) - The complete solution for [node.js](http://nodejs.org) command-line interfaces, inspired by Ruby's [commander](https://github.com/tj/commander). + The complete solution for [node.js](http://nodejs.org) command-line interfaces, inspired by Ruby's [commander](https://github.com/commander-rb/commander). [API documentation](http://tj.github.com/commander.js/) @@ -349,4 +349,3 @@ More Demos can be found in the [examples](https://github.com/tj/commander.js/tre ## License MIT - diff --git a/Readme_zh-CN.md b/Readme_zh-CN.md index 507b88864..981004e57 100644 --- a/Readme_zh-CN.md +++ b/Readme_zh-CN.md @@ -6,7 +6,7 @@ [![NPM Downloads](https://img.shields.io/npm/dm/commander.svg?style=flat)](https://www.npmjs.org/package/commander) [![Join the chat at https://gitter.im/tj/commander.js](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/tj/commander.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) - [node.js](http://nodejs.org) 命令行接口的完整解决方案,灵感来自 Ruby 的 [commander](https://github.com/tj/commander)。 + [node.js](http://nodejs.org) 命令行接口的完整解决方案,灵感来自 Ruby 的 [commander](https://github.com/commander-rb/commander)。 [API 文档](http://tj.github.com/commander.js/) @@ -340,4 +340,3 @@ program.parse(process.argv); ## 许可证 MIT - From add00ad820a51d690412b786b1a00f7ff1ea1e79 Mon Sep 17 00:00:00 2001 From: Cedric Reichenbach Date: Tue, 31 Jan 2017 08:21:35 +0100 Subject: [PATCH 012/108] Add .vscode directory to .gitignore (Visual Studio Code metadata) --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 70687964d..979dd95fd 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ node_modules *.sock .idea +.vscode/ From 57bc3ba012f1005d2a08909952b6a32e08eb1005 Mon Sep 17 00:00:00 2001 From: Cedric Reichenbach Date: Tue, 31 Jan 2017 08:22:31 +0100 Subject: [PATCH 013/108] Support setting name in #name function and make it chainable Similar to #description, #name now behaves like a setter when given an argument, and like a setter otherwise. --- index.js | 10 ++++++---- test/test.command.name.set.js | 16 ++++++++++++++++ 2 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 test/test.command.name.set.js diff --git a/index.js b/index.js index e7861e682..6fc36ea7c 100644 --- a/index.js +++ b/index.js @@ -898,15 +898,17 @@ Command.prototype.usage = function(str) { }; /** - * Get the name of the command + * Get or set the name of the command * - * @param {String} name + * @param {String} str * @return {String|Command} * @api public */ -Command.prototype.name = function() { - return this._name; +Command.prototype.name = function(str) { + if (0 === arguments.length) return this._name; + this._name = str; + return this; }; /** diff --git a/test/test.command.name.set.js b/test/test.command.name.set.js new file mode 100644 index 000000000..e69c46ea0 --- /dev/null +++ b/test/test.command.name.set.js @@ -0,0 +1,16 @@ +var program = require('../') + , sinon = require('sinon').sandbox.create() + , should = require('should'); + +sinon.stub(process, 'exit'); +sinon.stub(process.stdout, 'write'); + +program.name('foobar').description('This is a test.'); + +program.name.should.be.a.Function; +program.name().should.equal('foobar'); +program.description().should.equal('This is a test.'); + +var output = process.stdout.write.args[0]; + +sinon.restore(); From 85450a044873bccced6540950803d5d304a90af8 Mon Sep 17 00:00:00 2001 From: Jason 'Toolbox' Oettinger Date: Mon, 26 Jun 2017 18:25:52 -0400 Subject: [PATCH 014/108] Removing dependency on graceful-readlink --- index.js | 3 +-- package.json | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index 6fc36ea7c..007b9d184 100644 --- a/index.js +++ b/index.js @@ -4,7 +4,6 @@ var EventEmitter = require('events').EventEmitter; var spawn = require('child_process').spawn; -var readlink = require('graceful-readlink').readlinkSync; var path = require('path'); var dirname = path.dirname; var basename = path.basename; @@ -513,7 +512,7 @@ Command.prototype.executeSubCommand = function(argv, args, unknown) { // In case of globally installed, get the base dir where executable // subcommand file should be located at var baseDir - , link = readlink(f); + , link = fs.lstatSync(f).isSymbolicLink() ? fs.readlinkSync(f) : f; // when symbolink is relative path if (link !== f && link.charAt(0) !== '/') { diff --git a/package.json b/package.json index cc0ba957d..5f97c0a25 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,5 @@ "files": [ "index.js" ], - "dependencies": { - "graceful-readlink": ">= 1.0.0" - } + "dependencies": {} } From 78c563d5dc0a375c581dc1d19b02a31fdcddbf0c Mon Sep 17 00:00:00 2001 From: Augusto Franzoia Date: Tue, 27 Jun 2017 13:02:40 +0200 Subject: [PATCH 015/108] Prefix events to prevent conflicts between commands and options (#494) --- index.js | 20 ++++++++++---------- test/test.command.noConflict.js | 25 +++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 10 deletions(-) create mode 100644 test/test.command.noConflict.js diff --git a/index.js b/index.js index 007b9d184..6229f00d6 100644 --- a/index.js +++ b/index.js @@ -301,8 +301,8 @@ Command.prototype.action = function(fn) { }; var parent = this.parent || this; var name = parent === this ? '*' : this._name; - parent.on(name, listener); - if (this._alias) parent.on(this._alias, listener); + parent.on('command:' + name, listener); + if (this._alias) parent.on('command:' + this._alias, listener); return this; }; @@ -389,7 +389,7 @@ Command.prototype.option = function(flags, description, fn, defaultValue) { // when it's passed assign the value // and conditionally invoke the callback - this.on(oname, function(val) { + this.on('option:' + oname, function(val) { // coercion if (null !== val && fn) val = fn(val, undefined === self[name] ? defaultValue @@ -623,10 +623,10 @@ Command.prototype.parseArgs = function(args, unknown) { if (args.length) { name = args[0]; - if (this.listeners(name).length) { - this.emit(args.shift(), args, unknown); + if (this.listeners('command:' + name).length) { + this.emit('command:' + args.shift(), args, unknown); } else { - this.emit('*', args); + this.emit('command:*', args); } } else { outputHelpIfNecessary(this, unknown); @@ -699,7 +699,7 @@ Command.prototype.parseOptions = function(argv) { if (option.required) { arg = argv[++i]; if (null == arg) return this.optionMissingArgument(option); - this.emit(option.name(), arg); + this.emit('option:' + option.name(), arg); // optional arg } else if (option.optional) { arg = argv[i+1]; @@ -708,10 +708,10 @@ Command.prototype.parseOptions = function(argv) { } else { ++i; } - this.emit(option.name(), arg); + this.emit('option:' + option.name(), arg); // bool } else { - this.emit(option.name()); + this.emit('option:' + option.name()); } continue; } @@ -832,7 +832,7 @@ Command.prototype.version = function(str, flags) { this._version = str; flags = flags || '-V, --version'; this.option(flags, 'output the version number'); - this.on('version', function() { + this.on('option:version', function() { process.stdout.write(str + '\n'); process.exit(0); }); diff --git a/test/test.command.noConflict.js b/test/test.command.noConflict.js new file mode 100644 index 000000000..dc772af88 --- /dev/null +++ b/test/test.command.noConflict.js @@ -0,0 +1,25 @@ +var program = require('../') + , sinon = require('sinon') + , should = require('should'); + +sinon.stub(process, 'exit'); +sinon.stub(process.stdout, 'write'); + +program + .version('0.0.1') + .command('version') + .action(function() { + console.log('Version command invoked'); + }); + +program.parse(['node', 'test', 'version']); + +var output = process.stdout.write.args[0]; +output[0].should.equal('Version command invoked\n'); + +program.parse(['node', 'test', '--version']); + +var output = process.stdout.write.args[1]; +output[0].should.equal('0.0.1\n'); + +sinon.restore(); From b00b6aaf0f296ca3dfffa1e1e5cbcec8c5e8077a Mon Sep 17 00:00:00 2001 From: abetomo Date: Tue, 27 Jun 2017 12:06:27 +0900 Subject: [PATCH 016/108] Upgrade package version Since old nodejs are no longer supported --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 5f97c0a25..fa3379188 100644 --- a/package.json +++ b/package.json @@ -15,8 +15,8 @@ "url": "https://github.com/tj/commander.js.git" }, "devDependencies": { - "should": ">= 0.0.1 <9.0.0", - "sinon": ">=1.17.1" + "should": "^11.2.1", + "sinon": "^2.3.5" }, "scripts": { "test": "make test" From 14c2c81f9162901626182e261bc6b31e208322b2 Mon Sep 17 00:00:00 2001 From: abetomo Date: Tue, 27 Jun 2017 12:07:28 +0900 Subject: [PATCH 017/108] Remove engines --- package.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/package.json b/package.json index fa3379188..1450a88bd 100644 --- a/package.json +++ b/package.json @@ -22,9 +22,6 @@ "test": "make test" }, "main": "index", - "engines": { - "node": ">= 0.6.x" - }, "files": [ "index.js" ], From 6106f10453a7178f0f64c7cf9aa4b459c1a29564 Mon Sep 17 00:00:00 2001 From: abetomo Date: Tue, 27 Jun 2017 12:09:02 +0900 Subject: [PATCH 018/108] Add package-lock.json https://docs.npmjs.com/files/package-locks --- package-lock.json | 104 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 package-lock.json diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 000000000..5924df1a3 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,104 @@ +{ + "name": "commander", + "version": "2.10.0", + "lockfileVersion": 1, + "dependencies": { + "diff": { + "version": "https://registry.npmjs.org/diff/-/diff-3.2.0.tgz", + "integrity": "sha1-yc45Okt8vQsFinJck98pkCeGj/k=", + "dev": true + }, + "formatio": { + "version": "https://registry.npmjs.org/formatio/-/formatio-1.2.0.tgz", + "integrity": "sha1-87IWfZBoxGmKjVH092CjmlTYGOs=", + "dev": true + }, + "isarray": { + "version": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "lolex": { + "version": "https://registry.npmjs.org/lolex/-/lolex-1.6.0.tgz", + "integrity": "sha1-OpoCg0UqR9dDnnJzG54H1zhuSfY=", + "dev": true + }, + "native-promise-only": { + "version": "https://registry.npmjs.org/native-promise-only/-/native-promise-only-0.8.1.tgz", + "integrity": "sha1-IKMYwwy0X3H+et+/eyHJnBRy7xE=", + "dev": true + }, + "path-to-regexp": { + "version": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz", + "integrity": "sha1-Wf3g9DW62suhA6hOnTvGTpa5k30=", + "dev": true + }, + "samsam": { + "version": "https://registry.npmjs.org/samsam/-/samsam-1.2.1.tgz", + "integrity": "sha1-7dOQk6MYQ3DLhZJDsr3yVefY6mc=", + "dev": true + }, + "should": { + "version": "11.2.1", + "resolved": "https://registry.npmjs.org/should/-/should-11.2.1.tgz", + "integrity": "sha1-kPVRRVUtAc/CAGZuToGKHJZw7aI=", + "dev": true, + "dependencies": { + "should-equal": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/should-equal/-/should-equal-1.0.1.tgz", + "integrity": "sha1-C26VFvJgGp+wuy3MNpr6HH4gCvc=", + "dev": true + }, + "should-format": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/should-format/-/should-format-3.0.3.tgz", + "integrity": "sha1-m/yPdPo5IFxT04w01xcwPidxJPE=", + "dev": true + }, + "should-type": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/should-type/-/should-type-1.4.0.tgz", + "integrity": "sha1-B1bYzoRt/QmEOmlHcZ36DUz/XPM=", + "dev": true + } + } + }, + "should-type-adaptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/should-type-adaptors/-/should-type-adaptors-1.0.1.tgz", + "integrity": "sha1-7+VVPN9oz/ZuXF9RtxLcNRx3vqo=", + "dev": true, + "dependencies": { + "should-type": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/should-type/-/should-type-1.4.0.tgz", + "integrity": "sha1-B1bYzoRt/QmEOmlHcZ36DUz/XPM=", + "dev": true + } + } + }, + "should-util": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/should-util/-/should-util-1.0.0.tgz", + "integrity": "sha1-yYzaN0qmsZDfi6h8mInCtNtiAGM=", + "dev": true + }, + "sinon": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-2.3.5.tgz", + "integrity": "sha1-mi/A/41SbacW8wlTqixl1RiRf2w=", + "dev": true + }, + "text-encoding": { + "version": "https://registry.npmjs.org/text-encoding/-/text-encoding-0.6.4.tgz", + "integrity": "sha1-45mpgiV6J22uQou5KEXLcb3CbRk=", + "dev": true + }, + "type-detect": { + "version": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.0.tgz", + "integrity": "sha1-YgU4g1QqMh8veyV0bcaWR4sY/2s=", + "dev": true + } + } +} From f2eb7e30a53fdb173a7910acd3a227a5646839d9 Mon Sep 17 00:00:00 2001 From: HakurouKen Date: Thu, 29 Jun 2017 12:41:21 +0800 Subject: [PATCH 019/108] Fix translation errors. (#570) --- Readme_zh-CN.md | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/Readme_zh-CN.md b/Readme_zh-CN.md index 981004e57..f1f1efdaa 100644 --- a/Readme_zh-CN.md +++ b/Readme_zh-CN.md @@ -15,7 +15,7 @@ $ npm install commander ## 参数解析 - 定义并使用 commander 的选项功能 `.option()` 方法。作为这些选项的文档,下面的例子会解析来自 `progress.argv` 指定的参数和选项,留下剩余未被选择的参数放到 `program.args` 数组中。 + `.option()` 方法用来定义带选项的 commander,同时也作为这些选项的文档。下面的例子会解析来自 `progress.argv` 指定的参数和选项,没有匹配任何选项的参数将会放到 `program.args` 数组中。 ```js #!/usr/bin/env node @@ -94,14 +94,14 @@ program .option('-s --size ', 'Pizza size', /^(large|medium|small)$/i, 'medium') .option('-d --drink [drink]', 'Drink', /^(coke|pepsi|izze)$/i) .parse(process.argv); - + console.log(' size: %j', program.size); console.log(' drink: %j', program.drink); ``` ## 可变参数 - 一个命令的最后一个参数可以是可变参数, 并且只能是最后一个参数。为了使参数可变,你需要在参数名后面追加 `...`。 下面是个示例: + 一个命令的最后一个参数可以是可变参数, 并且只有最后一个参数可变。为了使参数可变,你需要在参数名后面追加 `...`。 下面是个示例: ```js #!/usr/bin/env node @@ -126,9 +126,7 @@ program program.parse(process.argv); ``` - - `数组` 是可以用于给可变参数传值的。 这适用于 `program.args` 以及参数传递,以你的行动证明上述。 - 你可以如上所示的去尝试。 +可变参数的值以 `数组` 的形式保存。如上所示,在传递给你的 action 的参数和 `program.args` 中的值都是如此。 ## 指定参数的语法 @@ -154,6 +152,7 @@ if (typeof cmdValue === 'undefined') { console.log('command:', cmdValue); console.log('environment:', envValue || "no environment given"); ``` +尖括号(例如 ``)代表必填输入,方括号(例如 `[env]`)代表可选输入。 ## Git 风格的子命令 @@ -169,18 +168,18 @@ program .parse(process.argv); ``` - 当说明参数调用 `.command()` 时,没有 `.action(callback)` 应调用来处理子命令,否则会出错。这告诉 commander,你要使用单独的可执行文件的子命令,就像 `git(1)` 和其他流行工具一样。 - Commander 将尝试在入口脚本的目录中搜索可执行文件,(像 `./examples/pm`)与名称 `program-command`,像 `pm-install`,`pm-search`。 +当 `.command()` 带有描述参数时,不能采用 `.action(callback)` 来处理子命令,否则会出错。这告诉 commander,你将采用单独的可执行文件作为子命令,就像 `git(1)` 和其他流行的工具一样。 +Commander 将会尝试在入口脚本(例如 `./examples/pm`)的目录中搜索 `program-command` 形式的可执行文件,例如 `pm-install`, `pm-search`。 - 对 `.command()` 的调用,可以传递选项。指定 `opts.noHelp` 为 `true` 将从生成的帮助输出中删除选项。如果没有其他子命令指定,指定 `opts.isDefault` 为 `true` 将运行子命令。 +你可以在调用 `.command()` 时传递选项。指定 `opts.noHelp` 为 `true` 将从生成的帮助输出中剔除该选项。指定 `opts.isDefault` 为 `true` 将会在没有其它子命令指定的情况下,执行该子命令。 - 如果打算全局(--global)安装该命令,请确保可执行文件有适当的模式,如 '755'。 +如果你打算全局安装该命令,请确保可执行文件有对应的权限,例如 `755`。 ### `--harmony` -您可以启用 `--harmoney` 选项在两个方面: -* 用 `#!/usr/bin/env node --harmony` 在子命令脚本中。注意一些系统版本不支持此模式。 -* 用 `--harmoney` 选项时调用的命令,像 `node --harmony examples/pm publish`。`--harmoney` 选项当产生一个子命令进程时保留选项。 +您可以采用两种方式启用 `--harmony`: +* 在子命令脚本中加上 `#!/usr/bin/env node --harmony`。注意一些系统版本不支持此模式。 +* 在指令调用时加上 `--harmony` 参数,例如 `node --harmony examples/pm publish`。`--harmony` 选项在开启子进程时会被保留。 ## 自动化帮助信息 --help @@ -207,7 +206,7 @@ program ## 自定义帮助 - 你可以显示任何 `-h, --help` 信息,通过监听 `--help` 。一旦你完成了 Commander 将自动退出,你的程序的其余部分不会展示。例如在下面的 “stuff” 将不会在执行 `--help` 时输出。 + 你可以通过监听 `--help` 来控制 `-h, --help` 显示任何信息。一旦调用完成, Commander 将自动退出,你的程序的其余部分不会展示。例如在下面的 “stuff” 将不会在执行 `--help` 时输出。 ```js #!/usr/bin/env node From 3c2fd5cc19dc1aea7cb6f7bf0bcb7a80bd04c969 Mon Sep 17 00:00:00 2001 From: Victor Johnson Date: Sat, 1 Jul 2017 09:05:18 -0500 Subject: [PATCH 020/108] Fixed #37, --help should not display first (#447) --- index.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/index.js b/index.js index 6229f00d6..2e84cf6e6 100644 --- a/index.js +++ b/index.js @@ -933,12 +933,11 @@ Command.prototype.largestOptionLength = function() { Command.prototype.optionHelp = function() { var width = this.largestOptionLength(); - // Prepend the help information - return [pad('-h, --help', width) + ' ' + 'output usage information'] - .concat(this.options.map(function(option) { - return pad(option.flags, width) + ' ' + option.description; - })) - .join('\n'); + // Append the help information + return this.options.map(function(option) { + return pad(option.flags, width) + ' ' + option.description; + }).concat([pad('-h, --help', width) + ' ' + 'output usage information']) + .join('\n'); }; /** From 1e4c68910efaece97211a7f3c12cbe6c7f6396b6 Mon Sep 17 00:00:00 2001 From: Thomas Simoens Date: Mon, 3 Jul 2017 10:59:05 +0200 Subject: [PATCH 021/108] feature: support for signals to subcommands (#632) * add basic subcommand signal tests and fixture These tests verify that a signal sent to the process is correctly propagated to the subcommand * add propagation of supported signals to subcommands Choice of supported signals: https://nodejs.org/api/process.html#process_signal_events * increase timeout for subcommand signal handling for better success rate * increase timeout for subcommand spawn for better success rate in tests * make pm-listen fixture executable * finetune SIGUSR1 test for possible warning from node --- index.js | 8 +++++ test/fixtures/pm | 1 + test/fixtures/pm-listen | 28 ++++++++++++++++ ...ommand.executableSubcommand.signals.hup.js | 22 +++++++++++++ ...ommand.executableSubcommand.signals.int.js | 22 +++++++++++++ ...mmand.executableSubcommand.signals.term.js | 22 +++++++++++++ ...mmand.executableSubcommand.signals.usr1.js | 33 +++++++++++++++++++ ...mmand.executableSubcommand.signals.usr2.js | 22 +++++++++++++ 8 files changed, 158 insertions(+) create mode 100755 test/fixtures/pm-listen create mode 100644 test/test.command.executableSubcommand.signals.hup.js create mode 100644 test/test.command.executableSubcommand.signals.int.js create mode 100644 test/test.command.executableSubcommand.signals.term.js create mode 100644 test/test.command.executableSubcommand.signals.usr1.js create mode 100644 test/test.command.executableSubcommand.signals.usr2.js diff --git a/index.js b/index.js index 2e84cf6e6..86d82bdbb 100644 --- a/index.js +++ b/index.js @@ -550,6 +550,14 @@ Command.prototype.executeSubCommand = function(argv, args, unknown) { proc = spawn(process.execPath, args, { stdio: 'inherit'}); } + var signals = ['SIGUSR1', 'SIGUSR2', 'SIGTERM', 'SIGINT', 'SIGHUP']; + signals.forEach(function(signal) { + process.on(signal, function(){ + if ((proc.killed === false) && (proc.exitCode === null)){ + proc.kill(signal); + } + }); + }); proc.on('close', process.exit.bind(process)); proc.on('error', function(err) { if (err.code == "ENOENT") { diff --git a/test/fixtures/pm b/test/fixtures/pm index 4452010cd..d86822d9b 100755 --- a/test/fixtures/pm +++ b/test/fixtures/pm @@ -8,6 +8,7 @@ program .command('search [query]', 'search with optional query').alias('s') .command('cache', 'actions dealing with the cache').alias('c') .command('list', 'list packages installed') + .command('listen', 'listen for supported signal events').alias('l') .command('publish', 'publish or update package').alias('p') .command('default', 'default command', {noHelp: true, isDefault: true}) .parse(process.argv); diff --git a/test/fixtures/pm-listen b/test/fixtures/pm-listen new file mode 100755 index 000000000..f75e89007 --- /dev/null +++ b/test/fixtures/pm-listen @@ -0,0 +1,28 @@ +#!/usr/bin/env node + +process.on('SIGUSR1', function(){ + console.log('SIGUSR1'); + process.exit(); +}); + +process.on('SIGUSR2', function(){ + console.log('SIGUSR2'); + process.exit(); +}); + +process.on('SIGTERM', function(){ + console.log('SIGTERM'); + process.exit(); +}); + +process.on('SIGINT', function(){ + console.log('SIGINT'); + process.exit(); +}); + +process.on('SIGHUP', function(){ + console.log('SIGHUP'); + process.exit(); +}); + +setInterval(function(){}, 5000); // Mimic a running process \ No newline at end of file diff --git a/test/test.command.executableSubcommand.signals.hup.js b/test/test.command.executableSubcommand.signals.hup.js new file mode 100644 index 000000000..76b468a0b --- /dev/null +++ b/test/test.command.executableSubcommand.signals.hup.js @@ -0,0 +1,22 @@ +var spawn = require('child_process').spawn, + path = require('path'), + should = require('should'); + +var bin = path.join(__dirname, './fixtures/pm'); +var proc = spawn(bin, ['listen'], {}); + +var output = ''; +proc.stdout.on('data', function (data) { + output += data.toString(); +}); + +// Set a timeout to give 'proc' time to setup completely +setTimeout(function () { + proc.kill('SIGHUP'); + + // Set another timeout to give 'prog' time to handle the signal + setTimeout(function() { + output.should.equal('SIGHUP\n'); + }, 1000); + +}, 2000); \ No newline at end of file diff --git a/test/test.command.executableSubcommand.signals.int.js b/test/test.command.executableSubcommand.signals.int.js new file mode 100644 index 000000000..2dd396652 --- /dev/null +++ b/test/test.command.executableSubcommand.signals.int.js @@ -0,0 +1,22 @@ +var spawn = require('child_process').spawn, + path = require('path'), + should = require('should'); + +var bin = path.join(__dirname, './fixtures/pm'); +var proc = spawn(bin, ['listen'], {}); + +var output = ''; +proc.stdout.on('data', function (data) { + output += data.toString(); +}); + +// Set a timeout to give 'proc' time to setup completely +setTimeout(function () { + proc.kill('SIGINT'); + + // Set another timeout to give 'prog' time to handle the signal + setTimeout(function() { + output.should.equal('SIGINT\n'); + }, 1000); + +}, 2000); \ No newline at end of file diff --git a/test/test.command.executableSubcommand.signals.term.js b/test/test.command.executableSubcommand.signals.term.js new file mode 100644 index 000000000..e4449c8bb --- /dev/null +++ b/test/test.command.executableSubcommand.signals.term.js @@ -0,0 +1,22 @@ +var spawn = require('child_process').spawn, + path = require('path'), + should = require('should'); + +var bin = path.join(__dirname, './fixtures/pm'); +var proc = spawn(bin, ['listen'], {}); + +var output = ''; +proc.stdout.on('data', function (data) { + output += data.toString(); +}); + +// Set a timeout to give 'proc' time to setup completely +setTimeout(function () { + proc.kill('SIGTERM'); + + // Set another timeout to give 'prog' time to handle the signal + setTimeout(function() { + output.should.equal('SIGTERM\n'); + }, 1000); + +}, 2000); \ No newline at end of file diff --git a/test/test.command.executableSubcommand.signals.usr1.js b/test/test.command.executableSubcommand.signals.usr1.js new file mode 100644 index 000000000..6a2bbea9c --- /dev/null +++ b/test/test.command.executableSubcommand.signals.usr1.js @@ -0,0 +1,33 @@ +var spawn = require('child_process').spawn, + path = require('path'), + should = require('should'); + +var bin = path.join(__dirname, './fixtures/pm'); +var proc = spawn(bin, ['listen'], {}); + +var output = ''; +proc.stdout.on('data', function (data) { + output += data.toString(); +}); + +// Set a timeout to give 'proc' time to setup completely +setTimeout(function () { + proc.kill('SIGUSR1'); + + // Set another timeout to give 'prog' time to handle the signal + setTimeout(function() { + /* + * As described at https://nodejs.org/api/process.html#process_signal_events + * this signal will start a debugger and thus the process might output an + * additional error message: + * + * "Failed to open socket on port 5858, waiting 1000 ms before retrying". + * + * Therefore, we are a bit more lax in matching the output. + * It must contain the expected output, meaning an empty line containing + * only "SIGUSR1", but any other output is also allowed. + */ + output.should.match(/(^|\n)SIGUSR1\n/); + }, 1000); + +}, 2000); \ No newline at end of file diff --git a/test/test.command.executableSubcommand.signals.usr2.js b/test/test.command.executableSubcommand.signals.usr2.js new file mode 100644 index 000000000..fb902faa7 --- /dev/null +++ b/test/test.command.executableSubcommand.signals.usr2.js @@ -0,0 +1,22 @@ +var spawn = require('child_process').spawn, + path = require('path'), + should = require('should'); + +var bin = path.join(__dirname, './fixtures/pm'); +var proc = spawn(bin, ['listen'], {}); + +var output = ''; +proc.stdout.on('data', function (data) { + output += data.toString(); +}); + +// Set a timeout to give 'proc' time to setup completely +setTimeout(function () { + proc.kill('SIGUSR2'); + + // Set another timeout to give 'prog' time to handle the signal + setTimeout(function() { + output.should.equal('SIGUSR2\n'); + }, 1000); + +}, 2000); \ No newline at end of file From 14e573899745d673f945d52dca34e7ea2e5d11d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Valentin=20Trinqu=C3=A9?= Date: Mon, 3 Jul 2017 11:01:15 +0200 Subject: [PATCH 022/108] Fix help section order and padding (#652) * Change help section order Fixes tj/commander.js#500 Previous display order : Usage > Commands > Description > Options New display order: Usage > Description > Options > Commands * Fix inconsistent padding between help sections --- examples/pm | 1 + index.js | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/pm b/examples/pm index baac7816f..2d0506441 100755 --- a/examples/pm +++ b/examples/pm @@ -4,6 +4,7 @@ var program = require('..'); program .version('0.0.1') + .description('Fake package manager') .command('install [name]', 'install one or more packages').alias('i') .command('search [query]', 'search with optional query').alias('s') .command('list', 'list packages installed') diff --git a/index.js b/index.js index 86d82bdbb..d5dbe1868 100644 --- a/index.js +++ b/index.js @@ -1021,17 +1021,17 @@ Command.prototype.helpInformation = function() { if (commandHelp) cmds = [commandHelp]; var options = [ - ' Options:' + '' + , ' Options:' , '' , '' + this.optionHelp().replace(/^/gm, ' ') , '' - , '' ]; return usage - .concat(cmds) .concat(desc) .concat(options) + .concat(cmds) .join('\n'); }; From 30535a67a7d1f3809231603bc4dc0ba873ae85ef Mon Sep 17 00:00:00 2001 From: Tomoaki Abe Date: Mon, 3 Jul 2017 19:05:58 +0900 Subject: [PATCH 023/108] Version bump 2.11.0 (#657) * version bump 2.11.0 * Add line feed for format unification --- History.md | 17 +++++++++++++++++ package.json | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/History.md b/History.md index 23f1b6752..d60418ebd 100644 --- a/History.md +++ b/History.md @@ -1,6 +1,23 @@ +2.11.0 / 2017-07-03 +================== + + * Fix help section order and padding (#652) + * feature: support for signals to subcommands (#632) + * Fixed #37, --help should not display first (#447) + * Fix translation errors. (#570) + * Add package-lock.json + * Remove engines + * Upgrade package version + * Prefix events to prevent conflicts between commands and options (#494) + * Removing dependency on graceful-readlink + * Support setting name in #name function and make it chainable + * Add .vscode directory to .gitignore (Visual Studio Code metadata) + * Updated link to ruby commander in readme files + 2.10.0 / 2017-06-19 ================== + * Update .travis.yml. drop support for older node.js versions. * Fix require arguments in README.md * On SemVer you do not start from 0.0.1 diff --git a/package.json b/package.json index 1450a88bd..708f223a2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "commander", - "version": "2.10.0", + "version": "2.11.0", "description": "the complete solution for node.js command-line programs", "keywords": [ "commander", From 90b7fefde8638b136cf20765e21dd7ad33e1caf3 Mon Sep 17 00:00:00 2001 From: Luke Zilioli Date: Sun, 31 Jul 2016 17:52:49 -0500 Subject: [PATCH 024/108] use current node --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index d5dbe1868..aacce61d5 100644 --- a/index.js +++ b/index.js @@ -541,7 +541,7 @@ Command.prototype.executeSubCommand = function(argv, args, unknown) { // add executable arguments to spawn args = (process.execArgv || []).concat(args); - proc = spawn('node', args, { stdio: 'inherit', customFds: [0, 1, 2] }); + proc = spawn(process.argv[0], args, { stdio: 'inherit', customFds: [0, 1, 2] }); } else { proc = spawn(bin, args, { stdio: 'inherit', customFds: [0, 1, 2] }); } From 66dfb8c624c8a4009ae118d110cb2cc99b5b6ae3 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Sun, 23 Jul 2017 21:23:04 +0200 Subject: [PATCH 025/108] feat(typings): add typings to support TypeScript (#646) Add typings to support for TypeScript in favor of `@types/commander` --- package.json | 17 ++- tsconfig.json | 20 +++ typings/commander-tests.ts | 96 +++++++++++++ typings/index.d.ts | 288 +++++++++++++++++++++++++++++++++++++ 4 files changed, 415 insertions(+), 6 deletions(-) create mode 100644 tsconfig.json create mode 100644 typings/commander-tests.ts create mode 100644 typings/index.d.ts diff --git a/package.json b/package.json index 708f223a2..8cd9da652 100644 --- a/package.json +++ b/package.json @@ -14,16 +14,21 @@ "type": "git", "url": "https://github.com/tj/commander.js.git" }, - "devDependencies": { - "should": "^11.2.1", - "sinon": "^2.3.5" - }, "scripts": { - "test": "make test" + "test": "make test && npm run test-typings", + "test-typings": "node_modules/typescript/bin/tsc -p tsconfig.json" }, "main": "index", "files": [ "index.js" ], - "dependencies": {} + "dependencies": { + "@types/node": "^7.0.39" + }, + "devDependencies": { + "should": "^11.2.1", + "sinon": "^2.3.5", + "typescript": "^2.4.1" + }, + "typings": "typings/index.d.ts" } diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 000000000..dee4c88b9 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "types": [ + "node" + ], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "typings/index.d.ts", + "typings/commander-tests.ts" + ] +} \ No newline at end of file diff --git a/typings/commander-tests.ts b/typings/commander-tests.ts new file mode 100644 index 000000000..e4d68d3f5 --- /dev/null +++ b/typings/commander-tests.ts @@ -0,0 +1,96 @@ +import * as program from './index'; + +interface ExtendedOptions extends program.CommandOptions { + isNew: any; +} + +const commandInstance = new program.Command('-f'); +const optionsInstance = new program.Option('-f'); + +program + .version('0.0.1') + .option('-p, --peppers', 'Add peppers') + .option('-P, --pineapple', 'Add pineapple') + .option('-b, --bbq', 'Add bbq sauce') + .option('-c, --cheese [type]', 'Add the specified type of cheese [marble]', 'marble') + .parse(process.argv); + +console.log('you ordered a pizza with:'); +if (program['peppers']) console.log(' - peppers'); +if (program['pineapple']) console.log(' - pineapple'); +if (program['bbq']) console.log(' - bbq'); +console.log(' - %s cheese', program['cheese']); + +function range(val: string) { + return val.split('..').map(Number); +} + +function list(val: string) { + return val.split(','); +} + +function collect(val: string, memo: string[]) { + memo.push(val); + return memo; +} + +function increaseVerbosity(v: any, total: number) { + return total + 1; +} + +program + .version('0.0.1') + .usage('[options] ') + .option('-i, --integer ', 'An integer argument', parseInt) + .option('-f, --float ', 'A float argument', parseFloat) + .option('-r, --range ..', 'A range', range) + .option('-l, --list ', 'A list', list) + .option('-o, --optional [value]', 'An optional value') + .option('-c, --collect [value]', 'A repeatable value', collect, []) + .option('-v, --verbose', 'A value that can be increased', increaseVerbosity, 0) + .parse(process.argv); + +console.log(' int: %j', program['integer']); +console.log(' float: %j', program['float']); +console.log(' optional: %j', program['optional']); +program['range'] = program['range'] || []; +console.log(' range: %j..%j', program['range'][0], program['range'][1]); +console.log(' list: %j', program['list']); +console.log(' collect: %j', program['collect']); +console.log(' verbosity: %j', program['verbose']); +console.log(' args: %j', program['args']); + +program + .version('0.0.1') + .option('-f, --foo', 'enable some foo') + .option('-b, --bar', 'enable some bar') + .option('-B, --baz', 'enable some baz'); + +// must be before .parse() since +// node's emit() is immediate + +program.on('--help', () => { + console.log(' Examples:'); + console.log(''); + console.log(' $ custom-help --help'); + console.log(' $ custom-help -h'); + console.log(''); +}); + +program + .command('allow-unknown-option') + .allowUnknownOption() + .action(() => { + console.log('unknown option is allowed'); + }); + +program + .version('0.0.1') + .arguments(' [env]') + .action((cmd, env) => { + console.log(cmd, env); + }); + +program.parse(process.argv); + +console.log('stuff'); \ No newline at end of file diff --git a/typings/index.d.ts b/typings/index.d.ts new file mode 100644 index 000000000..d870be31f --- /dev/null +++ b/typings/index.d.ts @@ -0,0 +1,288 @@ +// Type definitions for commander 2.9 +// Project: https://github.com/visionmedia/commander.js +// Definitions by: Alan Agius , Marcelo Dezem , vvakame + +declare class Option { + flags: string; + required: boolean; + optional: boolean; + bool: boolean; + short?: string; + long: string; + description: string; + + /** + * Initialize a new `Option` with the given `flags` and `description`. + * + * @param {string} flags + * @param {string} [description] + */ + constructor(flags: string, description?: string); +} + +declare class Command extends NodeJS.EventEmitter { + [key: string]: any; + + args: string[]; + + /** + * Initialize a new `Command`. + * + * @param {string} [name] + */ + constructor(name?: string); + + /** + * Set the program version to `str`. + * + * This method auto-registers the "-V, --version" flag + * which will print the version number when passed. + * + * @param {string} str + * @param {string} [flags] + * @returns {Command} for chaining + */ + version(str: string, flags?: string): Command; + + /** + * Add command `name`. + * + * The `.action()` callback is invoked when the + * command `name` is specified via __ARGV__, + * and the remaining arguments are applied to the + * function for access. + * + * When the `name` is "*" an un-matched command + * will be passed as the first arg, followed by + * the rest of __ARGV__ remaining. + * + * @example + * program + * .version('0.0.1') + * .option('-C, --chdir ', 'change the working directory') + * .option('-c, --config ', 'set config path. defaults to ./deploy.conf') + * .option('-T, --no-tests', 'ignore test hook') + * + * program + * .command('setup') + * .description('run remote setup commands') + * .action(function() { + * console.log('setup'); + * }); + * + * program + * .command('exec ') + * .description('run the given remote command') + * .action(function(cmd) { + * console.log('exec "%s"', cmd); + * }); + * + * program + * .command('teardown [otherDirs...]') + * .description('run teardown commands') + * .action(function(dir, otherDirs) { + * console.log('dir "%s"', dir); + * if (otherDirs) { + * otherDirs.forEach(function (oDir) { + * console.log('dir "%s"', oDir); + * }); + * } + * }); + * + * program + * .command('*') + * .description('deploy the given env') + * .action(function(env) { + * console.log('deploying "%s"', env); + * }); + * + * program.parse(process.argv); + * + * @param {string} name + * @param {string} [desc] for git-style sub-commands + * @param {CommandOptions} [opts] command options + * @returns {Command} the new command + */ + command(name: string, desc?: string, opts?: commander.CommandOptions): Command; + + /** + * Define argument syntax for the top-level command. + * + * @param {string} desc + * @returns {Command} for chaining + */ + arguments(desc: string): Command; + + /** + * Parse expected `args`. + * + * For example `["[type]"]` becomes `[{ required: false, name: 'type' }]`. + * + * @param {string[]} args + * @returns {Command} for chaining + */ + parseExpectedArgs(args: string[]): Command; + /** + * Register callback `fn` for the command. + * + * @example + * program + * .command('help') + * .description('display verbose help') + * .action(function() { + * // output help here + * }); + * + * @param {(...args: any[]) => void} fn + * @returns {Command} for chaining + */ + action(fn: (...args: any[]) => void): Command; + + /** + * Define option with `flags`, `description` and optional + * coercion `fn`. + * + * The `flags` string should contain both the short and long flags, + * separated by comma, a pipe or space. The following are all valid + * all will output this way when `--help` is used. + * + * "-p, --pepper" + * "-p|--pepper" + * "-p --pepper" + * + * @example + * // simple boolean defaulting to false + * program.option('-p, --pepper', 'add pepper'); + * + * --pepper + * program.pepper + * // => Boolean + * + * // simple boolean defaulting to true + * program.option('-C, --no-cheese', 'remove cheese'); + * + * program.cheese + * // => true + * + * --no-cheese + * program.cheese + * // => false + * + * // required argument + * program.option('-C, --chdir ', 'change the working directory'); + * + * --chdir /tmp + * program.chdir + * // => "/tmp" + * + * // optional argument + * program.option('-c, --cheese [type]', 'add cheese [marble]'); + * + * @param {string} flags + * @param {string} [description] + * @param {((arg1: any, arg2: any) => void) | RegExp} [fn] function or default + * @param {*} [defaultValue] + * @returns {Command} for chaining + */ + option(flags: string, description?: string, fn?: ((arg1: any, arg2: any) => void) | RegExp, defaultValue?: any): Command; + option(flags: string, description?: string, defaultValue?: any): Command; + + /** + * Allow unknown options on the command line. + * + * @param {boolean} [arg] if `true` or omitted, no error will be thrown for unknown options. + * @returns {Command} for chaining + */ + allowUnknownOption(arg?: boolean): Command; + + /** + * Parse `argv`, settings options and invoking commands when defined. + * + * @param {string[]} argv + * @returns {Command} for chaining + */ + parse(argv: string[]): Command; + + /** + * Parse options from `argv` returning `argv` void of these options. + * + * @param {string[]} argv + * @returns {ParseOptionsResult} + */ + parseOptions(argv: string[]): commander.ParseOptionsResult; + + /** + * Return an object containing options as key-value pairs + * + * @returns {{[key: string]: string}} + */ + opts(): { [key: string]: string }; + + /** + * Set the description to `str`. + * + * @param {string} str + * @return {(Command | string)} + */ + description(str: string): Command; + description(): string; + + /** + * Set an alias for the command. + * + * @param {string} alias + * @return {(Command | string)} + */ + alias(alias: string): Command; + alias(): string; + + /** + * Set or get the command usage. + * + * @param {string} str + * @return {(Command | string)} + */ + usage(str: string): Command; + usage(): string; + + /** + * Get the name of the command. + * + * @return {string} + */ + name(): string; + + /** + * Output help information for this command. + * + * @param {() => void} [cb] Callback method + */ + outputHelp(cb?: () => void): void; + + /** Output help information and exit. */ + help(): void; +} + +declare namespace commander { + + interface CommandOptions { + noHelp?: boolean; + isDefault?: boolean; + } + + interface ParseOptionsResult { + args: string[]; + unknown: string[]; + } + + interface CommanderStatic extends Command { + Command: typeof Command; + Option: typeof Option; + CommandOptions: CommandOptions; + ParseOptionsResult: ParseOptionsResult; + } + +} + +declare const commander: commander.CommanderStatic; +export = commander; \ No newline at end of file From f249c85d3222c83b44c34a1e6f34daf97ce59c85 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Mon, 24 Jul 2017 02:52:20 +0200 Subject: [PATCH 026/108] Rename History.md to CHANGELOG.md (#668) --- History.md => CHANGELOG.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename History.md => CHANGELOG.md (100%) diff --git a/History.md b/CHANGELOG.md similarity index 100% rename from History.md rename to CHANGELOG.md From df3b5291617a51115a0405de7fca64b49956816e Mon Sep 17 00:00:00 2001 From: Grant Timmerman Date: Wed, 26 Jul 2017 21:22:48 -0700 Subject: [PATCH 027/108] Format js code --- Readme.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Readme.md b/Readme.md index 3135a9443..acc40499e 100644 --- a/Readme.md +++ b/Readme.md @@ -285,9 +285,9 @@ program .command('getstream [url]', 'get stream URL') .parse(process.argv); - if (!process.argv.slice(2).length) { - program.outputHelp(make_red); - } +if (!process.argv.slice(2).length) { + program.outputHelp(make_red); +} function make_red(txt) { return colors.red(txt); //display the help text in red on the console From 5c7443192447471290ccd9a5d205d1c361c5b998 Mon Sep 17 00:00:00 2001 From: Antoine Moreaux Date: Mon, 7 Aug 2017 06:14:29 +0200 Subject: [PATCH 028/108] fix bug when description is add after command with options (#662) --- index.js | 5 +++- package-lock.json | 47 ++++++++++++++++++++++++++++++++----- test/test.command.nohelp.js | 12 +++++++--- 3 files changed, 54 insertions(+), 10 deletions(-) diff --git a/index.js b/index.js index aacce61d5..4ca2829b6 100644 --- a/index.js +++ b/index.js @@ -155,6 +155,10 @@ Command.prototype.__proto__ = EventEmitter.prototype; */ Command.prototype.command = function(name, desc, opts) { + if(typeof desc === 'object' && desc !== null){ + opts = desc; + desc = null; + } opts = opts || {}; var args = name.split(/ +/); var cmd = new Command(args.shift()); @@ -165,7 +169,6 @@ Command.prototype.command = function(name, desc, opts) { this._execs[cmd._name] = true; if (opts.isDefault) this.defaultExecutable = cmd._name; } - cmd._noHelp = !!opts.noHelp; this.commands.push(cmd); cmd.parseExpectedArgs(args); diff --git a/package-lock.json b/package-lock.json index 5924df1a3..f2459508d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,7 +1,8 @@ { "name": "commander", - "version": "2.10.0", + "version": "2.11.0", "lockfileVersion": 1, + "requires": true, "dependencies": { "diff": { "version": "https://registry.npmjs.org/diff/-/diff-3.2.0.tgz", @@ -11,7 +12,10 @@ "formatio": { "version": "https://registry.npmjs.org/formatio/-/formatio-1.2.0.tgz", "integrity": "sha1-87IWfZBoxGmKjVH092CjmlTYGOs=", - "dev": true + "dev": true, + "requires": { + "samsam": "https://registry.npmjs.org/samsam/-/samsam-1.2.1.tgz" + } }, "isarray": { "version": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", @@ -31,7 +35,10 @@ "path-to-regexp": { "version": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz", "integrity": "sha1-Wf3g9DW62suhA6hOnTvGTpa5k30=", - "dev": true + "dev": true, + "requires": { + "isarray": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" + } }, "samsam": { "version": "https://registry.npmjs.org/samsam/-/samsam-1.2.1.tgz", @@ -43,18 +50,32 @@ "resolved": "https://registry.npmjs.org/should/-/should-11.2.1.tgz", "integrity": "sha1-kPVRRVUtAc/CAGZuToGKHJZw7aI=", "dev": true, + "requires": { + "should-equal": "1.0.1", + "should-format": "3.0.3", + "should-type": "1.4.0", + "should-type-adaptors": "1.0.1", + "should-util": "1.0.0" + }, "dependencies": { "should-equal": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/should-equal/-/should-equal-1.0.1.tgz", "integrity": "sha1-C26VFvJgGp+wuy3MNpr6HH4gCvc=", - "dev": true + "dev": true, + "requires": { + "should-type": "1.4.0" + } }, "should-format": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/should-format/-/should-format-3.0.3.tgz", "integrity": "sha1-m/yPdPo5IFxT04w01xcwPidxJPE=", - "dev": true + "dev": true, + "requires": { + "should-type": "1.4.0", + "should-type-adaptors": "1.0.1" + } }, "should-type": { "version": "1.4.0", @@ -69,6 +90,10 @@ "resolved": "https://registry.npmjs.org/should-type-adaptors/-/should-type-adaptors-1.0.1.tgz", "integrity": "sha1-7+VVPN9oz/ZuXF9RtxLcNRx3vqo=", "dev": true, + "requires": { + "should-type": "1.4.0", + "should-util": "1.0.0" + }, "dependencies": { "should-type": { "version": "1.4.0", @@ -88,7 +113,17 @@ "version": "2.3.5", "resolved": "https://registry.npmjs.org/sinon/-/sinon-2.3.5.tgz", "integrity": "sha1-mi/A/41SbacW8wlTqixl1RiRf2w=", - "dev": true + "dev": true, + "requires": { + "diff": "https://registry.npmjs.org/diff/-/diff-3.2.0.tgz", + "formatio": "https://registry.npmjs.org/formatio/-/formatio-1.2.0.tgz", + "lolex": "https://registry.npmjs.org/lolex/-/lolex-1.6.0.tgz", + "native-promise-only": "https://registry.npmjs.org/native-promise-only/-/native-promise-only-0.8.1.tgz", + "path-to-regexp": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz", + "samsam": "https://registry.npmjs.org/samsam/-/samsam-1.2.1.tgz", + "text-encoding": "https://registry.npmjs.org/text-encoding/-/text-encoding-0.6.4.tgz", + "type-detect": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.0.tgz" + } }, "text-encoding": { "version": "https://registry.npmjs.org/text-encoding/-/text-encoding-0.6.4.tgz", diff --git a/test/test.command.nohelp.js b/test/test.command.nohelp.js index e8f3d27d4..247d6756e 100644 --- a/test/test.command.nohelp.js +++ b/test/test.command.nohelp.js @@ -17,19 +17,25 @@ program .command('hideagain [options]', null, { noHelp: true }) .action(function() { return; }); +program.command('hiddencommandwithoutdescription [options]', { noHelp: true }); + program.parse(['node', 'test']); -program.name.should.be.a.Function; +program.name.should.be.a.Function(); program.name().should.equal('test'); program.commands[0].name().should.equal('mycommand'); program.commands[0]._noHelp.should.be.false(); program.commands[1].name().should.equal('anothercommand'); program.commands[1]._noHelp.should.be.false(); program.commands[2].name().should.equal('hiddencommand'); -program.commands[2]._noHelp.should.be.true; +program.commands[2]._noHelp.should.be.true(); program.commands[3].name().should.equal('hideagain'); program.commands[3]._noHelp.should.be.true(); -program.commands[4].name().should.equal('help'); +program.commands[4].name().should.equal('hiddencommandwithoutdescription'); +program.commands[4]._noHelp.should.be.true(); +program.commands[5].name().should.equal('help'); + + sinon.restore(); sinon.stub(process.stdout, 'write'); From df86179f72f3b1b2fc04354c708bb70f985eae57 Mon Sep 17 00:00:00 2001 From: Daevid Preis Date: Thu, 27 Jul 2017 21:48:15 +0200 Subject: [PATCH 029/108] feat(typings): add help callback --- typings/index.d.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/typings/index.d.ts b/typings/index.d.ts index d870be31f..2a5a85fbf 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -255,12 +255,16 @@ declare class Command extends NodeJS.EventEmitter { /** * Output help information for this command. * - * @param {() => void} [cb] Callback method + * @param {(str: string) => string} [cb] Callback method */ - outputHelp(cb?: () => void): void; + outputHelp(cb?: (str: string) => string): void; - /** Output help information and exit. */ - help(): void; + /** + * Output help information and exit. + * + * @param {(str: string) => string} [cb] Callback method + */ + help(cb?: (str: string) => string): void; } declare namespace commander { From 2f07e296486aa4002171311f074b6555a3287342 Mon Sep 17 00:00:00 2001 From: Augusto Franzoia Date: Tue, 8 Aug 2017 21:07:32 -0300 Subject: [PATCH 030/108] Fail when using same command and alias (#491) --- index.js | 2 ++ test/test.command.failOnSameAlias.js | 14 ++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 test/test.command.failOnSameAlias.js diff --git a/index.js b/index.js index 4ca2829b6..675575dc4 100644 --- a/index.js +++ b/index.js @@ -880,6 +880,8 @@ Command.prototype.alias = function(alias) { if (arguments.length === 0) return command._alias; + if (alias === command._name) throw new Error('Command alias can\'t be the same as its name'); + command._alias = alias; return this; }; diff --git a/test/test.command.failOnSameAlias.js b/test/test.command.failOnSameAlias.js new file mode 100644 index 000000000..6b7527631 --- /dev/null +++ b/test/test.command.failOnSameAlias.js @@ -0,0 +1,14 @@ +var program = require('../') + , should = require('should'); + +var error; + +try { + program + .command('fail') + .alias('fail'); +} catch (e) { + error = e; +} + +error.should.deepEqual(new Error('Command alias can\'t be the same as its name')); From b92a7c60aa804650167c3597b619849432c213e2 Mon Sep 17 00:00:00 2001 From: sunorry Date: Thu, 10 Aug 2017 19:52:47 +0800 Subject: [PATCH 031/108] Fix translation error --- Readme_zh-CN.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Readme_zh-CN.md b/Readme_zh-CN.md index f1f1efdaa..87c3a87d2 100644 --- a/Readme_zh-CN.md +++ b/Readme_zh-CN.md @@ -15,7 +15,7 @@ $ npm install commander ## 参数解析 - `.option()` 方法用来定义带选项的 commander,同时也作为这些选项的文档。下面的例子会解析来自 `progress.argv` 指定的参数和选项,没有匹配任何选项的参数将会放到 `program.args` 数组中。 + `.option()` 方法用来定义带选项的 commander,同时也作为这些选项的文档。下面的例子会解析来自 `process.argv` 指定的参数和选项,没有匹配任何选项的参数将会放到 `program.args` 数组中。 ```js #!/usr/bin/env node From d9abf56c43a93e9584e2e18a9f8fb5af552f738c Mon Sep 17 00:00:00 2001 From: "Jefts, Richard" Date: Wed, 30 Aug 2017 21:14:47 -0500 Subject: [PATCH 032/108] Print default value in option help --- index.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 675575dc4..efdd577c3 100644 --- a/index.js +++ b/index.js @@ -384,7 +384,10 @@ Command.prototype.option = function(flags, description, fn, defaultValue) { // when --no-* we make sure default is true if (false == option.bool) defaultValue = true; // preassign only if we have a default - if (undefined !== defaultValue) self[name] = defaultValue; + if (undefined !== defaultValue) { + self[name] = defaultValue; + option.defaultValue = defaultValue; + } } // register the option @@ -948,8 +951,9 @@ Command.prototype.optionHelp = function() { // Append the help information return this.options.map(function(option) { - return pad(option.flags, width) + ' ' + option.description; - }).concat([pad('-h, --help', width) + ' ' + 'output usage information']) + return pad(option.flags, width) + ' ' + option.description + + (option.defaultValue !== undefined ? ' (default: ' + option.defaultValue + ')' : ''); + }).concat([pad('-h, --help', width) + ' ' + 'output usage information']) .join('\n'); }; From 7a122e75ee2f2a4ef9e610aee5241d9b05f66bd0 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 28 Sep 2017 18:01:06 +0200 Subject: [PATCH 033/108] feat(typings): update to match js api --- typings/commander-tests.ts | 3 +++ typings/index.d.ts | 21 +++++++++------------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/typings/commander-tests.ts b/typings/commander-tests.ts index e4d68d3f5..cac93b584 100644 --- a/typings/commander-tests.ts +++ b/typings/commander-tests.ts @@ -7,6 +7,9 @@ interface ExtendedOptions extends program.CommandOptions { const commandInstance = new program.Command('-f'); const optionsInstance = new program.Option('-f'); +const name = program.name(); +const nameSecondary = program.name('set name'); + program .version('0.0.1') .option('-p, --peppers', 'Add peppers') diff --git a/typings/index.d.ts b/typings/index.d.ts index 2a5a85fbf..0c713a0b2 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for commander 2.9 +// Type definitions for commander 2.11 // Project: https://github.com/visionmedia/commander.js // Definitions by: Alan Agius , Marcelo Dezem , vvakame @@ -246,25 +246,22 @@ declare class Command extends NodeJS.EventEmitter { usage(): string; /** - * Get the name of the command. + * Get or set the name of the command. * - * @return {string} + * @param {string} str + * @return {string|Command} */ - name(): string; + name(str?: string): string | Command; /** * Output help information for this command. * - * @param {(str: string) => string} [cb] Callback method + * @param {() => void} [cb] Callback method */ - outputHelp(cb?: (str: string) => string): void; + outputHelp(cb?: () => void): void; - /** - * Output help information and exit. - * - * @param {(str: string) => string} [cb] Callback method - */ - help(cb?: (str: string) => string): void; + /** Output help information and exit. */ + help(): void; } declare namespace commander { From c5511a22fe17469643d045cead6729f15c8401f1 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 28 Sep 2017 18:23:25 +0200 Subject: [PATCH 034/108] typings: use overloads --- typings/commander-tests.ts | 2 +- typings/index.d.ts | 16 +++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/typings/commander-tests.ts b/typings/commander-tests.ts index cac93b584..474db4e87 100644 --- a/typings/commander-tests.ts +++ b/typings/commander-tests.ts @@ -8,9 +8,9 @@ const commandInstance = new program.Command('-f'); const optionsInstance = new program.Option('-f'); const name = program.name(); -const nameSecondary = program.name('set name'); program + .name('set name') .version('0.0.1') .option('-p, --peppers', 'Add peppers') .option('-P, --pineapple', 'Add pineapple') diff --git a/typings/index.d.ts b/typings/index.d.ts index 0c713a0b2..5c662822c 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -1,6 +1,5 @@ -// Type definitions for commander 2.11 // Project: https://github.com/visionmedia/commander.js -// Definitions by: Alan Agius , Marcelo Dezem , vvakame +// Definitions by: Alan Agius , Marcelo Dezem , vvakame declare class Option { flags: string; @@ -246,12 +245,19 @@ declare class Command extends NodeJS.EventEmitter { usage(): string; /** - * Get or set the name of the command. + * Set the name of the command. * * @param {string} str - * @return {string|Command} + * @return {Command} */ - name(str?: string): string | Command; + name(str: string): Command; + + /** + * Get the name of the command. + * + * @return {string} + */ + name(): string; /** * Output help information for this command. From 0ae835315a4ff9162c963eb2223c327fd9119996 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Sat, 30 Sep 2017 18:15:13 +0200 Subject: [PATCH 035/108] typings: `outputHelp` takes a string as the first parameter --- typings/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/typings/index.d.ts b/typings/index.d.ts index 5c662822c..f36f5a7c4 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -262,9 +262,9 @@ declare class Command extends NodeJS.EventEmitter { /** * Output help information for this command. * - * @param {() => void} [cb] Callback method + * @param {(str: string) => string} [cb] */ - outputHelp(cb?: () => void): void; + outputHelp(cb?: (str: string) => string): void; /** Output help information and exit. */ help(): void; From d359b75911aeaff2ed767d65b92944773691656d Mon Sep 17 00:00:00 2001 From: deepakpathania Date: Tue, 24 Oct 2017 11:54:00 +0530 Subject: [PATCH 036/108] Documentation updated for options with --no prefix --- Readme.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Readme.md b/Readme.md index acc40499e..acd31c616 100644 --- a/Readme.md +++ b/Readme.md @@ -44,6 +44,25 @@ console.log(' - %s cheese', program.cheese); Short flags may be passed as a single arg, for example `-abc` is equivalent to `-a -b -c`. Multi-word options such as "--template-engine" are camel-cased, becoming `program.templateEngine` etc. +Note that multi-word options starting with `--no` prefix negate the boolean value of the following word. For example, `--no-sauce` sets the value of `program.sauce` to false. + +```js +#!/usr/bin/env node + +/** + * Module dependencies. + */ + +var program = require('commander'); + +program + .option('--no-sauce', 'Remove sauce') + .parse(process.argv); + +console.log('you ordered a pizza'); +if (program.sauce) console.log(' with sauce'); +else console.log(' without sauce'); +``` ## Coercion From f226259008d935a0ca258b07d832b84fb183c586 Mon Sep 17 00:00:00 2001 From: Sergei Vizel Date: Tue, 7 Nov 2017 09:00:33 +0200 Subject: [PATCH 037/108] Arguments description --- index.js | 126 ++++++++++++++++++++++++++++++-------- test/test.command.help.js | 2 +- 2 files changed, 101 insertions(+), 27 deletions(-) diff --git a/index.js b/index.js index efdd577c3..8d8a79e6a 100644 --- a/index.js +++ b/index.js @@ -857,13 +857,15 @@ Command.prototype.version = function(str, flags) { * Set the description to `str`. * * @param {String} str + * @param {Object} argsDescription * @return {String|Command} * @api public */ -Command.prototype.description = function(str) { +Command.prototype.description = function(str, argsDescription) { if (0 === arguments.length) return this._description; this._description = str; + this._argsDescription = argsDescription; return this; }; @@ -926,6 +928,45 @@ Command.prototype.name = function(str) { return this; }; +/** + * Return prepared commands. + * + * @return {Array} + * @api private + */ + +Command.prototype.prepareCommands = function() { + return this.commands.filter(function(cmd) { + return !cmd._noHelp; + }).map(function(cmd) { + var args = cmd._args.map(function(arg) { + return humanReadableArgName(arg); + }).join(' '); + + return [ + cmd._name + + (cmd._alias ? '|' + cmd._alias : '') + + (cmd.options.length ? ' [options]' : '') + + ' ' + args + , cmd._description + ]; + }); +}; + +/** + * Return the largest command length. + * + * @return {Number} + * @api private + */ + +Command.prototype.largestCommandLength = function() { + var commands = this.prepareCommands(); + return commands.reduce(function(max, command) { + return Math.max(max, command[0].length); + }, 0); +}; + /** * Return the largest option length. * @@ -934,11 +975,52 @@ Command.prototype.name = function(str) { */ Command.prototype.largestOptionLength = function() { - return this.options.reduce(function(max, option) { + var options = [].slice.call(this.options); + options.push({ + flags: '-h, --help' + }); + return options.reduce(function(max, option) { return Math.max(max, option.flags.length); }, 0); }; +/** + * Return the largest arg length. + * + * @return {Number} + * @api private + */ + +Command.prototype.largestArgLength = function() { + return this._args.reduce(function(max, arg) { + return Math.max(max, arg.name.length); + }, 0); +}; + +/** + * Return the pad width. + * + * @return {Number} + * @api private + */ + +Command.prototype.padWidth = function() { + var width = this.largestOptionLength(); + if (this._argsDescription && this._args.length) { + if (this.largestArgLength() > width) { + width = this.largestArgLength(); + } + } + + if (this.commands && this.commands.length) { + if (this.largestCommandLength() > width) { + width = this.largestCommandLength(); + } + } + + return width; +}; + /** * Return help for options. * @@ -947,7 +1029,7 @@ Command.prototype.largestOptionLength = function() { */ Command.prototype.optionHelp = function() { - var width = this.largestOptionLength(); + var width = this.padWidth(); // Append the help information return this.options.map(function(option) { @@ -967,29 +1049,11 @@ Command.prototype.optionHelp = function() { Command.prototype.commandHelp = function() { if (!this.commands.length) return ''; - var commands = this.commands.filter(function(cmd) { - return !cmd._noHelp; - }).map(function(cmd) { - var args = cmd._args.map(function(arg) { - return humanReadableArgName(arg); - }).join(' '); - - return [ - cmd._name - + (cmd._alias ? '|' + cmd._alias : '') - + (cmd.options.length ? ' [options]' : '') - + ' ' + args - , cmd._description - ]; - }); - - var width = commands.reduce(function(max, command) { - return Math.max(max, command[0].length); - }, 0); + var commands = this.prepareCommands(); + var width = this.padWidth(); return [ - '' - , ' Commands:' + ' Commands:' , '' , commands.map(function(cmd) { var desc = cmd[1] ? ' ' + cmd[1] : ''; @@ -1013,6 +1077,17 @@ Command.prototype.helpInformation = function() { ' ' + this._description , '' ]; + + var argsDescription = this._argsDescription; + if (argsDescription && this._args.length) { + var width = this.padWidth(); + desc.push(' Arguments:'); + desc.push(''); + this._args.forEach(function(arg) { + desc.push(' ' + pad(arg.name, width) + ' ' + argsDescription[arg.name]); + }); + desc.push(''); + } } var cmdName = this._name; @@ -1030,8 +1105,7 @@ Command.prototype.helpInformation = function() { if (commandHelp) cmds = [commandHelp]; var options = [ - '' - , ' Options:' + ' Options:' , '' , '' + this.optionHelp().replace(/^/gm, ' ') , '' diff --git a/test/test.command.help.js b/test/test.command.help.js index 68973cde6..7b759ac25 100644 --- a/test/test.command.help.js +++ b/test/test.command.help.js @@ -7,4 +7,4 @@ program.command('mycommand [options]'); program.parse(['node', 'test']); -program.commandHelp().should.equal('\n Commands:\n\n mycommand [options]\n'); +program.commandHelp().should.equal(' Commands:\n\n mycommand [options]\n'); From 0060dde2f7323520cdfaeca01a1e92ca5202482c Mon Sep 17 00:00:00 2001 From: Yanick Champoux Date: Thu, 24 Aug 2017 18:03:58 -0400 Subject: [PATCH 038/108] add attributeName() method to Option objects Mostly because it should be possible to query what will be the `program` attribute name for a given option. As it was, the `camelcase` function was internal to the Option class and not accessible from the outside. --- index.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index efdd577c3..cb82f55b9 100644 --- a/index.js +++ b/index.js @@ -59,6 +59,18 @@ Option.prototype.name = function() { .replace('no-', ''); }; +/** + * Return option name, in a camelcase format that can be used + * as a object attribute key. + * + * @return {String} + * @api private + */ + +Option.prototype.attributeName = function() { + return camelcase( this.name() ); +}; + /** * Check if `arg` matches the short or long flag. * @@ -362,7 +374,7 @@ Command.prototype.option = function(flags, description, fn, defaultValue) { var self = this , option = new Option(flags, description) , oname = option.name() - , name = camelcase(oname); + , name = option.attributeName(); // default as 3rd arg if (typeof fn != 'function') { @@ -761,7 +773,7 @@ Command.prototype.opts = function() { , len = this.options.length; for (var i = 0 ; i < len; i++) { - var key = camelcase(this.options[i].name()); + var key = this.options[i].attributeName(); result[key] = key === 'version' ? this._version : this[key]; } return result; From 965188fd9631d7e44c7b7441f8cddbf0c7bc8e15 Mon Sep 17 00:00:00 2001 From: Jules Randolph Date: Sun, 12 Nov 2017 21:33:47 -0500 Subject: [PATCH 039/108] typedefs: Command and Option types added to commander namespace --- typings/index.d.ts | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/typings/index.d.ts b/typings/index.d.ts index f36f5a7c4..acdab44bb 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -1,7 +1,11 @@ +// Type definitions for commander 2.11 // Project: https://github.com/visionmedia/commander.js -// Definitions by: Alan Agius , Marcelo Dezem , vvakame +// Definitions by: Alan Agius , Marcelo Dezem , vvakame , Jules Randolph +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare class Option { +declare namespace local { + + class Option { flags: string; required: boolean; optional: boolean; @@ -17,9 +21,9 @@ declare class Option { * @param {string} [description] */ constructor(flags: string, description?: string); -} + } -declare class Command extends NodeJS.EventEmitter { + class Command extends NodeJS.EventEmitter { [key: string]: any; args: string[]; @@ -121,6 +125,7 @@ declare class Command extends NodeJS.EventEmitter { * @returns {Command} for chaining */ parseExpectedArgs(args: string[]): Command; + /** * Register callback `fn` for the command. * @@ -262,16 +267,22 @@ declare class Command extends NodeJS.EventEmitter { /** * Output help information for this command. * - * @param {(str: string) => string} [cb] + * @param {(str: string) => string} [cb] */ outputHelp(cb?: (str: string) => string): void; /** Output help information and exit. */ help(): void; + } + } declare namespace commander { + type Command = local.Command + + type Option = local.Option + interface CommandOptions { noHelp?: boolean; isDefault?: boolean; @@ -283,8 +294,8 @@ declare namespace commander { } interface CommanderStatic extends Command { - Command: typeof Command; - Option: typeof Option; + Command: typeof local.Command; + Option: typeof local.Option; CommandOptions: CommandOptions; ParseOptionsResult: ParseOptionsResult; } @@ -292,4 +303,4 @@ declare namespace commander { } declare const commander: commander.CommanderStatic; -export = commander; \ No newline at end of file +export = commander; From 498ce7187379efcd2b0f30da6abf8c88f9c0bfff Mon Sep 17 00:00:00 2001 From: abetomo Date: Tue, 21 Nov 2017 18:21:04 +0900 Subject: [PATCH 040/108] Update CI's Node.js to LTS and latest version --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index eac7b8a5b..782b1fae7 100755 --- a/.travis.yml +++ b/.travis.yml @@ -2,8 +2,7 @@ language: node_js sudo: false node_js: - "4" - - "5" - "6" - - "7" - "8" + - "9" - "node" From 7e22f38a09a0975ec2da2e0eda13cb7fdac370f0 Mon Sep 17 00:00:00 2001 From: abetomo Date: Wed, 22 Nov 2017 10:06:57 +0900 Subject: [PATCH 041/108] version bump 2.12.0 --- CHANGELOG.md | 18 ++++++++++++++++++ package-lock.json | 13 ++++++++++++- package.json | 6 +++--- 3 files changed, 33 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d60418ebd..213f04119 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,22 @@ +2.12.0 / 2017-11-22 +================== + + * add attributeName() method to Option objects + * Documentation updated for options with --no prefix + * typings: `outputHelp` takes a string as the first parameter + * typings: use overloads + * feat(typings): update to match js api + * Print default value in option help + * Fix translation error + * Fail when using same command and alias (#491) + * feat(typings): add help callback + * fix bug when description is add after command with options (#662) + * Format js code + * Rename History.md to CHANGELOG.md (#668) + * feat(typings): add typings to support TypeScript (#646) + * use current node + 2.11.0 / 2017-07-03 ================== diff --git a/package-lock.json b/package-lock.json index f2459508d..947381d89 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,9 +1,14 @@ { "name": "commander", - "version": "2.11.0", + "version": "2.12.0", "lockfileVersion": 1, "requires": true, "dependencies": { + "@types/node": { + "version": "7.0.48", + "resolved": "https://registry.npmjs.org/@types/node/-/node-7.0.48.tgz", + "integrity": "sha512-LLlXafM3BD52MH056tHxTXO8JFCnpJJQkdzIU3+m8ew+CXJY/5zIXgDNb4TK/QFvlI8QexLS5tL+sE0Qhegr1w==" + }, "diff": { "version": "https://registry.npmjs.org/diff/-/diff-3.2.0.tgz", "integrity": "sha1-yc45Okt8vQsFinJck98pkCeGj/k=", @@ -134,6 +139,12 @@ "version": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.0.tgz", "integrity": "sha1-YgU4g1QqMh8veyV0bcaWR4sY/2s=", "dev": true + }, + "typescript": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.6.1.tgz", + "integrity": "sha1-7znN6ierrAtQAkLWcmq5DgyEZjE=", + "dev": true } } } diff --git a/package.json b/package.json index 8cd9da652..64f323441 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "commander", - "version": "2.11.0", + "version": "2.12.0", "description": "the complete solution for node.js command-line programs", "keywords": [ "commander", @@ -23,12 +23,12 @@ "index.js" ], "dependencies": { - "@types/node": "^7.0.39" + "@types/node": "^7.0.48" }, "devDependencies": { "should": "^11.2.1", "sinon": "^2.3.5", - "typescript": "^2.4.1" + "typescript": "^2.6.1" }, "typings": "typings/index.d.ts" } From 245584e4a067959adadf855585e897a6382ad1fe Mon Sep 17 00:00:00 2001 From: chengkungui Date: Thu, 23 Nov 2017 15:07:47 +1100 Subject: [PATCH 042/108] Move @types/node to dev dependency cause duplicate require error when compile react native type script code --- package.json | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 64f323441..421d362af 100644 --- a/package.json +++ b/package.json @@ -22,13 +22,12 @@ "files": [ "index.js" ], - "dependencies": { - "@types/node": "^7.0.48" - }, + "dependencies": {}, "devDependencies": { "should": "^11.2.1", "sinon": "^2.3.5", - "typescript": "^2.6.1" + "typescript": "^2.6.1", + "@types/node": "^7.0.48" }, "typings": "typings/index.d.ts" } From 0a91554336c5bbda00c886d8cbe7abbd7708cbce Mon Sep 17 00:00:00 2001 From: abetomo Date: Thu, 23 Nov 2017 10:11:00 +0000 Subject: [PATCH 043/108] version bump 2.12.1 --- CHANGELOG.md | 5 ++ package-lock.json | 138 +++++++++++++++++++++++++--------------------- package.json | 8 +-- 3 files changed, 84 insertions(+), 67 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 213f04119..264b0f430 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ +2.12.1 / 2017-11-23 +================== + + * Move @types/node to dev dependency + 2.12.0 / 2017-11-22 ================== diff --git a/package-lock.json b/package-lock.json index 947381d89..0db6aea28 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,53 +1,13 @@ { "name": "commander", - "version": "2.12.0", + "version": "2.12.1", "lockfileVersion": 1, "requires": true, "dependencies": { "@types/node": { "version": "7.0.48", "resolved": "https://registry.npmjs.org/@types/node/-/node-7.0.48.tgz", - "integrity": "sha512-LLlXafM3BD52MH056tHxTXO8JFCnpJJQkdzIU3+m8ew+CXJY/5zIXgDNb4TK/QFvlI8QexLS5tL+sE0Qhegr1w==" - }, - "diff": { - "version": "https://registry.npmjs.org/diff/-/diff-3.2.0.tgz", - "integrity": "sha1-yc45Okt8vQsFinJck98pkCeGj/k=", - "dev": true - }, - "formatio": { - "version": "https://registry.npmjs.org/formatio/-/formatio-1.2.0.tgz", - "integrity": "sha1-87IWfZBoxGmKjVH092CjmlTYGOs=", - "dev": true, - "requires": { - "samsam": "https://registry.npmjs.org/samsam/-/samsam-1.2.1.tgz" - } - }, - "isarray": { - "version": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "lolex": { - "version": "https://registry.npmjs.org/lolex/-/lolex-1.6.0.tgz", - "integrity": "sha1-OpoCg0UqR9dDnnJzG54H1zhuSfY=", - "dev": true - }, - "native-promise-only": { - "version": "https://registry.npmjs.org/native-promise-only/-/native-promise-only-0.8.1.tgz", - "integrity": "sha1-IKMYwwy0X3H+et+/eyHJnBRy7xE=", - "dev": true - }, - "path-to-regexp": { - "version": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz", - "integrity": "sha1-Wf3g9DW62suhA6hOnTvGTpa5k30=", - "dev": true, - "requires": { - "isarray": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" - } - }, - "samsam": { - "version": "https://registry.npmjs.org/samsam/-/samsam-1.2.1.tgz", - "integrity": "sha1-7dOQk6MYQ3DLhZJDsr3yVefY6mc=", + "integrity": "sha512-LLlXafM3BD52MH056tHxTXO8JFCnpJJQkdzIU3+m8ew+CXJY/5zIXgDNb4TK/QFvlI8QexLS5tL+sE0Qhegr1w==", "dev": true }, "should": { @@ -115,31 +75,83 @@ "dev": true }, "sinon": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-2.3.5.tgz", - "integrity": "sha1-mi/A/41SbacW8wlTqixl1RiRf2w=", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-2.4.1.tgz", + "integrity": "sha512-vFTrO9Wt0ECffDYIPSP/E5bBugt0UjcBQOfQUMh66xzkyPEnhl/vM2LRZi2ajuTdkH07sA6DzrM6KvdvGIH8xw==", "dev": true, "requires": { - "diff": "https://registry.npmjs.org/diff/-/diff-3.2.0.tgz", - "formatio": "https://registry.npmjs.org/formatio/-/formatio-1.2.0.tgz", - "lolex": "https://registry.npmjs.org/lolex/-/lolex-1.6.0.tgz", - "native-promise-only": "https://registry.npmjs.org/native-promise-only/-/native-promise-only-0.8.1.tgz", - "path-to-regexp": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz", - "samsam": "https://registry.npmjs.org/samsam/-/samsam-1.2.1.tgz", - "text-encoding": "https://registry.npmjs.org/text-encoding/-/text-encoding-0.6.4.tgz", - "type-detect": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.0.tgz" + "diff": "3.4.0", + "formatio": "1.2.0", + "lolex": "1.6.0", + "native-promise-only": "0.8.1", + "path-to-regexp": "1.7.0", + "samsam": "1.3.0", + "text-encoding": "0.6.4", + "type-detect": "4.0.5" + }, + "dependencies": { + "diff": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.4.0.tgz", + "integrity": "sha512-QpVuMTEoJMF7cKzi6bvWhRulU1fZqZnvyVQgNhPaxxuTYwyjn/j1v9falseQ/uXWwPnO56RBfwtg4h/EQXmucA==", + "dev": true + }, + "formatio": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/formatio/-/formatio-1.2.0.tgz", + "integrity": "sha1-87IWfZBoxGmKjVH092CjmlTYGOs=", + "dev": true, + "requires": { + "samsam": "1.3.0" + } + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "lolex": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-1.6.0.tgz", + "integrity": "sha1-OpoCg0UqR9dDnnJzG54H1zhuSfY=", + "dev": true + }, + "native-promise-only": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/native-promise-only/-/native-promise-only-0.8.1.tgz", + "integrity": "sha1-IKMYwwy0X3H+et+/eyHJnBRy7xE=", + "dev": true + }, + "path-to-regexp": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz", + "integrity": "sha1-Wf3g9DW62suhA6hOnTvGTpa5k30=", + "dev": true, + "requires": { + "isarray": "0.0.1" + } + }, + "samsam": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/samsam/-/samsam-1.3.0.tgz", + "integrity": "sha512-1HwIYD/8UlOtFS3QO3w7ey+SdSDFE4HRNLZoZRYVQefrOY3l17epswImeB1ijgJFQJodIaHcwkp3r/myBjFVbg==", + "dev": true + }, + "text-encoding": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/text-encoding/-/text-encoding-0.6.4.tgz", + "integrity": "sha1-45mpgiV6J22uQou5KEXLcb3CbRk=", + "dev": true + }, + "type-detect": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.5.tgz", + "integrity": "sha512-N9IvkQslUGYGC24RkJk1ba99foK6TkwC2FHAEBlQFBP0RxQZS8ZpJuAZcwiY/w9ZJHFQb1aOXBI60OdxhTrwEQ==", + "dev": true + } } }, - "text-encoding": { - "version": "https://registry.npmjs.org/text-encoding/-/text-encoding-0.6.4.tgz", - "integrity": "sha1-45mpgiV6J22uQou5KEXLcb3CbRk=", - "dev": true - }, - "type-detect": { - "version": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.0.tgz", - "integrity": "sha1-YgU4g1QqMh8veyV0bcaWR4sY/2s=", - "dev": true - }, "typescript": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.6.1.tgz", diff --git a/package.json b/package.json index 421d362af..1969529cf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "commander", - "version": "2.12.0", + "version": "2.12.1", "description": "the complete solution for node.js command-line programs", "keywords": [ "commander", @@ -24,10 +24,10 @@ ], "dependencies": {}, "devDependencies": { + "@types/node": "^7.0.48", "should": "^11.2.1", - "sinon": "^2.3.5", - "typescript": "^2.6.1", - "@types/node": "^7.0.48" + "sinon": "^2.4.1", + "typescript": "^2.6.1" }, "typings": "typings/index.d.ts" } From 4fe657815a87de1f8c1f229544c86fcbf3fee96b Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Tue, 28 Nov 2017 06:59:04 +0100 Subject: [PATCH 044/108] fix: typings are not shipped --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 1969529cf..8961aa9ac 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,8 @@ }, "main": "index", "files": [ - "index.js" + "index.js", + "typings/index.d.ts" ], "dependencies": {}, "devDependencies": { From 451edf9d45adf5554029afff6b0cd4e804580dc5 Mon Sep 17 00:00:00 2001 From: abetomo Date: Tue, 28 Nov 2017 16:01:28 +0900 Subject: [PATCH 045/108] version bump 2.12.2 --- CHANGELOG.md | 5 +++++ package-lock.json | 8 ++++---- package.json | 4 ++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 264b0f430..e55813269 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ +2.12.2 / 2017-11-28 +================== + + * fix: typings are not shipped + 2.12.1 / 2017-11-23 ================== diff --git a/package-lock.json b/package-lock.json index 0db6aea28..d9f0ea033 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "commander", - "version": "2.12.1", + "version": "2.12.2", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -153,9 +153,9 @@ } }, "typescript": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.6.1.tgz", - "integrity": "sha1-7znN6ierrAtQAkLWcmq5DgyEZjE=", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.6.2.tgz", + "integrity": "sha1-PFtv1/beCRQmkCfwPAlGdY92c6Q=", "dev": true } } diff --git a/package.json b/package.json index 8961aa9ac..04b3c69b5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "commander", - "version": "2.12.1", + "version": "2.12.2", "description": "the complete solution for node.js command-line programs", "keywords": [ "commander", @@ -28,7 +28,7 @@ "@types/node": "^7.0.48", "should": "^11.2.1", "sinon": "^2.4.1", - "typescript": "^2.6.1" + "typescript": "^2.6.2" }, "typings": "typings/index.d.ts" } From ff712f1a7dcacc88e074c527f8ed9ed49d5617fa Mon Sep 17 00:00:00 2001 From: Dan Allen Date: Sat, 6 Jan 2018 01:10:58 -0700 Subject: [PATCH 046/108] remove trailing spaces in command help --- index.js | 4 ++-- test/test.command.help.js | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index cb82f55b9..7b679c5e6 100644 --- a/index.js +++ b/index.js @@ -990,7 +990,7 @@ Command.prototype.commandHelp = function() { cmd._name + (cmd._alias ? '|' + cmd._alias : '') + (cmd.options.length ? ' [options]' : '') - + ' ' + args + + (args ? ' ' + args : '') , cmd._description ]; }); @@ -1005,7 +1005,7 @@ Command.prototype.commandHelp = function() { , '' , commands.map(function(cmd) { var desc = cmd[1] ? ' ' + cmd[1] : ''; - return pad(cmd[0], width) + desc; + return (desc ? pad(cmd[0], width) : cmd[0]) + desc; }).join('\n').replace(/^/gm, ' ') , '' ].join('\n'); diff --git a/test/test.command.help.js b/test/test.command.help.js index 68973cde6..2e96144d7 100644 --- a/test/test.command.help.js +++ b/test/test.command.help.js @@ -3,8 +3,10 @@ var program = require('../') , should = require('should'); -program.command('mycommand [options]'); +program.command('bare'); + +program.commandHelp().should.equal('\n Commands:\n\n bare\n'); -program.parse(['node', 'test']); +program.command('mycommand [options]'); -program.commandHelp().should.equal('\n Commands:\n\n mycommand [options]\n'); +program.commandHelp().should.equal('\n Commands:\n\n bare\n mycommand [options]\n'); From f13ee188b6da1f5dfeeedc29761a2e86f7faa6a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Wed, 3 Jan 2018 14:05:51 -0800 Subject: [PATCH 047/108] Do not print default for --no- --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 7b679c5e6..710fff3dd 100644 --- a/index.js +++ b/index.js @@ -964,7 +964,7 @@ Command.prototype.optionHelp = function() { // Append the help information return this.options.map(function(option) { return pad(option.flags, width) + ' ' + option.description - + (option.defaultValue !== undefined ? ' (default: ' + option.defaultValue + ')' : ''); + + ((option.bool != false && option.defaultValue !== undefined) ? ' (default: ' + option.defaultValue + ')' : ''); }).concat([pad('-h, --help', width) + ' ' + 'output usage information']) .join('\n'); }; From 63f1ee92f1401f2444cc080add56915dd48c700c Mon Sep 17 00:00:00 2001 From: abetomo Date: Tue, 9 Jan 2018 10:50:56 +0900 Subject: [PATCH 048/108] version bump 2.13.0 --- CHANGELOG.md | 8 ++++++++ package-lock.json | 2 +- package.json | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e55813269..971f8f2e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,12 @@ +2.13.0 / 2018-01-09 +================== + + * Do not print default for --no- + * remove trailing spaces in command help + * Update CI's Node.js to LTS and latest version + * typedefs: Command and Option types added to commander namespace + 2.12.2 / 2017-11-28 ================== diff --git a/package-lock.json b/package-lock.json index d9f0ea033..1bdf3cf1e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "commander", - "version": "2.12.2", + "version": "2.13.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 04b3c69b5..0106d5644 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "commander", - "version": "2.12.2", + "version": "2.13.0", "description": "the complete solution for node.js command-line programs", "keywords": [ "commander", From ac337d180e7366dc4f7cdf4968cdb2e1c6dffa50 Mon Sep 17 00:00:00 2001 From: Dan Allen Date: Wed, 10 Jan 2018 23:52:13 -0700 Subject: [PATCH 049/108] document using options per command - document that options can be added to a command - document that command options are validated when the command is used - document that options are not validated if command has no action --- Readme.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Readme.md b/Readme.md index acd31c616..7dcdaf9fe 100644 --- a/Readme.md +++ b/Readme.md @@ -64,6 +64,27 @@ if (program.sauce) console.log(' with sauce'); else console.log(' without sauce'); ``` +## Command-specific options + +You can attach options to a command. + +```js +#!/usr/bin/env node + +var program = require('commander'); + +program + .command('rm ') + .option('-r, --recursive', 'Remove recursively') + .action(function (dir, cmd) { + console.log('remove ' + dir + (cmd.recursive ? ' recursively' : '')) + }) + +program.parse(process.argv) +``` + +A command's options are validated when the command is used. Any unknown options will be reported as an error. However, if an action-based command does not define an action, then the options are not validated. + ## Coercion ```js From 9cee32493282784de4158d595555fd460c1d0d8c Mon Sep 17 00:00:00 2001 From: Dan Allen Date: Thu, 18 Jan 2018 23:35:06 -0700 Subject: [PATCH 050/108] document how to override the version flag --- Readme.md | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/Readme.md b/Readme.md index 7dcdaf9fe..25c09af95 100644 --- a/Readme.md +++ b/Readme.md @@ -16,7 +16,7 @@ ## Option parsing - Options with commander are defined with the `.option()` method, also serving as documentation for the options. The example below parses args and options from `process.argv`, leaving remaining args as the `program.args` array which were not consumed by options. +Options with commander are defined with the `.option()` method, also serving as documentation for the options. The example below parses args and options from `process.argv`, leaving remaining args as the `program.args` array which were not consumed by options. ```js #!/usr/bin/env node @@ -42,7 +42,7 @@ if (program.bbqSauce) console.log(' - bbq'); console.log(' - %s cheese', program.cheese); ``` - Short flags may be passed as a single arg, for example `-abc` is equivalent to `-a -b -c`. Multi-word options such as "--template-engine" are camel-cased, becoming `program.templateEngine` etc. +Short flags may be passed as a single arg, for example `-abc` is equivalent to `-a -b -c`. Multi-word options such as "--template-engine" are camel-cased, becoming `program.templateEngine` etc. Note that multi-word options starting with `--no` prefix negate the boolean value of the following word. For example, `--no-sauce` sets the value of `program.sauce` to false. @@ -64,6 +64,23 @@ if (program.sauce) console.log(' with sauce'); else console.log(' without sauce'); ``` +## Version option + +Calling the `version` implicitly adds the `-V` and `--version` options to the command. +When either of these options is present, the command prints the version number and exits. + + $ ./examples/pizza -V + 0.0.1 + +If you want your program to respond to the `-v` option instead of the `-V` option, simply pass custom flags to the `version` method using the same syntax as the `option` method. + +```js +program + .version('0.0.1', '-v, --version') +``` + +Now the command will accept the `-v` option instead of the `-V` option. + ## Command-specific options You can attach options to a command. From 37359ee36ac816fafc309c84ca3777bd44a0bd22 Mon Sep 17 00:00:00 2001 From: Dan Allen Date: Thu, 18 Jan 2018 23:50:07 -0700 Subject: [PATCH 051/108] resolves #560 respect custom name for version option --- Readme.md | 2 +- index.js | 6 ++++-- test/test.options.version.custom.js | 20 ++++++++++++++++++++ test/test.options.version.js | 20 ++++++++++++++++++++ 4 files changed, 45 insertions(+), 3 deletions(-) create mode 100644 test/test.options.version.custom.js create mode 100644 test/test.options.version.js diff --git a/Readme.md b/Readme.md index 25c09af95..6a21b9009 100644 --- a/Readme.md +++ b/Readme.md @@ -79,7 +79,7 @@ program .version('0.0.1', '-v, --version') ``` -Now the command will accept the `-v` option instead of the `-V` option. +The version flags can be named anything, but the long option is required. ## Command-specific options diff --git a/index.js b/index.js index 710fff3dd..84e414b4f 100644 --- a/index.js +++ b/index.js @@ -774,7 +774,7 @@ Command.prototype.opts = function() { for (var i = 0 ; i < len; i++) { var key = this.options[i].attributeName(); - result[key] = key === 'version' ? this._version : this[key]; + result[key] = key === this._versionOptionName ? this._version : this[key]; } return result; }; @@ -857,8 +857,10 @@ Command.prototype.version = function(str, flags) { if (0 == arguments.length) return this._version; this._version = str; flags = flags || '-V, --version'; + var longOptIndex = flags.indexOf('--') + this._versionOptionName = ~longOptIndex ? flags.substr(longOptIndex + 2) : 'version' this.option(flags, 'output the version number'); - this.on('option:version', function() { + this.on('option:' + this._versionOptionName, function() { process.stdout.write(str + '\n'); process.exit(0); }); diff --git a/test/test.options.version.custom.js b/test/test.options.version.custom.js new file mode 100644 index 000000000..9b7d256f8 --- /dev/null +++ b/test/test.options.version.custom.js @@ -0,0 +1,20 @@ +var program = require('../') + , should = require('should'); + +var capturedExitCode, capturedOutput, oldProcessExit, oldProcessStdoutWrite; + +program.version('0.0.1', '-r, --revision'); + +['-r', '--revision'].forEach(function (flag) { + capturedExitCode = -1; + capturedOutput = ''; + oldProcessExit = process.exit; + oldProcessStdoutWrite = process.stdout.write; + process.exit = function (code) { capturedExitCode = code; } + process.stdout.write = function(output) { capturedOutput += output; } + program.parse(['node', 'test', flag]); + process.exit = oldProcessExit; + process.stdout.write = oldProcessStdoutWrite; + capturedOutput.should.equal('0.0.1\n'); + capturedExitCode.should.equal(0); +}) diff --git a/test/test.options.version.js b/test/test.options.version.js new file mode 100644 index 000000000..ae25e84fe --- /dev/null +++ b/test/test.options.version.js @@ -0,0 +1,20 @@ +var program = require('../') + , should = require('should'); + +var capturedExitCode, capturedOutput, oldProcessExit, oldProcessStdoutWrite; + +program.version('0.0.1'); + +['-V', '--version'].forEach(function (flag) { + capturedExitCode = -1; + capturedOutput = ''; + oldProcessExit = process.exit; + oldProcessStdoutWrite = process.stdout.write; + process.exit = function (code) { capturedExitCode = code; } + process.stdout.write = function(output) { capturedOutput += output; } + program.parse(['node', 'test', flag]); + process.exit = oldProcessExit; + process.stdout.write = oldProcessStdoutWrite; + capturedOutput.should.equal('0.0.1\n'); + capturedExitCode.should.equal(0); +}) From 4c9b4b8ee608f6f3bdcaf3674cf26700f999722f Mon Sep 17 00:00:00 2001 From: Dan Allen Date: Mon, 22 Jan 2018 23:50:44 -0700 Subject: [PATCH 052/108] resolves #754 add linter configuration to project - add linter configuration based on StandardJS - customize linter to fit with style of project - update source to reconcile violations - inherit using util.inherits; must be add top of file for node 4 --- .eslintrc | 9 + .travis.yml | 13 +- index.js | 181 +++-- package-lock.json | 1833 ++++++++++++++++++++++++++++++++++++++++++--- package.json | 3 + 5 files changed, 1850 insertions(+), 189 deletions(-) create mode 100644 .eslintrc diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 000000000..fea95e0ee --- /dev/null +++ b/.eslintrc @@ -0,0 +1,9 @@ +{ + "extends": "standard", + "rules": { + "eqeqeq": "off", + "one-var": "off", + "semi": ["error", "always", { "omitLastInOneLineBlock": true }], + "space-before-function-paren": ["error", "never"], + } +} diff --git a/.travis.yml b/.travis.yml index 782b1fae7..3eda82b4a 100755 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,11 @@ language: node_js sudo: false node_js: - - "4" - - "6" - - "8" - - "9" - - "node" +- "4" +- "6" +- "8" +- "9" +before_install: if [[ $(node -v) == v4* && $(npm -v) != 3* ]]; then npm i -g npm@3; fi +script: +- npm run lint +- npm test diff --git a/index.js b/index.js index 710fff3dd..d30cf7100 100644 --- a/index.js +++ b/index.js @@ -9,6 +9,12 @@ var dirname = path.dirname; var basename = path.basename; var fs = require('fs'); +/** + * Inherit `Command` from `EventEmitter.prototype`. + */ + +require('util').inherits(Command, EventEmitter); + /** * Expose the root command. */ @@ -68,7 +74,7 @@ Option.prototype.name = function() { */ Option.prototype.attributeName = function() { - return camelcase( this.name() ); + return camelcase(this.name()); }; /** @@ -99,12 +105,6 @@ function Command(name) { this._name = name || ''; } -/** - * Inherit from `EventEmitter.prototype`. - */ - -Command.prototype.__proto__ = EventEmitter.prototype; - /** * Add command `name`. * @@ -167,7 +167,7 @@ Command.prototype.__proto__ = EventEmitter.prototype; */ Command.prototype.command = function(name, desc, opts) { - if(typeof desc === 'object' && desc !== null){ + if (typeof desc === 'object' && desc !== null) { opts = desc; desc = null; } @@ -196,7 +196,7 @@ Command.prototype.command = function(name, desc, opts) { * @api public */ -Command.prototype.arguments = function (desc) { +Command.prototype.arguments = function(desc) { return this.parseExpectedArgs(desc.split(/ +/)); }; @@ -292,7 +292,7 @@ Command.prototype.action = function(fn) { if (parsed.args.length) args = parsed.args.concat(args); self._args.forEach(function(arg, i) { - if (arg.required && null == args[i]) { + if (arg.required && args[i] == null) { self.missingArgument(arg.name); } else if (arg.variadic) { if (i !== self._args.length - 1) { @@ -371,10 +371,10 @@ Command.prototype.action = function(fn) { */ Command.prototype.option = function(flags, description, fn, defaultValue) { - var self = this - , option = new Option(flags, description) - , oname = option.name() - , name = option.attributeName(); + var self = this, + option = new Option(flags, description), + oname = option.name(), + name = option.attributeName(); // default as 3rd arg if (typeof fn != 'function') { @@ -383,18 +383,17 @@ Command.prototype.option = function(flags, description, fn, defaultValue) { fn = function(val, def) { var m = regex.exec(val); return m ? m[0] : def; - } - } - else { + }; + } else { defaultValue = fn; fn = null; } } // preassign default value only for --no-*, [optional], or - if (false == option.bool || option.optional || option.required) { + if (option.bool == false || option.optional || option.required) { // when --no-* we make sure default is true - if (false == option.bool) defaultValue = true; + if (option.bool == false) defaultValue = true; // preassign only if we have a default if (undefined !== defaultValue) { self[name] = defaultValue; @@ -409,21 +408,21 @@ Command.prototype.option = function(flags, description, fn, defaultValue) { // and conditionally invoke the callback this.on('option:' + oname, function(val) { // coercion - if (null !== val && fn) val = fn(val, undefined === self[name] - ? defaultValue - : self[name]); + if (val !== null && fn) { + val = fn(val, self[name] === undefined ? defaultValue : self[name]); + } // unassigned or bool - if ('boolean' == typeof self[name] || 'undefined' == typeof self[name]) { + if (typeof self[name] === 'boolean' || typeof self[name] === 'undefined') { // if no value, bool true, and we have a default, then use it! - if (null == val) { + if (val == null) { self[name] = option.bool ? defaultValue || true : false; } else { self[name] = val; } - } else if (null !== val) { + } else if (val !== null) { // reassign self[name] = val; } @@ -440,8 +439,8 @@ Command.prototype.option = function(flags, description, fn, defaultValue) { * @api public */ Command.prototype.allowUnknownOption = function(arg) { - this._allowUnknownOption = arguments.length === 0 || arg; - return this; + this._allowUnknownOption = arguments.length === 0 || arg; + return this; }; /** @@ -485,7 +484,7 @@ Command.prototype.parse = function(argv) { })[0]; } - if (this._execs[name] && typeof this._execs[name] != "function") { + if (this._execs[name] && typeof this._execs[name] != 'function') { return this.executeSubCommand(argv, args, parsed.unknown); } else if (aliasCommand) { // is alias of a subCommand @@ -513,10 +512,10 @@ Command.prototype.executeSubCommand = function(argv, args, unknown) { args = args.concat(unknown); if (!args.length) this.help(); - if ('help' == args[0] && 1 == args.length) this.help(); + if (args[0] == 'help' && args.length === 1) this.help(); // --help - if ('help' == args[0]) { + if (args[0] == 'help') { args[0] = args[1]; args[1] = '--help'; } @@ -526,15 +525,14 @@ Command.prototype.executeSubCommand = function(argv, args, unknown) { // name of the subcommand, link `pm-install` var bin = basename(f, '.js') + '-' + args[0]; - // In case of globally installed, get the base dir where executable // subcommand file should be located at - var baseDir - , link = fs.lstatSync(f).isSymbolicLink() ? fs.readlinkSync(f) : f; + var baseDir, + link = fs.lstatSync(f).isSymbolicLink() ? fs.readlinkSync(f) : f; // when symbolink is relative path if (link !== f && link.charAt(0) !== '/') { - link = path.join(dirname(f), link) + link = path.join(dirname(f), link); } baseDir = dirname(link); @@ -565,22 +563,22 @@ Command.prototype.executeSubCommand = function(argv, args, unknown) { } } else { args.unshift(bin); - proc = spawn(process.execPath, args, { stdio: 'inherit'}); + proc = spawn(process.execPath, args, { stdio: 'inherit' }); } var signals = ['SIGUSR1', 'SIGUSR2', 'SIGTERM', 'SIGINT', 'SIGHUP']; signals.forEach(function(signal) { - process.on(signal, function(){ - if ((proc.killed === false) && (proc.exitCode === null)){ + process.on(signal, function() { + if (proc.killed === false && proc.exitCode === null) { proc.kill(signal); } }); }); proc.on('close', process.exit.bind(process)); proc.on('error', function(err) { - if (err.code == "ENOENT") { + if (err.code == 'ENOENT') { console.error('\n %s(1) does not exist, try --help\n', bin); - } else if (err.code == "EACCES") { + } else if (err.code == 'EACCES') { console.error('\n %s(1) not executable. try chmod or run with root\n', bin); } process.exit(1); @@ -601,15 +599,15 @@ Command.prototype.executeSubCommand = function(argv, args, unknown) { */ Command.prototype.normalize = function(args) { - var ret = [] - , arg - , lastOpt - , index; + var ret = [], + arg, + lastOpt, + index; for (var i = 0, len = args.length; i < len; ++i) { arg = args[i]; if (i > 0) { - lastOpt = this.optionFor(args[i-1]); + lastOpt = this.optionFor(args[i - 1]); } if (arg === '--') { @@ -618,7 +616,7 @@ Command.prototype.normalize = function(args) { break; } else if (lastOpt && lastOpt.required) { ret.push(arg); - } else if (arg.length > 1 && '-' == arg[0] && '-' != arg[1]) { + } else if (arg.length > 1 && arg[0] == '-' && arg[1] != '-') { arg.slice(1).split('').forEach(function(c) { ret.push('-' + c); }); @@ -693,11 +691,11 @@ Command.prototype.optionFor = function(arg) { */ Command.prototype.parseOptions = function(argv) { - var args = [] - , len = argv.length - , literal - , option - , arg; + var args = [], + len = argv.length, + literal, + option, + arg; var unknownOptions = []; @@ -711,7 +709,7 @@ Command.prototype.parseOptions = function(argv) { continue; } - if ('--' == arg) { + if (arg == '--') { literal = true; continue; } @@ -724,12 +722,12 @@ Command.prototype.parseOptions = function(argv) { // requires arg if (option.required) { arg = argv[++i]; - if (null == arg) return this.optionMissingArgument(option); + if (arg == null) return this.optionMissingArgument(option); this.emit('option:' + option.name(), arg); // optional arg } else if (option.optional) { - arg = argv[i+1]; - if (null == arg || ('-' == arg[0] && '-' != arg)) { + arg = argv[i + 1]; + if (arg == null || (arg[0] == '-' && arg != '-')) { arg = null; } else { ++i; @@ -743,13 +741,13 @@ Command.prototype.parseOptions = function(argv) { } // looks like an option - if (arg.length > 1 && '-' == arg[0]) { + if (arg.length > 1 && arg[0] == '-') { unknownOptions.push(arg); // If the next argument looks like it might be // an argument for this option, we pass it on. // If it isn't, then it'll simply be ignored - if (argv[i+1] && '-' != argv[i+1][0]) { + if (argv[i + 1] && argv[i + 1][0] != '-') { unknownOptions.push(argv[++i]); } continue; @@ -769,10 +767,10 @@ Command.prototype.parseOptions = function(argv) { * @api public */ Command.prototype.opts = function() { - var result = {} - , len = this.options.length; + var result = {}, + len = this.options.length; - for (var i = 0 ; i < len; i++) { + for (var i = 0; i < len; i++) { var key = this.options[i].attributeName(); result[key] = key === 'version' ? this._version : this[key]; } @@ -854,7 +852,7 @@ Command.prototype.variadicArgNotLast = function(name) { */ Command.prototype.version = function(str, flags) { - if (0 == arguments.length) return this._version; + if (arguments.length === 0) return this._version; this._version = str; flags = flags || '-V, --version'; this.option(flags, 'output the version number'); @@ -874,7 +872,7 @@ Command.prototype.version = function(str, flags) { */ Command.prototype.description = function(str) { - if (0 === arguments.length) return this._description; + if (arguments.length === 0) return this._description; this._description = str; return this; }; @@ -889,8 +887,8 @@ Command.prototype.description = function(str) { Command.prototype.alias = function(alias) { var command = this; - if(this.commands.length !== 0) { - command = this.commands[this.commands.length - 1] + if (this.commands.length !== 0) { + command = this.commands[this.commands.length - 1]; } if (arguments.length === 0) return command._alias; @@ -914,11 +912,11 @@ Command.prototype.usage = function(str) { return humanReadableArgName(arg); }); - var usage = '[options]' - + (this.commands.length ? ' [command]' : '') - + (this._args.length ? ' ' + args.join(' ') : ''); + var usage = '[options]' + + (this.commands.length ? ' [command]' : '') + + (this._args.length ? ' ' + args.join(' ') : ''); - if (0 == arguments.length) return this._usage || usage; + if (arguments.length === 0) return this._usage || usage; this._usage = str; return this; @@ -933,7 +931,7 @@ Command.prototype.usage = function(str) { */ Command.prototype.name = function(str) { - if (0 === arguments.length) return this._name; + if (arguments.length === 0) return this._name; this._name = str; return this; }; @@ -963,8 +961,8 @@ Command.prototype.optionHelp = function() { // Append the help information return this.options.map(function(option) { - return pad(option.flags, width) + ' ' + option.description - + ((option.bool != false && option.defaultValue !== undefined) ? ' (default: ' + option.defaultValue + ')' : ''); + return pad(option.flags, width) + ' ' + option.description + + ((option.bool != false && option.defaultValue !== undefined) ? ' (default: ' + option.defaultValue + ')' : ''); }).concat([pad('-h, --help', width) + ' ' + 'output usage information']) .join('\n'); }; @@ -987,11 +985,11 @@ Command.prototype.commandHelp = function() { }).join(' '); return [ - cmd._name - + (cmd._alias ? '|' + cmd._alias : '') - + (cmd.options.length ? ' [options]' : '') - + (args ? ' ' + args : '') - , cmd._description + cmd._name + + (cmd._alias ? '|' + cmd._alias : '') + + (cmd.options.length ? ' [options]' : '') + + (args ? ' ' + args : ''), + cmd._description ]; }); @@ -1000,14 +998,14 @@ Command.prototype.commandHelp = function() { }, 0); return [ - '' - , ' Commands:' - , '' - , commands.map(function(cmd) { + '', + ' Commands:', + '', + commands.map(function(cmd) { var desc = cmd[1] ? ' ' + cmd[1] : ''; return (desc ? pad(cmd[0], width) : cmd[0]) + desc; - }).join('\n').replace(/^/gm, ' ') - , '' + }).join('\n').replace(/^/gm, ' '), + '' ].join('\n'); }; @@ -1022,8 +1020,8 @@ Command.prototype.helpInformation = function() { var desc = []; if (this._description) { desc = [ - ' ' + this._description - , '' + ' ' + this._description, + '' ]; } @@ -1032,9 +1030,9 @@ Command.prototype.helpInformation = function() { cmdName = cmdName + '|' + this._alias; } var usage = [ + '', + ' Usage: ' + cmdName + ' ' + this.usage(), '' - ,' Usage: ' + cmdName + ' ' + this.usage() - , '' ]; var cmds = []; @@ -1042,11 +1040,11 @@ Command.prototype.helpInformation = function() { if (commandHelp) cmds = [commandHelp]; var options = [ + '', + ' Options:', + '', + '' + this.optionHelp().replace(/^/gm, ' '), '' - , ' Options:' - , '' - , '' + this.optionHelp().replace(/^/gm, ' ') - , '' ]; return usage @@ -1066,7 +1064,7 @@ Command.prototype.outputHelp = function(cb) { if (!cb) { cb = function(passthru) { return passthru; - } + }; } process.stdout.write(cb(this.helpInformation())); this.emit('--help'); @@ -1142,7 +1140,7 @@ function humanReadableArgName(arg) { return arg.required ? '<' + nameOutput + '>' - : '[' + nameOutput + ']' + : '[' + nameOutput + ']'; } // for versions before node v0.8 when there weren't `fs.existsSync` @@ -1155,4 +1153,3 @@ function exists(file) { return false; } } - diff --git a/package-lock.json b/package-lock.json index 1bdf3cf1e..3979e4f9b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,11 +5,1502 @@ "requires": true, "dependencies": { "@types/node": { - "version": "7.0.48", - "resolved": "https://registry.npmjs.org/@types/node/-/node-7.0.48.tgz", - "integrity": "sha512-LLlXafM3BD52MH056tHxTXO8JFCnpJJQkdzIU3+m8ew+CXJY/5zIXgDNb4TK/QFvlI8QexLS5tL+sE0Qhegr1w==", + "version": "7.0.52", + "resolved": "https://registry.npmjs.org/@types/node/-/node-7.0.52.tgz", + "integrity": "sha512-jjpyQsKGsOF/wUElNjfPULk+d8PKvJOIXk3IUeBYYmNCy5dMWfrI+JiixYNw8ppKOlcRwWTXFl0B+i5oGrf95Q==", "dev": true }, + "acorn": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.3.0.tgz", + "integrity": "sha512-Yej+zOJ1Dm/IMZzzj78OntP/r3zHEaKcyNoU2lAaxPtrseM6rF0xwqoz5Q5ysAiED9hTjI2hgtvLXitlCN1/Ug==", + "dev": true + }, + "acorn-jsx": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz", + "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", + "dev": true, + "requires": { + "acorn": "3.3.0" + }, + "dependencies": { + "acorn": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", + "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", + "dev": true + } + } + }, + "ajv": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", + "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", + "dev": true, + "requires": { + "co": "4.6.0", + "json-stable-stringify": "1.0.1" + } + }, + "ajv-keywords": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-1.5.1.tgz", + "integrity": "sha1-MU3QpLM2j609/NxU7eYXG4htrzw=", + "dev": true + }, + "ansi-escapes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", + "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=", + "dev": true + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "argparse": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz", + "integrity": "sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY=", + "dev": true, + "requires": { + "sprintf-js": "1.0.3" + } + }, + "array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "dev": true, + "requires": { + "array-uniq": "1.0.3" + } + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true + }, + "array.prototype.find": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/array.prototype.find/-/array.prototype.find-2.0.4.tgz", + "integrity": "sha1-VWpcU2LAhkgyPdrrnenRS8GGTJA=", + "dev": true, + "requires": { + "define-properties": "1.1.2", + "es-abstract": "1.10.0" + } + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "esutils": "2.0.2", + "js-tokens": "3.0.2" + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "brace-expansion": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", + "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", + "dev": true, + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true + }, + "caller-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", + "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", + "dev": true, + "requires": { + "callsites": "0.2.0" + } + }, + "callsites": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", + "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "circular-json": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", + "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==", + "dev": true + }, + "cli-cursor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", + "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", + "dev": true, + "requires": { + "restore-cursor": "1.0.1" + } + }, + "cli-width": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "dev": true + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "dev": true + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "concat-stream": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz", + "integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.3.3", + "typedarray": "0.0.6" + } + }, + "contains-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", + "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "d": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", + "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", + "dev": true, + "requires": { + "es5-ext": "0.10.38" + } + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "debug-log": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/debug-log/-/debug-log-1.0.1.tgz", + "integrity": "sha1-IwdjLUwEOCuN+KMvcLiVBG1SdF8=", + "dev": true + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "define-properties": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", + "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", + "dev": true, + "requires": { + "foreach": "2.0.5", + "object-keys": "1.0.11" + } + }, + "deglob": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/deglob/-/deglob-2.1.0.tgz", + "integrity": "sha1-TUSr4W7zLHebSXK9FBqAMlApoUo=", + "dev": true, + "requires": { + "find-root": "1.1.0", + "glob": "7.1.2", + "ignore": "3.3.7", + "pkg-config": "1.1.1", + "run-parallel": "1.1.6", + "uniq": "1.0.1" + } + }, + "del": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", + "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", + "dev": true, + "requires": { + "globby": "5.0.0", + "is-path-cwd": "1.0.0", + "is-path-in-cwd": "1.0.0", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "rimraf": "2.6.2" + } + }, + "diff": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.4.0.tgz", + "integrity": "sha512-QpVuMTEoJMF7cKzi6bvWhRulU1fZqZnvyVQgNhPaxxuTYwyjn/j1v9falseQ/uXWwPnO56RBfwtg4h/EQXmucA==", + "dev": true + }, + "doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "requires": { + "esutils": "2.0.2" + } + }, + "error-ex": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", + "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", + "dev": true, + "requires": { + "is-arrayish": "0.2.1" + } + }, + "es-abstract": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.10.0.tgz", + "integrity": "sha512-/uh/DhdqIOSkAWifU+8nG78vlQxdLckUdI/sPgy0VhuXi2qJ7T8czBmqIYtLQVpCIFYafChnsRsB5pyb1JdmCQ==", + "dev": true, + "requires": { + "es-to-primitive": "1.1.1", + "function-bind": "1.1.1", + "has": "1.0.1", + "is-callable": "1.1.3", + "is-regex": "1.0.4" + } + }, + "es-to-primitive": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz", + "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", + "dev": true, + "requires": { + "is-callable": "1.1.3", + "is-date-object": "1.0.1", + "is-symbol": "1.0.1" + } + }, + "es5-ext": { + "version": "0.10.38", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.38.tgz", + "integrity": "sha512-jCMyePo7AXbUESwbl8Qi01VSH2piY9s/a3rSU/5w/MlTIx8HPL1xn2InGN8ejt/xulcJgnTO7vqNtOAxzYd2Kg==", + "dev": true, + "requires": { + "es6-iterator": "2.0.3", + "es6-symbol": "3.1.1" + } + }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "dev": true, + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.38", + "es6-symbol": "3.1.1" + } + }, + "es6-map": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz", + "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=", + "dev": true, + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.38", + "es6-iterator": "2.0.3", + "es6-set": "0.1.5", + "es6-symbol": "3.1.1", + "event-emitter": "0.3.5" + } + }, + "es6-set": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz", + "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=", + "dev": true, + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.38", + "es6-iterator": "2.0.3", + "es6-symbol": "3.1.1", + "event-emitter": "0.3.5" + } + }, + "es6-symbol": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", + "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", + "dev": true, + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.38" + } + }, + "es6-weak-map": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz", + "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=", + "dev": true, + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.38", + "es6-iterator": "2.0.3", + "es6-symbol": "3.1.1" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "escope": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz", + "integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=", + "dev": true, + "requires": { + "es6-map": "0.1.5", + "es6-weak-map": "2.0.2", + "esrecurse": "4.2.0", + "estraverse": "4.2.0" + } + }, + "eslint": { + "version": "3.19.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-3.19.0.tgz", + "integrity": "sha1-yPxiAcf0DdCJQbh8CFdnOGpnmsw=", + "dev": true, + "requires": { + "babel-code-frame": "6.26.0", + "chalk": "1.1.3", + "concat-stream": "1.6.0", + "debug": "2.6.9", + "doctrine": "2.1.0", + "escope": "3.6.0", + "espree": "3.5.2", + "esquery": "1.0.0", + "estraverse": "4.2.0", + "esutils": "2.0.2", + "file-entry-cache": "2.0.0", + "glob": "7.1.2", + "globals": "9.18.0", + "ignore": "3.3.7", + "imurmurhash": "0.1.4", + "inquirer": "0.12.0", + "is-my-json-valid": "2.17.1", + "is-resolvable": "1.1.0", + "js-yaml": "3.10.0", + "json-stable-stringify": "1.0.1", + "levn": "0.3.0", + "lodash": "4.17.4", + "mkdirp": "0.5.1", + "natural-compare": "1.4.0", + "optionator": "0.8.2", + "path-is-inside": "1.0.2", + "pluralize": "1.2.1", + "progress": "1.1.8", + "require-uncached": "1.0.3", + "shelljs": "0.7.8", + "strip-bom": "3.0.0", + "strip-json-comments": "2.0.1", + "table": "3.8.3", + "text-table": "0.2.0", + "user-home": "2.0.0" + } + }, + "eslint-config-standard": { + "version": "10.2.1", + "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-10.2.1.tgz", + "integrity": "sha1-wGHk0GbzedwXzVYsZOgZtN1FRZE=", + "dev": true + }, + "eslint-config-standard-jsx": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/eslint-config-standard-jsx/-/eslint-config-standard-jsx-4.0.2.tgz", + "integrity": "sha512-F8fRh2WFnTek7dZH9ZaE0PCBwdVGkwVWZmizla/DDNOmg7Tx6B/IlK5+oYpiX29jpu73LszeJj5i1axEZv6VMw==", + "dev": true + }, + "eslint-import-resolver-node": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.2.3.tgz", + "integrity": "sha1-Wt2BBujJKNssuiMrzZ76hG49oWw=", + "dev": true, + "requires": { + "debug": "2.6.9", + "object-assign": "4.1.1", + "resolve": "1.5.0" + } + }, + "eslint-module-utils": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.1.1.tgz", + "integrity": "sha512-jDI/X5l/6D1rRD/3T43q8Qgbls2nq5km5KSqiwlyUbGo5+04fXhMKdCPhjwbqAa6HXWaMxj8Q4hQDIh7IadJQw==", + "dev": true, + "requires": { + "debug": "2.6.9", + "pkg-dir": "1.0.0" + } + }, + "eslint-plugin-import": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.2.0.tgz", + "integrity": "sha1-crowb60wXWfEgWNIpGmaQimsi04=", + "dev": true, + "requires": { + "builtin-modules": "1.1.1", + "contains-path": "0.1.0", + "debug": "2.6.9", + "doctrine": "1.5.0", + "eslint-import-resolver-node": "0.2.3", + "eslint-module-utils": "2.1.1", + "has": "1.0.1", + "lodash.cond": "4.5.2", + "minimatch": "3.0.4", + "pkg-up": "1.0.0" + }, + "dependencies": { + "doctrine": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", + "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", + "dev": true, + "requires": { + "esutils": "2.0.2", + "isarray": "1.0.0" + } + } + } + }, + "eslint-plugin-node": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-4.2.3.tgz", + "integrity": "sha512-vIUQPuwbVYdz/CYnlTLsJrRy7iXHQjdEe5wz0XhhdTym3IInM/zZLlPf9nZ2mThsH0QcsieCOWs2vOeCy/22LQ==", + "dev": true, + "requires": { + "ignore": "3.3.7", + "minimatch": "3.0.4", + "object-assign": "4.1.1", + "resolve": "1.5.0", + "semver": "5.3.0" + } + }, + "eslint-plugin-promise": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-3.5.0.tgz", + "integrity": "sha1-ePu2/+BHIBYnVp6FpsU3OvKmj8o=", + "dev": true + }, + "eslint-plugin-react": { + "version": "6.10.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-6.10.3.tgz", + "integrity": "sha1-xUNb6wZ3ThLH2y9qut3L+QDNP3g=", + "dev": true, + "requires": { + "array.prototype.find": "2.0.4", + "doctrine": "1.5.0", + "has": "1.0.1", + "jsx-ast-utils": "1.4.1", + "object.assign": "4.1.0" + }, + "dependencies": { + "doctrine": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", + "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", + "dev": true, + "requires": { + "esutils": "2.0.2", + "isarray": "1.0.0" + } + } + } + }, + "eslint-plugin-standard": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-3.0.1.tgz", + "integrity": "sha1-NNDJFbRe3G8BA5PH7vOCOwhWXPI=", + "dev": true + }, + "espree": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.2.tgz", + "integrity": "sha512-sadKeYwaR/aJ3stC2CdvgXu1T16TdYN+qwCpcWbMnGJ8s0zNWemzrvb2GbD4OhmJ/fwpJjudThAlLobGbWZbCQ==", + "dev": true, + "requires": { + "acorn": "5.3.0", + "acorn-jsx": "3.0.1" + } + }, + "esprima": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", + "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==", + "dev": true + }, + "esquery": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.0.tgz", + "integrity": "sha1-z7qLV9f7qT8XKYqKAGoEzaE9gPo=", + "dev": true, + "requires": { + "estraverse": "4.2.0" + } + }, + "esrecurse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.0.tgz", + "integrity": "sha1-+pVo2Y04I/mkHZHpAtyrnqblsWM=", + "dev": true, + "requires": { + "estraverse": "4.2.0", + "object-assign": "4.1.1" + } + }, + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "dev": true + }, + "esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "dev": true + }, + "event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", + "dev": true, + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.38" + } + }, + "exit-hook": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz", + "integrity": "sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g=", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "figures": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", + "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "dev": true, + "requires": { + "escape-string-regexp": "1.0.5", + "object-assign": "4.1.1" + } + }, + "file-entry-cache": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", + "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", + "dev": true, + "requires": { + "flat-cache": "1.3.0", + "object-assign": "4.1.1" + } + }, + "find-root": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", + "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==", + "dev": true + }, + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "2.1.0", + "pinkie-promise": "2.0.1" + } + }, + "flat-cache": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.0.tgz", + "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", + "dev": true, + "requires": { + "circular-json": "0.3.3", + "del": "2.2.2", + "graceful-fs": "4.1.11", + "write": "0.2.1" + } + }, + "foreach": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", + "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=", + "dev": true + }, + "formatio": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/formatio/-/formatio-1.2.0.tgz", + "integrity": "sha1-87IWfZBoxGmKjVH092CjmlTYGOs=", + "dev": true, + "requires": { + "samsam": "1.3.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "generate-function": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz", + "integrity": "sha1-aFj+fAlpt9TpCTM3ZHrHn2DfvnQ=", + "dev": true + }, + "generate-object-property": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz", + "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=", + "dev": true, + "requires": { + "is-property": "1.0.2" + } + }, + "get-stdin": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-5.0.1.tgz", + "integrity": "sha1-Ei4WFZHiH/TFJTAwVpPyDmOTo5g=", + "dev": true + }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "dev": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "globals": { + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", + "dev": true + }, + "globby": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", + "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", + "dev": true, + "requires": { + "array-union": "1.0.2", + "arrify": "1.0.1", + "glob": "7.1.2", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, + "has": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz", + "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=", + "dev": true, + "requires": { + "function-bind": "1.1.1" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "has-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", + "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", + "dev": true + }, + "ignore": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.7.tgz", + "integrity": "sha512-YGG3ejvBNHRqu0559EOxxNFihD0AjpvHlC/pdGKd3X3ofe+CoJkYazwNJYTNebqpPKN+VVQbh4ZFn1DivMNuHA==", + "dev": true + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "inquirer": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-0.12.0.tgz", + "integrity": "sha1-HvK/1jUE3wvHV4X/+MLEHfEvB34=", + "dev": true, + "requires": { + "ansi-escapes": "1.4.0", + "ansi-regex": "2.1.1", + "chalk": "1.1.3", + "cli-cursor": "1.0.2", + "cli-width": "2.2.0", + "figures": "1.7.0", + "lodash": "4.17.4", + "readline2": "1.0.1", + "run-async": "0.1.0", + "rx-lite": "3.1.2", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "through": "2.3.8" + } + }, + "interpret": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", + "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=", + "dev": true + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-callable": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.3.tgz", + "integrity": "sha1-hut1OSgF3cM69xySoO7fdO52BLI=", + "dev": true + }, + "is-date-object": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", + "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-my-json-valid": { + "version": "2.17.1", + "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.17.1.tgz", + "integrity": "sha512-Q2khNw+oBlWuaYvEEHtKSw/pCxD2L5Rc1C+UQme9X6JdRDh7m5D7HkozA0qa3DUkQ6VzCnEm8mVIQPyIRkI5sQ==", + "dev": true, + "requires": { + "generate-function": "2.0.0", + "generate-object-property": "1.2.0", + "jsonpointer": "4.0.1", + "xtend": "4.0.1" + } + }, + "is-path-cwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", + "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=", + "dev": true + }, + "is-path-in-cwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz", + "integrity": "sha1-ZHdYK4IU1gI0YJRWcAO+ip6sBNw=", + "dev": true, + "requires": { + "is-path-inside": "1.0.1" + } + }, + "is-path-inside": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", + "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", + "dev": true, + "requires": { + "path-is-inside": "1.0.2" + } + }, + "is-property": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", + "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=", + "dev": true + }, + "is-regex": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", + "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "dev": true, + "requires": { + "has": "1.0.1" + } + }, + "is-resolvable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", + "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", + "dev": true + }, + "is-symbol": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.1.tgz", + "integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI=", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true + }, + "js-yaml": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.10.0.tgz", + "integrity": "sha512-O2v52ffjLa9VeM43J4XocZE//WT9N0IiwDa3KSHH7Tu8CtH+1qM8SIZvnsTh6v+4yFy5KUY3BHUVwjpfAWsjIA==", + "dev": true, + "requires": { + "argparse": "1.0.9", + "esprima": "4.0.0" + } + }, + "json-parse-better-errors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.1.tgz", + "integrity": "sha512-xyQpxeWWMKyJps9CuGJYeng6ssI5bpqS9ltQpdVQ90t4ql6NdnxFKh95JcRt2cun/DjMVNrdjniLPuMA69xmCw==", + "dev": true + }, + "json-stable-stringify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "dev": true, + "requires": { + "jsonify": "0.0.0" + } + }, + "jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", + "dev": true + }, + "jsonpointer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz", + "integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=", + "dev": true + }, + "jsx-ast-utils": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-1.4.1.tgz", + "integrity": "sha1-OGchPo3Xm/Ho8jAMDPwe+xgsDfE=", + "dev": true + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "1.1.2", + "type-check": "0.3.2" + } + }, + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "parse-json": "4.0.0", + "pify": "3.0.0", + "strip-bom": "3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "2.0.0", + "path-exists": "3.0.0" + }, + "dependencies": { + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + } + } + }, + "lodash": { + "version": "4.17.4", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=", + "dev": true + }, + "lodash.cond": { + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/lodash.cond/-/lodash.cond-4.5.2.tgz", + "integrity": "sha1-9HGh2khr5g9quVXRcRVSPdHSVdU=", + "dev": true + }, + "lolex": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-1.6.0.tgz", + "integrity": "sha1-OpoCg0UqR9dDnnJzG54H1zhuSfY=", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "1.1.8" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "mute-stream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.5.tgz", + "integrity": "sha1-j7+rsKmKJT0xhDMfno3rc3L6xsA=", + "dev": true + }, + "native-promise-only": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/native-promise-only/-/native-promise-only-0.8.1.tgz", + "integrity": "sha1-IKMYwwy0X3H+et+/eyHJnBRy7xE=", + "dev": true + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object-keys": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz", + "integrity": "sha1-xUYBd4rVYPEULODgG8yotW0TQm0=", + "dev": true + }, + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "dev": true, + "requires": { + "define-properties": "1.1.2", + "function-bind": "1.1.1", + "has-symbols": "1.0.0", + "object-keys": "1.0.11" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1.0.2" + } + }, + "onetime": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", + "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", + "dev": true + }, + "optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "dev": true, + "requires": { + "deep-is": "0.1.3", + "fast-levenshtein": "2.0.6", + "levn": "0.3.0", + "prelude-ls": "1.1.2", + "type-check": "0.3.2", + "wordwrap": "1.0.0" + } + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true + }, + "p-limit": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.2.0.tgz", + "integrity": "sha512-Y/OtIaXtUPr4/YpMv1pCL5L5ed0rumAaAeBSj12F+bSlMdys7i8oQF/GUJmfpTS/QoaRrS/k6pma29haJpsMng==", + "dev": true, + "requires": { + "p-try": "1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "1.2.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "1.3.1", + "json-parse-better-errors": "1.0.1" + } + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "2.0.1" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, + "path-parse": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", + "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=", + "dev": true + }, + "path-to-regexp": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz", + "integrity": "sha1-Wf3g9DW62suhA6hOnTvGTpa5k30=", + "dev": true, + "requires": { + "isarray": "0.0.1" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + } + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "2.0.4" + } + }, + "pkg-conf": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-2.1.0.tgz", + "integrity": "sha1-ISZRTKbyq/69FoWW3xi6V4Z/AFg=", + "dev": true, + "requires": { + "find-up": "2.1.0", + "load-json-file": "4.0.0" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "2.0.0" + } + } + } + }, + "pkg-config": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pkg-config/-/pkg-config-1.1.1.tgz", + "integrity": "sha1-VX7yLXPaPIg3EHdmxS6tq94pj+Q=", + "dev": true, + "requires": { + "debug-log": "1.0.1", + "find-root": "1.1.0", + "xtend": "4.0.1" + } + }, + "pkg-dir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-1.0.0.tgz", + "integrity": "sha1-ektQio1bstYp1EcFb/TpyTFM89Q=", + "dev": true, + "requires": { + "find-up": "1.1.2" + } + }, + "pkg-up": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-1.0.0.tgz", + "integrity": "sha1-Pgj7RhUlxEIWJKM7n35tCvWwWiY=", + "dev": true, + "requires": { + "find-up": "1.1.2" + } + }, + "pluralize": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-1.2.1.tgz", + "integrity": "sha1-0aIUg/0iu0HlihL6NCGCMUCJfEU=", + "dev": true + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", + "dev": true + }, + "progress": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/progress/-/progress-1.1.8.tgz", + "integrity": "sha1-4mDHj2Fhzdmw5WzD4Khd4Xx6V74=", + "dev": true + }, + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "1.0.2" + } + }, + "readline2": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/readline2/-/readline2-1.0.1.tgz", + "integrity": "sha1-QQWWCP/BVHV7cV2ZidGZ/783LjU=", + "dev": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "mute-stream": "0.0.5" + } + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "dev": true, + "requires": { + "resolve": "1.5.0" + } + }, + "require-uncached": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", + "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", + "dev": true, + "requires": { + "caller-path": "0.1.0", + "resolve-from": "1.0.1" + } + }, + "resolve": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz", + "integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==", + "dev": true, + "requires": { + "path-parse": "1.0.5" + } + }, + "resolve-from": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", + "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=", + "dev": true + }, + "restore-cursor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", + "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", + "dev": true, + "requires": { + "exit-hook": "1.1.1", + "onetime": "1.1.0" + } + }, + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "dev": true, + "requires": { + "glob": "7.1.2" + } + }, + "run-async": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-0.1.0.tgz", + "integrity": "sha1-yK1KXhEGYeQCp9IbUw4AnyX444k=", + "dev": true, + "requires": { + "once": "1.4.0" + } + }, + "run-parallel": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.6.tgz", + "integrity": "sha1-KQA8miFj4B4tLfyQV18sbB1hoDk=", + "dev": true + }, + "rx-lite": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-3.1.2.tgz", + "integrity": "sha1-Gc5QLKVyZl87ZHsQk5+X/RYV8QI=", + "dev": true + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", + "dev": true + }, + "samsam": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/samsam/-/samsam-1.3.0.tgz", + "integrity": "sha512-1HwIYD/8UlOtFS3QO3w7ey+SdSDFE4HRNLZoZRYVQefrOY3l17epswImeB1ijgJFQJodIaHcwkp3r/myBjFVbg==", + "dev": true + }, + "semver": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", + "dev": true + }, + "shelljs": { + "version": "0.7.8", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.7.8.tgz", + "integrity": "sha1-3svPh0sNHl+3LhSxZKloMEjprLM=", + "dev": true, + "requires": { + "glob": "7.1.2", + "interpret": "1.1.0", + "rechoir": "0.6.2" + } + }, "should": { "version": "11.2.1", "resolved": "https://registry.npmjs.org/should/-/should-11.2.1.tgz", @@ -19,53 +1510,43 @@ "should-equal": "1.0.1", "should-format": "3.0.3", "should-type": "1.4.0", - "should-type-adaptors": "1.0.1", + "should-type-adaptors": "1.1.0", "should-util": "1.0.0" - }, - "dependencies": { - "should-equal": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/should-equal/-/should-equal-1.0.1.tgz", - "integrity": "sha1-C26VFvJgGp+wuy3MNpr6HH4gCvc=", - "dev": true, - "requires": { - "should-type": "1.4.0" - } - }, - "should-format": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/should-format/-/should-format-3.0.3.tgz", - "integrity": "sha1-m/yPdPo5IFxT04w01xcwPidxJPE=", - "dev": true, - "requires": { - "should-type": "1.4.0", - "should-type-adaptors": "1.0.1" - } - }, - "should-type": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/should-type/-/should-type-1.4.0.tgz", - "integrity": "sha1-B1bYzoRt/QmEOmlHcZ36DUz/XPM=", - "dev": true - } } }, - "should-type-adaptors": { + "should-equal": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/should-type-adaptors/-/should-type-adaptors-1.0.1.tgz", - "integrity": "sha1-7+VVPN9oz/ZuXF9RtxLcNRx3vqo=", + "resolved": "https://registry.npmjs.org/should-equal/-/should-equal-1.0.1.tgz", + "integrity": "sha1-C26VFvJgGp+wuy3MNpr6HH4gCvc=", + "dev": true, + "requires": { + "should-type": "1.4.0" + } + }, + "should-format": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/should-format/-/should-format-3.0.3.tgz", + "integrity": "sha1-m/yPdPo5IFxT04w01xcwPidxJPE=", + "dev": true, + "requires": { + "should-type": "1.4.0", + "should-type-adaptors": "1.1.0" + } + }, + "should-type": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/should-type/-/should-type-1.4.0.tgz", + "integrity": "sha1-B1bYzoRt/QmEOmlHcZ36DUz/XPM=", + "dev": true + }, + "should-type-adaptors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/should-type-adaptors/-/should-type-adaptors-1.1.0.tgz", + "integrity": "sha512-JA4hdoLnN+kebEp2Vs8eBe9g7uy0zbRo+RMcU0EsNy+R+k049Ki+N5tT5Jagst2g7EAja+euFuoXFCa8vIklfA==", "dev": true, "requires": { "should-type": "1.4.0", "should-util": "1.0.0" - }, - "dependencies": { - "should-type": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/should-type/-/should-type-1.4.0.tgz", - "integrity": "sha1-B1bYzoRt/QmEOmlHcZ36DUz/XPM=", - "dev": true - } } }, "should-util": { @@ -87,76 +1568,244 @@ "path-to-regexp": "1.7.0", "samsam": "1.3.0", "text-encoding": "0.6.4", - "type-detect": "4.0.5" + "type-detect": "4.0.7" + } + }, + "slice-ansi": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz", + "integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU=", + "dev": true + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "standard": { + "version": "10.0.3", + "resolved": "https://registry.npmjs.org/standard/-/standard-10.0.3.tgz", + "integrity": "sha512-JURZ+85ExKLQULckDFijdX5WHzN6RC7fgiZNSV4jFQVo+3tPoQGHyBrGekye/yf0aOfb4210EM5qPNlc2cRh4w==", + "dev": true, + "requires": { + "eslint": "3.19.0", + "eslint-config-standard": "10.2.1", + "eslint-config-standard-jsx": "4.0.2", + "eslint-plugin-import": "2.2.0", + "eslint-plugin-node": "4.2.3", + "eslint-plugin-promise": "3.5.0", + "eslint-plugin-react": "6.10.3", + "eslint-plugin-standard": "3.0.1", + "standard-engine": "7.0.0" + } + }, + "standard-engine": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/standard-engine/-/standard-engine-7.0.0.tgz", + "integrity": "sha1-67d7nI/CyBZf+jU72Rug3/Qa9pA=", + "dev": true, + "requires": { + "deglob": "2.1.0", + "get-stdin": "5.0.1", + "minimist": "1.2.0", + "pkg-conf": "2.1.0" }, "dependencies": { - "diff": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.4.0.tgz", - "integrity": "sha512-QpVuMTEoJMF7cKzi6bvWhRulU1fZqZnvyVQgNhPaxxuTYwyjn/j1v9falseQ/uXWwPnO56RBfwtg4h/EQXmucA==", - "dev": true - }, - "formatio": { + "minimist": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/formatio/-/formatio-1.2.0.tgz", - "integrity": "sha1-87IWfZBoxGmKjVH092CjmlTYGOs=", - "dev": true, - "requires": { - "samsam": "1.3.0" - } - }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true - }, - "lolex": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/lolex/-/lolex-1.6.0.tgz", - "integrity": "sha1-OpoCg0UqR9dDnnJzG54H1zhuSfY=", + } + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + }, + "table": { + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/table/-/table-3.8.3.tgz", + "integrity": "sha1-K7xULw/amGGnVdOUf+/Ys/UThV8=", + "dev": true, + "requires": { + "ajv": "4.11.8", + "ajv-keywords": "1.5.1", + "chalk": "1.1.3", + "lodash": "4.17.4", + "slice-ansi": "0.0.4", + "string-width": "2.1.1" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "dev": true }, - "native-promise-only": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/native-promise-only/-/native-promise-only-0.8.1.tgz", - "integrity": "sha1-IKMYwwy0X3H+et+/eyHJnBRy7xE=", + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true }, - "path-to-regexp": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz", - "integrity": "sha1-Wf3g9DW62suhA6hOnTvGTpa5k30=", + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "isarray": "0.0.1" + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" } }, - "samsam": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/samsam/-/samsam-1.3.0.tgz", - "integrity": "sha512-1HwIYD/8UlOtFS3QO3w7ey+SdSDFE4HRNLZoZRYVQefrOY3l17epswImeB1ijgJFQJodIaHcwkp3r/myBjFVbg==", - "dev": true - }, - "text-encoding": { - "version": "0.6.4", - "resolved": "https://registry.npmjs.org/text-encoding/-/text-encoding-0.6.4.tgz", - "integrity": "sha1-45mpgiV6J22uQou5KEXLcb3CbRk=", - "dev": true - }, - "type-detect": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.5.tgz", - "integrity": "sha512-N9IvkQslUGYGC24RkJk1ba99foK6TkwC2FHAEBlQFBP0RxQZS8ZpJuAZcwiY/w9ZJHFQb1aOXBI60OdxhTrwEQ==", - "dev": true + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } } } }, + "text-encoding": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/text-encoding/-/text-encoding-0.6.4.tgz", + "integrity": "sha1-45mpgiV6J22uQou5KEXLcb3CbRk=", + "dev": true + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "1.1.2" + } + }, + "type-detect": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.7.tgz", + "integrity": "sha512-4Rh17pAMVdMWzktddFhISRnUnFIStObtUMNGzDwlA6w/77bmGv3aBbRdCmQR6IjzfkTo9otnW+2K/cDRhKSxDA==", + "dev": true + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, "typescript": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.6.2.tgz", "integrity": "sha1-PFtv1/beCRQmkCfwPAlGdY92c6Q=", "dev": true + }, + "uniq": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", + "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=", + "dev": true + }, + "user-home": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/user-home/-/user-home-2.0.0.tgz", + "integrity": "sha1-nHC/2Babwdy/SGBODwS4tJzenp8=", + "dev": true, + "requires": { + "os-homedir": "1.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "write": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", + "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", + "dev": true, + "requires": { + "mkdirp": "0.5.1" + } + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", + "dev": true } } } diff --git a/package.json b/package.json index 0106d5644..0b6eafd4f 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "url": "https://github.com/tj/commander.js.git" }, "scripts": { + "lint": "eslint index.js", "test": "make test && npm run test-typings", "test-typings": "node_modules/typescript/bin/tsc -p tsconfig.json" }, @@ -26,8 +27,10 @@ "dependencies": {}, "devDependencies": { "@types/node": "^7.0.48", + "eslint": "^3.19.0", "should": "^11.2.1", "sinon": "^2.4.1", + "standard": "^10.0.3", "typescript": "^2.6.2" }, "typings": "typings/index.d.ts" From cdb7a95541793bc3ddb676881b7d655b599f2246 Mon Sep 17 00:00:00 2001 From: Dan Allen Date: Wed, 24 Jan 2018 00:29:27 -0700 Subject: [PATCH 053/108] enable eqeqeq rule --- .eslintrc | 1 - index.js | 34 +++++++++++++++++----------------- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/.eslintrc b/.eslintrc index fea95e0ee..f3a6a3b85 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,7 +1,6 @@ { "extends": "standard", "rules": { - "eqeqeq": "off", "one-var": "off", "semi": ["error", "always", { "omitLastInOneLineBlock": true }], "space-before-function-paren": ["error", "never"], diff --git a/index.js b/index.js index d30cf7100..c4339a7b3 100644 --- a/index.js +++ b/index.js @@ -86,7 +86,7 @@ Option.prototype.attributeName = function() { */ Option.prototype.is = function(arg) { - return arg == this.short || arg == this.long; + return this.short === arg || this.long === arg; }; /** @@ -377,7 +377,7 @@ Command.prototype.option = function(flags, description, fn, defaultValue) { name = option.attributeName(); // default as 3rd arg - if (typeof fn != 'function') { + if (typeof fn !== 'function') { if (fn instanceof RegExp) { var regex = fn; fn = function(val, def) { @@ -391,11 +391,11 @@ Command.prototype.option = function(flags, description, fn, defaultValue) { } // preassign default value only for --no-*, [optional], or - if (option.bool == false || option.optional || option.required) { + if (!option.bool || option.optional || option.required) { // when --no-* we make sure default is true - if (option.bool == false) defaultValue = true; + if (!option.bool) defaultValue = true; // preassign only if we have a default - if (undefined !== defaultValue) { + if (defaultValue !== undefined) { self[name] = defaultValue; option.defaultValue = defaultValue; } @@ -484,7 +484,7 @@ Command.prototype.parse = function(argv) { })[0]; } - if (this._execs[name] && typeof this._execs[name] != 'function') { + if (this._execs[name] && typeof this._execs[name] !== 'function') { return this.executeSubCommand(argv, args, parsed.unknown); } else if (aliasCommand) { // is alias of a subCommand @@ -512,10 +512,10 @@ Command.prototype.executeSubCommand = function(argv, args, unknown) { args = args.concat(unknown); if (!args.length) this.help(); - if (args[0] == 'help' && args.length === 1) this.help(); + if (args[0] === 'help' && args.length === 1) this.help(); // --help - if (args[0] == 'help') { + if (args[0] === 'help') { args[0] = args[1]; args[1] = '--help'; } @@ -576,9 +576,9 @@ Command.prototype.executeSubCommand = function(argv, args, unknown) { }); proc.on('close', process.exit.bind(process)); proc.on('error', function(err) { - if (err.code == 'ENOENT') { + if (err.code === 'ENOENT') { console.error('\n %s(1) does not exist, try --help\n', bin); - } else if (err.code == 'EACCES') { + } else if (err.code === 'EACCES') { console.error('\n %s(1) not executable. try chmod or run with root\n', bin); } process.exit(1); @@ -616,7 +616,7 @@ Command.prototype.normalize = function(args) { break; } else if (lastOpt && lastOpt.required) { ret.push(arg); - } else if (arg.length > 1 && arg[0] == '-' && arg[1] != '-') { + } else if (arg.length > 1 && arg[0] === '-' && arg[1] !== '-') { arg.slice(1).split('').forEach(function(c) { ret.push('-' + c); }); @@ -709,7 +709,7 @@ Command.prototype.parseOptions = function(argv) { continue; } - if (arg == '--') { + if (arg === '--') { literal = true; continue; } @@ -727,7 +727,7 @@ Command.prototype.parseOptions = function(argv) { // optional arg } else if (option.optional) { arg = argv[i + 1]; - if (arg == null || (arg[0] == '-' && arg != '-')) { + if (arg == null || (arg[0] === '-' && arg !== '-')) { arg = null; } else { ++i; @@ -741,13 +741,13 @@ Command.prototype.parseOptions = function(argv) { } // looks like an option - if (arg.length > 1 && arg[0] == '-') { + if (arg.length > 1 && arg[0] === '-') { unknownOptions.push(arg); // If the next argument looks like it might be // an argument for this option, we pass it on. // If it isn't, then it'll simply be ignored - if (argv[i + 1] && argv[i + 1][0] != '-') { + if (argv[i + 1] && argv[i + 1][0] !== '-') { unknownOptions.push(argv[++i]); } continue; @@ -962,7 +962,7 @@ Command.prototype.optionHelp = function() { // Append the help information return this.options.map(function(option) { return pad(option.flags, width) + ' ' + option.description + - ((option.bool != false && option.defaultValue !== undefined) ? ' (default: ' + option.defaultValue + ')' : ''); + ((option.bool && option.defaultValue !== undefined) ? ' (default: ' + option.defaultValue + ')' : ''); }).concat([pad('-h, --help', width) + ' ' + 'output usage information']) .join('\n'); }; @@ -1120,7 +1120,7 @@ function pad(str, width) { function outputHelpIfNecessary(cmd, options) { options = options || []; for (var i = 0; i < options.length; i++) { - if (options[i] == '--help' || options[i] == '-h') { + if (options[i] === '--help' || options[i] === '-h') { cmd.outputHelp(); process.exit(0); } From f44fa3b63eb8f719ce9a8d99a6807d4a0b1e0156 Mon Sep 17 00:00:00 2001 From: Ben Sorohan Date: Mon, 4 Dec 2017 12:23:48 +0100 Subject: [PATCH 054/108] Add test for empty option on command Fixes #727 --- test/test.command.action.emptyOption.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 test/test.command.action.emptyOption.js diff --git a/test/test.command.action.emptyOption.js b/test/test.command.action.emptyOption.js new file mode 100644 index 000000000..33276754f --- /dev/null +++ b/test/test.command.action.emptyOption.js @@ -0,0 +1,20 @@ +/** + * Module dependencies. + */ + +var program = require('../') + , should = require('should'); + +var val = "some cheese" +program + .name('test') + .command('mycommand') + .option('-c, --cheese [type]', 'optionally specify the type of cheese') + .action(function(cmd) { + val = cmd.cheese; + }); + +program.parse(['node', 'test', 'mycommand', '--cheese', '']); + +val.should.equal(''); + From 92d6e4909c5139503b45e16f262bad4bd3a4802f Mon Sep 17 00:00:00 2001 From: Ben Sorohan Date: Mon, 4 Dec 2017 12:36:03 +0100 Subject: [PATCH 055/108] Check if argv is set in array, instead of checking falsey --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 955f92907..e9caac060 100644 --- a/index.js +++ b/index.js @@ -747,7 +747,7 @@ Command.prototype.parseOptions = function(argv) { // If the next argument looks like it might be // an argument for this option, we pass it on. // If it isn't, then it'll simply be ignored - if (argv[i + 1] && argv[i + 1][0] !== '-') { + if ((i + 1) < argv.length && argv[i + 1][0] !== '-') { unknownOptions.push(argv[++i]); } continue; From 06451e30a1dd4bcba45405b8484cb7d5e109ee81 Mon Sep 17 00:00:00 2001 From: Ben Sorohan Date: Tue, 30 Jan 2018 10:37:28 +0100 Subject: [PATCH 056/108] Add missing semi-colons for linting. --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index e9caac060..36f3b9b1b 100644 --- a/index.js +++ b/index.js @@ -855,8 +855,8 @@ Command.prototype.version = function(str, flags) { if (arguments.length === 0) return this._version; this._version = str; flags = flags || '-V, --version'; - var longOptIndex = flags.indexOf('--') - this._versionOptionName = ~longOptIndex ? flags.substr(longOptIndex + 2) : 'version' + var longOptIndex = flags.indexOf('--'); + this._versionOptionName = ~longOptIndex ? flags.substr(longOptIndex + 2) : 'version'; this.option(flags, 'output the version number'); this.on('option:' + this._versionOptionName, function() { process.stdout.write(str + '\n'); From ba6592f515705aa181e65834b6b1c36b72873d4a Mon Sep 17 00:00:00 2001 From: Dan Allen Date: Tue, 30 Jan 2018 23:30:51 -0700 Subject: [PATCH 057/108] only register the option:version event once - create Option directly to avoid registering the option:version event twice - defer to the Option instance to resolve the long name of the option for the event --- index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 36f3b9b1b..c467b10f7 100644 --- a/index.js +++ b/index.js @@ -855,9 +855,9 @@ Command.prototype.version = function(str, flags) { if (arguments.length === 0) return this._version; this._version = str; flags = flags || '-V, --version'; - var longOptIndex = flags.indexOf('--'); - this._versionOptionName = ~longOptIndex ? flags.substr(longOptIndex + 2) : 'version'; - this.option(flags, 'output the version number'); + var versionOption = new Option(flags, 'output the version number'); + this._versionOptionName = versionOption.long.substr(2) || 'version'; + this.options.push(versionOption); this.on('option:' + this._versionOptionName, function() { process.stdout.write(str + '\n'); process.exit(0); From de4af3abbe9baa6dd60dce614e2c94b615c603a5 Mon Sep 17 00:00:00 2001 From: abetomo Date: Mon, 5 Feb 2018 11:07:55 +0900 Subject: [PATCH 058/108] version bump 2.14.0 Also upgrade dependent packages --- CHANGELOG.md | 11 +++++++++++ package-lock.json | 8 ++++---- package.json | 6 +++--- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 971f8f2e0..2c06a29e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,15 @@ +2.14.0 / 2018-02-05 +================== + + * only register the option:version event once + * Fixes issue #727: Passing empty string for option on command is set to undefined + * enable eqeqeq rule + * resolves #754 add linter configuration to project + * resolves #560 respect custom name for version option + * document how to override the version flag + * document using options per command + 2.13.0 / 2018-01-09 ================== diff --git a/package-lock.json b/package-lock.json index 3979e4f9b..446f31b3c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "commander", - "version": "2.13.0", + "version": "2.14.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -1754,9 +1754,9 @@ "dev": true }, "typescript": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.6.2.tgz", - "integrity": "sha1-PFtv1/beCRQmkCfwPAlGdY92c6Q=", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.7.1.tgz", + "integrity": "sha512-bqB1yS6o9TNA9ZC/MJxM0FZzPnZdtHj0xWK/IZ5khzVqdpGul/R/EIiHRgFXlwTD7PSIaYVnGKq1QgMCu2mnqw==", "dev": true }, "uniq": { diff --git a/package.json b/package.json index 0b6eafd4f..6abba3b00 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "commander", - "version": "2.13.0", + "version": "2.14.0", "description": "the complete solution for node.js command-line programs", "keywords": [ "commander", @@ -26,12 +26,12 @@ ], "dependencies": {}, "devDependencies": { - "@types/node": "^7.0.48", + "@types/node": "^7.0.52", "eslint": "^3.19.0", "should": "^11.2.1", "sinon": "^2.4.1", "standard": "^10.0.3", - "typescript": "^2.6.2" + "typescript": "^2.7.1" }, "typings": "typings/index.d.ts" } From 689c0eaa87567d30d5cb779c589c73d7d6a10fd5 Mon Sep 17 00:00:00 2001 From: Yevhenii Date: Tue, 6 Feb 2018 09:01:16 +0100 Subject: [PATCH 059/108] Fix typing of help function --- typings/index.d.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/typings/index.d.ts b/typings/index.d.ts index acdab44bb..483076741 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -271,8 +271,11 @@ declare namespace local { */ outputHelp(cb?: (str: string) => string): void; - /** Output help information and exit. */ - help(): void; + /** Output help information and exit. + * + * @param {(str: string) => string} [cb] + */ + help(cb?: (str: string) => string): void; } } From 6b026a5c88a2c7f67db70831c015e9d11c7babca Mon Sep 17 00:00:00 2001 From: abetomo Date: Wed, 7 Feb 2018 16:01:30 +0900 Subject: [PATCH 060/108] version bump 2.14.1 --- CHANGELOG.md | 5 +++++ package-lock.json | 2 +- package.json | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c06a29e7..29f0707c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ +2.14.1 / 2018-02-07 +================== + + * Fix typing of help function + 2.14.0 / 2018-02-05 ================== diff --git a/package-lock.json b/package-lock.json index 446f31b3c..9d5d4ae6b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "commander", - "version": "2.14.0", + "version": "2.14.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 6abba3b00..b814a4d2d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "commander", - "version": "2.14.0", + "version": "2.14.1", "description": "the complete solution for node.js command-line programs", "keywords": [ "commander", From 956b9e5328b4c06b180e80f5101e14b62eb1867e Mon Sep 17 00:00:00 2001 From: Chang Wang Date: Thu, 1 Mar 2018 20:01:57 -0500 Subject: [PATCH 061/108] Update downloads badge to point to graph of downloads --- Readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index 6a21b9009..a29da4013 100644 --- a/Readme.md +++ b/Readme.md @@ -3,7 +3,7 @@ [![Build Status](https://api.travis-ci.org/tj/commander.js.svg?branch=master)](http://travis-ci.org/tj/commander.js) [![NPM Version](http://img.shields.io/npm/v/commander.svg?style=flat)](https://www.npmjs.org/package/commander) -[![NPM Downloads](https://img.shields.io/npm/dm/commander.svg?style=flat)](https://www.npmjs.org/package/commander) +[![NPM Downloads](https://img.shields.io/npm/dm/commander.svg?style=flat)](https://npmcharts.com/compare/commander?minimal=true) [![Join the chat at https://gitter.im/tj/commander.js](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/tj/commander.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) The complete solution for [node.js](http://nodejs.org) command-line interfaces, inspired by Ruby's [commander](https://github.com/commander-rb/commander). From cb6f680365539d9f9bd2c383a55ba8986a441b15 Mon Sep 17 00:00:00 2001 From: abetomo Date: Wed, 7 Mar 2018 17:42:38 +0900 Subject: [PATCH 062/108] version bump 2.15.0 --- CHANGELOG.md | 6 ++++++ package-lock.json | 14 +++++++------- package.json | 6 +++--- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 29f0707c6..5e2f813aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,10 @@ +2.15.0 / 2018-03-07 +================== + + * Update downloads badge to point to graph of downloads over time instead of duplicating link to npm + * Arguments description + 2.14.1 / 2018-02-07 ================== diff --git a/package-lock.json b/package-lock.json index 9d5d4ae6b..86b9acf41 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,13 +1,13 @@ { "name": "commander", - "version": "2.14.1", + "version": "2.15.0", "lockfileVersion": 1, "requires": true, "dependencies": { "@types/node": { - "version": "7.0.52", - "resolved": "https://registry.npmjs.org/@types/node/-/node-7.0.52.tgz", - "integrity": "sha512-jjpyQsKGsOF/wUElNjfPULk+d8PKvJOIXk3IUeBYYmNCy5dMWfrI+JiixYNw8ppKOlcRwWTXFl0B+i5oGrf95Q==", + "version": "7.0.55", + "resolved": "https://registry.npmjs.org/@types/node/-/node-7.0.55.tgz", + "integrity": "sha512-diCxfWNT4g2UM9Y+BPgy4s3egcZ2qOXc0mXLauvbsBUq9SBKQfh0SmuEUEhJVFZt/p6UDsjg1s2EgfM6OSlp4g==", "dev": true }, "acorn": { @@ -1754,9 +1754,9 @@ "dev": true }, "typescript": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.7.1.tgz", - "integrity": "sha512-bqB1yS6o9TNA9ZC/MJxM0FZzPnZdtHj0xWK/IZ5khzVqdpGul/R/EIiHRgFXlwTD7PSIaYVnGKq1QgMCu2mnqw==", + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.7.2.tgz", + "integrity": "sha512-p5TCYZDAO0m4G344hD+wx/LATebLWZNkkh2asWUFqSsD2OrDNhbAHuSjobrmsUmdzjJjEeZVU9g1h3O6vpstnw==", "dev": true }, "uniq": { diff --git a/package.json b/package.json index b814a4d2d..f87a4919f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "commander", - "version": "2.14.1", + "version": "2.15.0", "description": "the complete solution for node.js command-line programs", "keywords": [ "commander", @@ -26,12 +26,12 @@ ], "dependencies": {}, "devDependencies": { - "@types/node": "^7.0.52", + "@types/node": "^7.0.55", "eslint": "^3.19.0", "should": "^11.2.1", "sinon": "^2.4.1", "standard": "^10.0.3", - "typescript": "^2.7.1" + "typescript": "^2.7.2" }, "typings": "typings/index.d.ts" } From 649eaef336ddc7224eb5c73e4a958685e24de25e Mon Sep 17 00:00:00 2001 From: abetomo Date: Tue, 20 Mar 2018 10:46:31 +0900 Subject: [PATCH 063/108] 2.15.1 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 86b9acf41..945ab7fc0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "commander", - "version": "2.15.0", + "version": "2.15.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index f87a4919f..ca710d66a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "commander", - "version": "2.15.0", + "version": "2.15.1", "description": "the complete solution for node.js command-line programs", "keywords": [ "commander", From 503845b758ad51085319c491cf2c9367542ef1f9 Mon Sep 17 00:00:00 2001 From: Ritvik Saraf <13ritvik@gmail.com> Date: Fri, 20 Apr 2018 05:11:06 +0530 Subject: [PATCH 064/108] updated readme with custom event listeners --- Readme.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Readme.md b/Readme.md index a29da4013..49b935881 100644 --- a/Readme.md +++ b/Readme.md @@ -356,6 +356,22 @@ function make_red(txt) { Output help information and exit immediately. Optional callback cb allows post-processing of help text before it is displayed. + +## Custom event listeners + You can execute custom actions by listening to command and option events. + +```js +program.on('option:verbose', function () { + process.env.VERBOSE = this.verbose; +}); + +// error on unknown commands +program.on('command:*', function () { + console.error('Invalid command: %s\nSee --help for a list of available commands.', program.args.join(' ')); + process.exit(1); +}); +``` + ## Examples ```js From dcddf698c5463795401ad3d6382f5ec5ec060478 Mon Sep 17 00:00:00 2001 From: usmonster Date: Sun, 29 Apr 2018 18:08:37 +0200 Subject: [PATCH 065/108] fix tests - Many tests were not properly invoking assertion functions. Now they are. - Fixed one test then was then failing because of side-effects from previous test setups. - Made small changes in some setups to avoid potential false negatives. (Also: made a tiny unrelated code change to ensure Options always has boolean properties; does not change any behavior, but may help with debugging.) --- index.js | 6 +++--- test/test.command.name.js | 4 ++-- test/test.command.name.set.js | 2 +- test/test.literal.args.js | 2 +- test/test.options.args.optional.js | 2 +- test/test.options.bool.js | 4 ++-- test/test.options.bool.no.js | 2 +- test/test.options.bool.small.combined.js | 4 ++-- test/test.options.bool.small.js | 4 ++-- test/test.options.commands.js | 23 ++++++++++++----------- test/test.options.func.js | 12 ++++++------ test/test.options.large-only.js | 2 +- 12 files changed, 34 insertions(+), 33 deletions(-) diff --git a/index.js b/index.js index fb648beec..0f54b5ef7 100644 --- a/index.js +++ b/index.js @@ -43,9 +43,9 @@ exports.Option = Option; function Option(flags, description) { this.flags = flags; - this.required = ~flags.indexOf('<'); - this.optional = ~flags.indexOf('['); - this.bool = !~flags.indexOf('-no-'); + this.required = flags.indexOf('<') >= 0; + this.optional = flags.indexOf('[') >= 0; + this.bool = flags.indexOf('-no-') === -1; flags = flags.split(/[ ,|]+/); if (flags.length > 1 && !/^[[<]/.test(flags[1])) this.short = flags.shift(); this.long = flags.shift(); diff --git a/test/test.command.name.js b/test/test.command.name.js index 16e064e46..4f6a36d0e 100644 --- a/test/test.command.name.js +++ b/test/test.command.name.js @@ -10,7 +10,7 @@ program program.parse(['node', 'test']); -program.name.should.be.a.Function; +program.name.should.be.a.Function(); program.name().should.equal('test'); program.commands[0].name().should.equal('mycommand'); program.commands[1].name().should.equal('help'); @@ -21,4 +21,4 @@ output[0].should.containEql([ ' mycommand [options] this is my command' ].join('\n')); -sinon.restore(); \ No newline at end of file +sinon.restore(); diff --git a/test/test.command.name.set.js b/test/test.command.name.set.js index e69c46ea0..a251e67c1 100644 --- a/test/test.command.name.set.js +++ b/test/test.command.name.set.js @@ -7,7 +7,7 @@ sinon.stub(process.stdout, 'write'); program.name('foobar').description('This is a test.'); -program.name.should.be.a.Function; +program.name.should.be.a.Function(); program.name().should.equal('foobar'); program.description().should.equal('This is a test.'); diff --git a/test/test.literal.args.js b/test/test.literal.args.js index 156c42cae..9cc938948 100644 --- a/test/test.literal.args.js +++ b/test/test.literal.args.js @@ -11,7 +11,7 @@ program .option('-b, --bar', 'add some bar'); program.parse(['node', 'test', '--foo', '--', '--bar', 'baz']); -program.foo.should.be.true; +program.foo.should.be.true(); should.equal(undefined, program.bar); program.args.should.eql(['--bar', 'baz']); diff --git a/test/test.options.args.optional.js b/test/test.options.args.optional.js index aacaccc9f..d36b384be 100644 --- a/test/test.options.args.optional.js +++ b/test/test.options.args.optional.js @@ -10,4 +10,4 @@ program .option('-c, --cheese [type]', 'optionally specify the type of cheese'); program.parse(['node', 'test', '--cheese']); -program.cheese.should.be.true; +program.cheese.should.be.true(); diff --git a/test/test.options.bool.js b/test/test.options.bool.js index 338a8caff..508b84b09 100644 --- a/test/test.options.bool.js +++ b/test/test.options.bool.js @@ -11,5 +11,5 @@ program .option('-c, --no-cheese', 'remove cheese'); program.parse(['node', 'test', '--pepper']); -program.pepper.should.be.true; -program.cheese.should.be.true; +program.pepper.should.be.true(); +program.cheese.should.be.true(); diff --git a/test/test.options.bool.no.js b/test/test.options.bool.no.js index bb7b8993f..c8c954439 100644 --- a/test/test.options.bool.no.js +++ b/test/test.options.bool.no.js @@ -12,4 +12,4 @@ program program.parse(['node', 'test', '--no-cheese']); should.equal(undefined, program.pepper); -program.cheese.should.be.false; +program.cheese.should.be.false(); diff --git a/test/test.options.bool.small.combined.js b/test/test.options.bool.small.combined.js index 0b1a3bfc1..9ee3a793c 100644 --- a/test/test.options.bool.small.combined.js +++ b/test/test.options.bool.small.combined.js @@ -11,5 +11,5 @@ program .option('-c, --no-cheese', 'remove cheese'); program.parse(['node', 'test', '-pc']); -program.pepper.should.be.true; -program.cheese.should.be.false; +program.pepper.should.be.true(); +program.cheese.should.be.false(); diff --git a/test/test.options.bool.small.js b/test/test.options.bool.small.js index 2818bfd4c..45c6a76b8 100644 --- a/test/test.options.bool.small.js +++ b/test/test.options.bool.small.js @@ -11,5 +11,5 @@ program .option('-c, --no-cheese', 'remove cheese'); program.parse(['node', 'test', '-p', '-c']); -program.pepper.should.be.true; -program.cheese.should.be.false; +program.pepper.should.be.true(); +program.cheese.should.be.false(); diff --git a/test/test.options.commands.js b/test/test.options.commands.js index f5c34d2ae..c33d093c0 100644 --- a/test/test.options.commands.js +++ b/test/test.options.commands.js @@ -47,15 +47,15 @@ program program.parse(['node', 'test', '--config', 'conf']); program.config.should.equal("conf"); -program.commands[0].should.not.have.property.setup_mode; -program.commands[1].should.not.have.property.exec_mode; +program.commands[0].should.not.have.property('setup_mode'); +program.commands[1].should.not.have.property('exec_mode'); envValue.should.equal(""); cmdValue.should.equal(""); -program.parse(['node', 'test', '--config', 'conf1', 'setup', '--setup_mode', 'mode3', 'env1']); +program.parse(['node', 'test', '--config', 'conf1', 'setup', '--setup_mode', 'mode2', 'env1']); program.config.should.equal("conf1"); -program.commands[0].setup_mode.should.equal("mode3"); -program.commands[0].should.not.have.property.host; +program.commands[0].setup_mode.should.equal("mode2"); +program.commands[0].should.not.have.property('host'); envValue.should.equal("env1"); program.parse(['node', 'test', '--config', 'conf2', 'setup', '--setup_mode', 'mode3', '-o', 'host1', 'env2']); @@ -72,7 +72,7 @@ envValue.should.equal("env3"); program.parse(['node', 'test', '--config', 'conf4', 'exec', '--exec_mode', 'mode1', 'exec1']); program.config.should.equal("conf4"); program.commands[1].exec_mode.should.equal("mode1"); -program.commands[1].should.not.have.property.target; +program.commands[1].should.not.have.property('target'); cmdValue.should.equal("exec1"); program.parse(['node', 'test', '--config', 'conf5', 'exec', '-e', 'mode2', 'exec2']); @@ -80,16 +80,17 @@ program.config.should.equal("conf5"); program.commands[1].exec_mode.should.equal("mode2"); cmdValue.should.equal("exec2"); -program.parse(['node', 'test', '--config', 'conf6', 'exec', '--target', 'target1', '-e', 'mode2', 'exec3']); +program.parse(['node', 'test', '--config', 'conf6', 'exec', '--target', 'target1', '-e', 'mode6', 'exec3']); program.config.should.equal("conf6"); -program.commands[1].exec_mode.should.equal("mode2"); +program.commands[1].exec_mode.should.equal("mode6"); program.commands[1].target.should.equal("target1"); cmdValue.should.equal("exec3"); +delete program.commands[1].target; program.parse(['node', 'test', '--config', 'conf7', 'ex', '-e', 'mode3', 'exec4']); program.config.should.equal("conf7"); program.commands[1].exec_mode.should.equal("mode3"); -program.commands[1].should.not.have.property.target; +program.commands[1].should.not.have.property('target'); cmdValue.should.equal("exec4"); // Make sure we still catch errors with required values for options @@ -120,5 +121,5 @@ catch (ex) { } process.exit = oldProcessExit; -exceptionOccurred.should.be.true; -customHelp.should.be.true; +exceptionOccurred.should.be.true(); +customHelp.should.be.true(); diff --git a/test/test.options.func.js b/test/test.options.func.js index 1acb39124..eb8c3bd07 100644 --- a/test/test.options.func.js +++ b/test/test.options.func.js @@ -11,13 +11,13 @@ program .option('-q, --quux ', 'add some quux'); program.parse(['node', 'test', '--foo', '--bar', '--no-magic', '--camel-case', '--quux', 'value']); -program.opts.should.be.a.Function; +program.opts.should.be.a.Function(); var opts = program.opts(); -opts.should.be.an.Object; +opts.should.be.an.Object(); opts.version.should.equal('0.0.1'); -opts.foo.should.be.true; -opts.bar.should.be.true; -opts.magic.should.be.false; -opts.camelCase.should.be.true; +opts.foo.should.be.true(); +opts.bar.should.be.true(); +opts.magic.should.be.false(); +opts.camelCase.should.be.true(); opts.quux.should.equal('value'); diff --git a/test/test.options.large-only.js b/test/test.options.large-only.js index 6f7e328f9..4f07ed9d8 100644 --- a/test/test.options.large-only.js +++ b/test/test.options.large-only.js @@ -10,4 +10,4 @@ program .option('--verbose', 'do stuff'); program.parse(['node', 'test', '--verbose']); -program.verbose.should.be.true; +program.verbose.should.be.true(); From 001d560f50e4b4ab909cd49bd20f3b51cb6d8505 Mon Sep 17 00:00:00 2001 From: NearAutomata <32624319+NearAutomata@users.noreply.github.com> Date: Thu, 10 May 2018 18:20:22 +0200 Subject: [PATCH 066/108] Update eslint to resolve vulnerabilities in lodash --- package-lock.json | 1407 +++++++++++++++++++++++++++++++-------------- package.json | 2 +- 2 files changed, 971 insertions(+), 438 deletions(-) diff --git a/package-lock.json b/package-lock.json index 945ab7fc0..79c2a4f88 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,9 +11,9 @@ "dev": true }, "acorn": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.3.0.tgz", - "integrity": "sha512-Yej+zOJ1Dm/IMZzzj78OntP/r3zHEaKcyNoU2lAaxPtrseM6rF0xwqoz5Q5ysAiED9hTjI2hgtvLXitlCN1/Ug==", + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.3.tgz", + "integrity": "sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ==", "dev": true }, "acorn-jsx": { @@ -22,7 +22,7 @@ "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", "dev": true, "requires": { - "acorn": "3.3.0" + "acorn": "^3.0.4" }, "dependencies": { "acorn": { @@ -34,25 +34,27 @@ } }, "ajv": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", - "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", "dev": true, "requires": { - "co": "4.6.0", - "json-stable-stringify": "1.0.1" + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" } }, "ajv-keywords": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-1.5.1.tgz", - "integrity": "sha1-MU3QpLM2j609/NxU7eYXG4htrzw=", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-2.1.1.tgz", + "integrity": "sha1-YXmX/F9gV2iUxDX5QNgZ4TW4B2I=", "dev": true }, "ansi-escapes": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", - "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", + "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", "dev": true }, "ansi-regex": { @@ -68,12 +70,12 @@ "dev": true }, "argparse": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz", - "integrity": "sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY=", + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, "requires": { - "sprintf-js": "1.0.3" + "sprintf-js": "~1.0.2" } }, "array-union": { @@ -82,7 +84,7 @@ "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", "dev": true, "requires": { - "array-uniq": "1.0.3" + "array-uniq": "^1.0.1" } }, "array-uniq": { @@ -97,8 +99,8 @@ "integrity": "sha1-VWpcU2LAhkgyPdrrnenRS8GGTJA=", "dev": true, "requires": { - "define-properties": "1.1.2", - "es-abstract": "1.10.0" + "define-properties": "^1.1.2", + "es-abstract": "^1.7.0" } }, "arrify": { @@ -113,9 +115,33 @@ "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", "dev": true, "requires": { - "chalk": "1.1.3", - "esutils": "2.0.2", - "js-tokens": "3.0.2" + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" + }, + "dependencies": { + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + } } }, "balanced-match": { @@ -130,10 +156,16 @@ "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", "dev": true, "requires": { - "balanced-match": "1.0.0", + "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, + "buffer-from": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.0.0.tgz", + "integrity": "sha512-83apNb8KK0Se60UE1+4Ukbe3HbfELJ6UlI4ldtOGs7So4KD26orJM8hIY9lxdzP+UpItH1Yh/Y8GUvNFWFFRxA==", + "dev": true + }, "builtin-modules": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", @@ -146,7 +178,7 @@ "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", "dev": true, "requires": { - "callsites": "0.2.0" + "callsites": "^0.2.0" } }, "callsites": { @@ -156,18 +188,42 @@ "dev": true }, "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "dev": true, "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } } }, + "chardet": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", + "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", + "dev": true + }, "circular-json": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", @@ -175,12 +231,12 @@ "dev": true }, "cli-cursor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", - "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", "dev": true, "requires": { - "restore-cursor": "1.0.1" + "restore-cursor": "^2.0.0" } }, "cli-width": { @@ -201,6 +257,21 @@ "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", "dev": true }, + "color-convert": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", + "integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==", + "dev": true, + "requires": { + "color-name": "^1.1.1" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -208,14 +279,15 @@ "dev": true }, "concat-stream": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz", - "integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=", + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", "dev": true, "requires": { - "inherits": "2.0.3", - "readable-stream": "2.3.3", - "typedarray": "0.0.6" + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" } }, "contains-path": { @@ -230,13 +302,24 @@ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "dev": true }, + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "dev": true, + "requires": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, "d": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", "dev": true, "requires": { - "es5-ext": "0.10.38" + "es5-ext": "^0.10.9" } }, "debug": { @@ -266,8 +349,8 @@ "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", "dev": true, "requires": { - "foreach": "2.0.5", - "object-keys": "1.0.11" + "foreach": "^2.0.5", + "object-keys": "^1.0.8" } }, "deglob": { @@ -276,12 +359,12 @@ "integrity": "sha1-TUSr4W7zLHebSXK9FBqAMlApoUo=", "dev": true, "requires": { - "find-root": "1.1.0", - "glob": "7.1.2", - "ignore": "3.3.7", - "pkg-config": "1.1.1", - "run-parallel": "1.1.6", - "uniq": "1.0.1" + "find-root": "^1.0.0", + "glob": "^7.0.5", + "ignore": "^3.0.9", + "pkg-config": "^1.1.0", + "run-parallel": "^1.1.2", + "uniq": "^1.0.1" } }, "del": { @@ -290,13 +373,13 @@ "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", "dev": true, "requires": { - "globby": "5.0.0", - "is-path-cwd": "1.0.0", - "is-path-in-cwd": "1.0.0", - "object-assign": "4.1.1", - "pify": "2.3.0", - "pinkie-promise": "2.0.1", - "rimraf": "2.6.2" + "globby": "^5.0.0", + "is-path-cwd": "^1.0.0", + "is-path-in-cwd": "^1.0.0", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "rimraf": "^2.2.8" } }, "diff": { @@ -311,7 +394,7 @@ "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "dev": true, "requires": { - "esutils": "2.0.2" + "esutils": "^2.0.2" } }, "error-ex": { @@ -320,7 +403,7 @@ "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", "dev": true, "requires": { - "is-arrayish": "0.2.1" + "is-arrayish": "^0.2.1" } }, "es-abstract": { @@ -329,11 +412,11 @@ "integrity": "sha512-/uh/DhdqIOSkAWifU+8nG78vlQxdLckUdI/sPgy0VhuXi2qJ7T8czBmqIYtLQVpCIFYafChnsRsB5pyb1JdmCQ==", "dev": true, "requires": { - "es-to-primitive": "1.1.1", - "function-bind": "1.1.1", - "has": "1.0.1", - "is-callable": "1.1.3", - "is-regex": "1.0.4" + "es-to-primitive": "^1.1.1", + "function-bind": "^1.1.1", + "has": "^1.0.1", + "is-callable": "^1.1.3", + "is-regex": "^1.0.4" } }, "es-to-primitive": { @@ -342,19 +425,20 @@ "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", "dev": true, "requires": { - "is-callable": "1.1.3", - "is-date-object": "1.0.1", - "is-symbol": "1.0.1" + "is-callable": "^1.1.1", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.1" } }, "es5-ext": { - "version": "0.10.38", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.38.tgz", - "integrity": "sha512-jCMyePo7AXbUESwbl8Qi01VSH2piY9s/a3rSU/5w/MlTIx8HPL1xn2InGN8ejt/xulcJgnTO7vqNtOAxzYd2Kg==", + "version": "0.10.42", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.42.tgz", + "integrity": "sha512-AJxO1rmPe1bDEfSR6TJ/FgMFYuTBhR5R57KW58iCkYACMyFbrkqVyzXSurYoScDGvgyMpk7uRF/lPUPPTmsRSA==", "dev": true, "requires": { - "es6-iterator": "2.0.3", - "es6-symbol": "3.1.1" + "es6-iterator": "~2.0.3", + "es6-symbol": "~3.1.1", + "next-tick": "1" } }, "es6-iterator": { @@ -363,9 +447,9 @@ "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", "dev": true, "requires": { - "d": "1.0.0", - "es5-ext": "0.10.38", - "es6-symbol": "3.1.1" + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" } }, "es6-map": { @@ -374,12 +458,12 @@ "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=", "dev": true, "requires": { - "d": "1.0.0", - "es5-ext": "0.10.38", - "es6-iterator": "2.0.3", - "es6-set": "0.1.5", - "es6-symbol": "3.1.1", - "event-emitter": "0.3.5" + "d": "1", + "es5-ext": "~0.10.14", + "es6-iterator": "~2.0.1", + "es6-set": "~0.1.5", + "es6-symbol": "~3.1.1", + "event-emitter": "~0.3.5" } }, "es6-set": { @@ -388,11 +472,11 @@ "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=", "dev": true, "requires": { - "d": "1.0.0", - "es5-ext": "0.10.38", - "es6-iterator": "2.0.3", + "d": "1", + "es5-ext": "~0.10.14", + "es6-iterator": "~2.0.1", "es6-symbol": "3.1.1", - "event-emitter": "0.3.5" + "event-emitter": "~0.3.5" } }, "es6-symbol": { @@ -401,8 +485,8 @@ "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", "dev": true, "requires": { - "d": "1.0.0", - "es5-ext": "0.10.38" + "d": "1", + "es5-ext": "~0.10.14" } }, "es6-weak-map": { @@ -411,10 +495,10 @@ "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=", "dev": true, "requires": { - "d": "1.0.0", - "es5-ext": "0.10.38", - "es6-iterator": "2.0.3", - "es6-symbol": "3.1.1" + "d": "1", + "es5-ext": "^0.10.14", + "es6-iterator": "^2.0.1", + "es6-symbol": "^3.1.1" } }, "escape-string-regexp": { @@ -429,53 +513,67 @@ "integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=", "dev": true, "requires": { - "es6-map": "0.1.5", - "es6-weak-map": "2.0.2", - "esrecurse": "4.2.0", - "estraverse": "4.2.0" + "es6-map": "^0.1.3", + "es6-weak-map": "^2.0.1", + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" } }, "eslint": { - "version": "3.19.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-3.19.0.tgz", - "integrity": "sha1-yPxiAcf0DdCJQbh8CFdnOGpnmsw=", - "dev": true, - "requires": { - "babel-code-frame": "6.26.0", - "chalk": "1.1.3", - "concat-stream": "1.6.0", - "debug": "2.6.9", - "doctrine": "2.1.0", - "escope": "3.6.0", - "espree": "3.5.2", - "esquery": "1.0.0", - "estraverse": "4.2.0", - "esutils": "2.0.2", - "file-entry-cache": "2.0.0", - "glob": "7.1.2", - "globals": "9.18.0", - "ignore": "3.3.7", - "imurmurhash": "0.1.4", - "inquirer": "0.12.0", - "is-my-json-valid": "2.17.1", - "is-resolvable": "1.1.0", - "js-yaml": "3.10.0", - "json-stable-stringify": "1.0.1", - "levn": "0.3.0", - "lodash": "4.17.4", - "mkdirp": "0.5.1", - "natural-compare": "1.4.0", - "optionator": "0.8.2", - "path-is-inside": "1.0.2", - "pluralize": "1.2.1", - "progress": "1.1.8", - "require-uncached": "1.0.3", - "shelljs": "0.7.8", - "strip-bom": "3.0.0", - "strip-json-comments": "2.0.1", - "table": "3.8.3", - "text-table": "0.2.0", - "user-home": "2.0.0" + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.19.1.tgz", + "integrity": "sha512-bT3/1x1EbZB7phzYu7vCr1v3ONuzDtX8WjuM9c0iYxe+cq+pwcKEoQjl7zd3RpC6YOLgnSy3cTN58M2jcoPDIQ==", + "dev": true, + "requires": { + "ajv": "^5.3.0", + "babel-code-frame": "^6.22.0", + "chalk": "^2.1.0", + "concat-stream": "^1.6.0", + "cross-spawn": "^5.1.0", + "debug": "^3.1.0", + "doctrine": "^2.1.0", + "eslint-scope": "^3.7.1", + "eslint-visitor-keys": "^1.0.0", + "espree": "^3.5.4", + "esquery": "^1.0.0", + "esutils": "^2.0.2", + "file-entry-cache": "^2.0.0", + "functional-red-black-tree": "^1.0.1", + "glob": "^7.1.2", + "globals": "^11.0.1", + "ignore": "^3.3.3", + "imurmurhash": "^0.1.4", + "inquirer": "^3.0.6", + "is-resolvable": "^1.0.0", + "js-yaml": "^3.9.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.4", + "minimatch": "^3.0.2", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.2", + "path-is-inside": "^1.0.2", + "pluralize": "^7.0.0", + "progress": "^2.0.0", + "regexpp": "^1.0.1", + "require-uncached": "^1.0.3", + "semver": "^5.3.0", + "strip-ansi": "^4.0.0", + "strip-json-comments": "~2.0.1", + "table": "4.0.2", + "text-table": "~0.2.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } } }, "eslint-config-standard": { @@ -496,9 +594,9 @@ "integrity": "sha1-Wt2BBujJKNssuiMrzZ76hG49oWw=", "dev": true, "requires": { - "debug": "2.6.9", - "object-assign": "4.1.1", - "resolve": "1.5.0" + "debug": "^2.2.0", + "object-assign": "^4.0.1", + "resolve": "^1.1.6" } }, "eslint-module-utils": { @@ -507,8 +605,8 @@ "integrity": "sha512-jDI/X5l/6D1rRD/3T43q8Qgbls2nq5km5KSqiwlyUbGo5+04fXhMKdCPhjwbqAa6HXWaMxj8Q4hQDIh7IadJQw==", "dev": true, "requires": { - "debug": "2.6.9", - "pkg-dir": "1.0.0" + "debug": "^2.6.8", + "pkg-dir": "^1.0.0" } }, "eslint-plugin-import": { @@ -517,16 +615,16 @@ "integrity": "sha1-crowb60wXWfEgWNIpGmaQimsi04=", "dev": true, "requires": { - "builtin-modules": "1.1.1", - "contains-path": "0.1.0", - "debug": "2.6.9", + "builtin-modules": "^1.1.1", + "contains-path": "^0.1.0", + "debug": "^2.2.0", "doctrine": "1.5.0", - "eslint-import-resolver-node": "0.2.3", - "eslint-module-utils": "2.1.1", - "has": "1.0.1", - "lodash.cond": "4.5.2", - "minimatch": "3.0.4", - "pkg-up": "1.0.0" + "eslint-import-resolver-node": "^0.2.0", + "eslint-module-utils": "^2.0.0", + "has": "^1.0.1", + "lodash.cond": "^4.3.0", + "minimatch": "^3.0.3", + "pkg-up": "^1.0.0" }, "dependencies": { "doctrine": { @@ -535,8 +633,8 @@ "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", "dev": true, "requires": { - "esutils": "2.0.2", - "isarray": "1.0.0" + "esutils": "^2.0.2", + "isarray": "^1.0.0" } } } @@ -547,10 +645,10 @@ "integrity": "sha512-vIUQPuwbVYdz/CYnlTLsJrRy7iXHQjdEe5wz0XhhdTym3IInM/zZLlPf9nZ2mThsH0QcsieCOWs2vOeCy/22LQ==", "dev": true, "requires": { - "ignore": "3.3.7", - "minimatch": "3.0.4", - "object-assign": "4.1.1", - "resolve": "1.5.0", + "ignore": "^3.0.11", + "minimatch": "^3.0.2", + "object-assign": "^4.0.1", + "resolve": "^1.1.7", "semver": "5.3.0" } }, @@ -566,11 +664,11 @@ "integrity": "sha1-xUNb6wZ3ThLH2y9qut3L+QDNP3g=", "dev": true, "requires": { - "array.prototype.find": "2.0.4", - "doctrine": "1.5.0", - "has": "1.0.1", - "jsx-ast-utils": "1.4.1", - "object.assign": "4.1.0" + "array.prototype.find": "^2.0.1", + "doctrine": "^1.2.2", + "has": "^1.0.1", + "jsx-ast-utils": "^1.3.4", + "object.assign": "^4.0.4" }, "dependencies": { "doctrine": { @@ -579,8 +677,8 @@ "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", "dev": true, "requires": { - "esutils": "2.0.2", - "isarray": "1.0.0" + "esutils": "^2.0.2", + "isarray": "^1.0.0" } } } @@ -591,14 +689,30 @@ "integrity": "sha1-NNDJFbRe3G8BA5PH7vOCOwhWXPI=", "dev": true }, + "eslint-scope": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", + "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "eslint-visitor-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", + "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", + "dev": true + }, "espree": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.2.tgz", - "integrity": "sha512-sadKeYwaR/aJ3stC2CdvgXu1T16TdYN+qwCpcWbMnGJ8s0zNWemzrvb2GbD4OhmJ/fwpJjudThAlLobGbWZbCQ==", + "version": "3.5.4", + "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.4.tgz", + "integrity": "sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A==", "dev": true, "requires": { - "acorn": "5.3.0", - "acorn-jsx": "3.0.1" + "acorn": "^5.5.0", + "acorn-jsx": "^3.0.0" } }, "esprima": { @@ -608,22 +722,21 @@ "dev": true }, "esquery": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.0.tgz", - "integrity": "sha1-z7qLV9f7qT8XKYqKAGoEzaE9gPo=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", + "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", "dev": true, "requires": { - "estraverse": "4.2.0" + "estraverse": "^4.0.0" } }, "esrecurse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.0.tgz", - "integrity": "sha1-+pVo2Y04I/mkHZHpAtyrnqblsWM=", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", "dev": true, "requires": { - "estraverse": "4.2.0", - "object-assign": "4.1.1" + "estraverse": "^4.1.0" } }, "estraverse": { @@ -644,8 +757,8 @@ "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", "dev": true, "requires": { - "d": "1.0.0", - "es5-ext": "0.10.38" + "d": "1", + "es5-ext": "~0.10.14" } }, "exit-hook": { @@ -654,6 +767,29 @@ "integrity": "sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g=", "dev": true }, + "external-editor": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", + "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", + "dev": true, + "requires": { + "chardet": "^0.4.0", + "iconv-lite": "^0.4.17", + "tmp": "^0.0.33" + } + }, + "fast-deep-equal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true + }, "fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", @@ -661,13 +797,12 @@ "dev": true }, "figures": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", - "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", "dev": true, "requires": { - "escape-string-regexp": "1.0.5", - "object-assign": "4.1.1" + "escape-string-regexp": "^1.0.5" } }, "file-entry-cache": { @@ -676,8 +811,8 @@ "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", "dev": true, "requires": { - "flat-cache": "1.3.0", - "object-assign": "4.1.1" + "flat-cache": "^1.2.1", + "object-assign": "^4.0.1" } }, "find-root": { @@ -692,8 +827,8 @@ "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", "dev": true, "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" } }, "flat-cache": { @@ -702,10 +837,10 @@ "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", "dev": true, "requires": { - "circular-json": "0.3.3", - "del": "2.2.2", - "graceful-fs": "4.1.11", - "write": "0.2.1" + "circular-json": "^0.3.1", + "del": "^2.0.2", + "graceful-fs": "^4.1.2", + "write": "^0.2.1" } }, "foreach": { @@ -720,7 +855,7 @@ "integrity": "sha1-87IWfZBoxGmKjVH092CjmlTYGOs=", "dev": true, "requires": { - "samsam": "1.3.0" + "samsam": "1.x" } }, "fs.realpath": { @@ -735,6 +870,12 @@ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, "generate-function": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz", @@ -747,7 +888,7 @@ "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=", "dev": true, "requires": { - "is-property": "1.0.2" + "is-property": "^1.0.0" } }, "get-stdin": { @@ -762,18 +903,18 @@ "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "dev": true, "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, "globals": { - "version": "9.18.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", + "version": "11.5.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.5.0.tgz", + "integrity": "sha512-hYyf+kI8dm3nORsiiXUQigOU62hDLfJ9G01uyGMxhc6BKsircrUhC4uJPQPUSuq2GrTmiiEt7ewxlMdBewfmKQ==", "dev": true }, "globby": { @@ -782,12 +923,12 @@ "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", "dev": true, "requires": { - "array-union": "1.0.2", - "arrify": "1.0.1", - "glob": "7.1.2", - "object-assign": "4.1.1", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" + "array-union": "^1.0.1", + "arrify": "^1.0.0", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" } }, "graceful-fs": { @@ -802,7 +943,7 @@ "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=", "dev": true, "requires": { - "function-bind": "1.1.1" + "function-bind": "^1.0.2" } }, "has-ansi": { @@ -811,15 +952,30 @@ "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", "dev": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, "has-symbols": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", "dev": true }, + "iconv-lite": { + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", + "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, "ignore": { "version": "3.3.7", "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.7.tgz", @@ -838,8 +994,8 @@ "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" + "once": "^1.3.0", + "wrappy": "1" } }, "inherits": { @@ -849,24 +1005,25 @@ "dev": true }, "inquirer": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-0.12.0.tgz", - "integrity": "sha1-HvK/1jUE3wvHV4X/+MLEHfEvB34=", - "dev": true, - "requires": { - "ansi-escapes": "1.4.0", - "ansi-regex": "2.1.1", - "chalk": "1.1.3", - "cli-cursor": "1.0.2", - "cli-width": "2.2.0", - "figures": "1.7.0", - "lodash": "4.17.4", - "readline2": "1.0.1", - "run-async": "0.1.0", - "rx-lite": "3.1.2", - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "through": "2.3.8" + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz", + "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", + "dev": true, + "requires": { + "ansi-escapes": "^3.0.0", + "chalk": "^2.0.0", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^2.0.4", + "figures": "^2.0.0", + "lodash": "^4.3.0", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rx-lite": "^4.0.8", + "rx-lite-aggregates": "^4.0.8", + "string-width": "^2.1.0", + "strip-ansi": "^4.0.0", + "through": "^2.3.6" } }, "interpret": { @@ -894,24 +1051,28 @@ "dev": true }, "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-my-ip-valid": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "1.0.1" - } + "resolved": "https://registry.npmjs.org/is-my-ip-valid/-/is-my-ip-valid-1.0.0.tgz", + "integrity": "sha512-gmh/eWXROncUzRnIa1Ubrt5b8ep/MGSnfAUI3aRp+sqTCs1tv1Isl8d8F6JmkN3dXKc3ehZMrtiPN9eL03NuaQ==", + "dev": true }, "is-my-json-valid": { - "version": "2.17.1", - "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.17.1.tgz", - "integrity": "sha512-Q2khNw+oBlWuaYvEEHtKSw/pCxD2L5Rc1C+UQme9X6JdRDh7m5D7HkozA0qa3DUkQ6VzCnEm8mVIQPyIRkI5sQ==", + "version": "2.17.2", + "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.17.2.tgz", + "integrity": "sha512-IBhBslgngMQN8DDSppmgDv7RNrlFotuuDsKcrCP3+HbFaVivIBU7u9oiiErw8sH4ynx3+gOGQ3q2otkgiSi6kg==", "dev": true, "requires": { - "generate-function": "2.0.0", - "generate-object-property": "1.2.0", - "jsonpointer": "4.0.1", - "xtend": "4.0.1" + "generate-function": "^2.0.0", + "generate-object-property": "^1.1.0", + "is-my-ip-valid": "^1.0.0", + "jsonpointer": "^4.0.0", + "xtend": "^4.0.0" } }, "is-path-cwd": { @@ -921,12 +1082,12 @@ "dev": true }, "is-path-in-cwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz", - "integrity": "sha1-ZHdYK4IU1gI0YJRWcAO+ip6sBNw=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", + "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", "dev": true, "requires": { - "is-path-inside": "1.0.1" + "is-path-inside": "^1.0.0" } }, "is-path-inside": { @@ -935,9 +1096,15 @@ "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", "dev": true, "requires": { - "path-is-inside": "1.0.2" + "path-is-inside": "^1.0.1" } }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, "is-property": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", @@ -950,7 +1117,7 @@ "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", "dev": true, "requires": { - "has": "1.0.1" + "has": "^1.0.1" } }, "is-resolvable": { @@ -971,6 +1138,12 @@ "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", "dev": true }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, "js-tokens": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", @@ -978,13 +1151,13 @@ "dev": true }, "js-yaml": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.10.0.tgz", - "integrity": "sha512-O2v52ffjLa9VeM43J4XocZE//WT9N0IiwDa3KSHH7Tu8CtH+1qM8SIZvnsTh6v+4yFy5KUY3BHUVwjpfAWsjIA==", + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.11.0.tgz", + "integrity": "sha512-saJstZWv7oNeOyBh3+Dx1qWzhW0+e6/8eDzo7p5rDFqxntSztloLtuKu+Ejhtq82jsilwOIZYsCz+lIjthg1Hw==", "dev": true, "requires": { - "argparse": "1.0.9", - "esprima": "4.0.0" + "argparse": "^1.0.7", + "esprima": "^4.0.0" } }, "json-parse-better-errors": { @@ -993,15 +1166,27 @@ "integrity": "sha512-xyQpxeWWMKyJps9CuGJYeng6ssI5bpqS9ltQpdVQ90t4ql6NdnxFKh95JcRt2cun/DjMVNrdjniLPuMA69xmCw==", "dev": true }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", + "dev": true + }, "json-stable-stringify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", "dev": true, "requires": { - "jsonify": "0.0.0" + "jsonify": "~0.0.0" } }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, "jsonify": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", @@ -1026,8 +1211,8 @@ "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", "dev": true, "requires": { - "prelude-ls": "1.1.2", - "type-check": "0.3.2" + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" } }, "load-json-file": { @@ -1036,10 +1221,10 @@ "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "parse-json": "4.0.0", - "pify": "3.0.0", - "strip-bom": "3.0.0" + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" }, "dependencies": { "pify": { @@ -1056,8 +1241,8 @@ "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", "dev": true, "requires": { - "p-locate": "2.0.0", - "path-exists": "3.0.0" + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" }, "dependencies": { "path-exists": { @@ -1069,9 +1254,9 @@ } }, "lodash": { - "version": "4.17.4", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", - "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=", + "version": "4.17.10", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", + "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==", "dev": true }, "lodash.cond": { @@ -1086,13 +1271,29 @@ "integrity": "sha1-OpoCg0UqR9dDnnJzG54H1zhuSfY=", "dev": true }, + "lru-cache": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", + "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "requires": { - "brace-expansion": "1.1.8" + "brace-expansion": "^1.1.7" } }, "minimist": { @@ -1117,9 +1318,9 @@ "dev": true }, "mute-stream": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.5.tgz", - "integrity": "sha1-j7+rsKmKJT0xhDMfno3rc3L6xsA=", + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", "dev": true }, "native-promise-only": { @@ -1134,6 +1335,12 @@ "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, + "next-tick": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", + "dev": true + }, "number-is-nan": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", @@ -1158,10 +1365,10 @@ "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", "dev": true, "requires": { - "define-properties": "1.1.2", - "function-bind": "1.1.1", - "has-symbols": "1.0.0", - "object-keys": "1.0.11" + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" } }, "once": { @@ -1170,14 +1377,17 @@ "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "requires": { - "wrappy": "1.0.2" + "wrappy": "1" } }, "onetime": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", - "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", - "dev": true + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } }, "optionator": { "version": "0.8.2", @@ -1185,12 +1395,12 @@ "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", "dev": true, "requires": { - "deep-is": "0.1.3", - "fast-levenshtein": "2.0.6", - "levn": "0.3.0", - "prelude-ls": "1.1.2", - "type-check": "0.3.2", - "wordwrap": "1.0.0" + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" } }, "os-homedir": { @@ -1199,13 +1409,19 @@ "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", "dev": true }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, "p-limit": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.2.0.tgz", "integrity": "sha512-Y/OtIaXtUPr4/YpMv1pCL5L5ed0rumAaAeBSj12F+bSlMdys7i8oQF/GUJmfpTS/QoaRrS/k6pma29haJpsMng==", "dev": true, "requires": { - "p-try": "1.0.0" + "p-try": "^1.0.0" } }, "p-locate": { @@ -1214,7 +1430,7 @@ "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", "dev": true, "requires": { - "p-limit": "1.2.0" + "p-limit": "^1.1.0" } }, "p-try": { @@ -1229,8 +1445,8 @@ "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", "dev": true, "requires": { - "error-ex": "1.3.1", - "json-parse-better-errors": "1.0.1" + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" } }, "path-exists": { @@ -1239,7 +1455,7 @@ "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", "dev": true, "requires": { - "pinkie-promise": "2.0.1" + "pinkie-promise": "^2.0.0" } }, "path-is-absolute": { @@ -1295,7 +1511,7 @@ "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "dev": true, "requires": { - "pinkie": "2.0.4" + "pinkie": "^2.0.0" } }, "pkg-conf": { @@ -1304,8 +1520,8 @@ "integrity": "sha1-ISZRTKbyq/69FoWW3xi6V4Z/AFg=", "dev": true, "requires": { - "find-up": "2.1.0", - "load-json-file": "4.0.0" + "find-up": "^2.0.0", + "load-json-file": "^4.0.0" }, "dependencies": { "find-up": { @@ -1314,7 +1530,7 @@ "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "dev": true, "requires": { - "locate-path": "2.0.0" + "locate-path": "^2.0.0" } } } @@ -1325,9 +1541,9 @@ "integrity": "sha1-VX7yLXPaPIg3EHdmxS6tq94pj+Q=", "dev": true, "requires": { - "debug-log": "1.0.1", - "find-root": "1.1.0", - "xtend": "4.0.1" + "debug-log": "^1.0.0", + "find-root": "^1.0.0", + "xtend": "^4.0.1" } }, "pkg-dir": { @@ -1336,7 +1552,7 @@ "integrity": "sha1-ektQio1bstYp1EcFb/TpyTFM89Q=", "dev": true, "requires": { - "find-up": "1.1.2" + "find-up": "^1.0.0" } }, "pkg-up": { @@ -1345,13 +1561,13 @@ "integrity": "sha1-Pgj7RhUlxEIWJKM7n35tCvWwWiY=", "dev": true, "requires": { - "find-up": "1.1.2" + "find-up": "^1.0.0" } }, "pluralize": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-1.2.1.tgz", - "integrity": "sha1-0aIUg/0iu0HlihL6NCGCMUCJfEU=", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", + "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", "dev": true }, "prelude-ls": { @@ -1361,30 +1577,36 @@ "dev": true }, "process-nextick-args": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", "dev": true }, "progress": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/progress/-/progress-1.1.8.tgz", - "integrity": "sha1-4mDHj2Fhzdmw5WzD4Khd4Xx6V74=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.0.tgz", + "integrity": "sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8=", + "dev": true + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", "dev": true }, "readable-stream": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", - "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "1.0.7", - "safe-buffer": "5.1.1", - "string_decoder": "1.0.3", - "util-deprecate": "1.0.2" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, "readline2": { @@ -1393,9 +1615,26 @@ "integrity": "sha1-QQWWCP/BVHV7cV2ZidGZ/783LjU=", "dev": true, "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", "mute-stream": "0.0.5" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "mute-stream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.5.tgz", + "integrity": "sha1-j7+rsKmKJT0xhDMfno3rc3L6xsA=", + "dev": true + } } }, "rechoir": { @@ -1404,17 +1643,23 @@ "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", "dev": true, "requires": { - "resolve": "1.5.0" + "resolve": "^1.1.6" } }, + "regexpp": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-1.1.0.tgz", + "integrity": "sha512-LOPw8FpgdQF9etWMaAfG/WRthIdXJGYp4mJ2Jgn/2lpkbod9jPn0t9UqN7AxBOKNfzRbYyVfgc7Vk4t/MpnXgw==", + "dev": true + }, "require-uncached": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", "dev": true, "requires": { - "caller-path": "0.1.0", - "resolve-from": "1.0.1" + "caller-path": "^0.1.0", + "resolve-from": "^1.0.0" } }, "resolve": { @@ -1423,7 +1668,7 @@ "integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==", "dev": true, "requires": { - "path-parse": "1.0.5" + "path-parse": "^1.0.5" } }, "resolve-from": { @@ -1433,13 +1678,13 @@ "dev": true }, "restore-cursor": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", - "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", "dev": true, "requires": { - "exit-hook": "1.1.1", - "onetime": "1.1.0" + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" } }, "rimraf": { @@ -1448,16 +1693,16 @@ "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", "dev": true, "requires": { - "glob": "7.1.2" + "glob": "^7.0.5" } }, "run-async": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-0.1.0.tgz", - "integrity": "sha1-yK1KXhEGYeQCp9IbUw4AnyX444k=", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", "dev": true, "requires": { - "once": "1.4.0" + "is-promise": "^2.1.0" } }, "run-parallel": { @@ -1467,15 +1712,30 @@ "dev": true }, "rx-lite": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-3.1.2.tgz", - "integrity": "sha1-Gc5QLKVyZl87ZHsQk5+X/RYV8QI=", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", + "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=", "dev": true }, + "rx-lite-aggregates": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz", + "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", + "dev": true, + "requires": { + "rx-lite": "*" + } + }, "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true }, "samsam": { @@ -1490,15 +1750,30 @@ "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", "dev": true }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, "shelljs": { "version": "0.7.8", "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.7.8.tgz", "integrity": "sha1-3svPh0sNHl+3LhSxZKloMEjprLM=", "dev": true, "requires": { - "glob": "7.1.2", - "interpret": "1.1.0", - "rechoir": "0.6.2" + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" } }, "should": { @@ -1507,11 +1782,11 @@ "integrity": "sha1-kPVRRVUtAc/CAGZuToGKHJZw7aI=", "dev": true, "requires": { - "should-equal": "1.0.1", - "should-format": "3.0.3", - "should-type": "1.4.0", - "should-type-adaptors": "1.1.0", - "should-util": "1.0.0" + "should-equal": "^1.0.0", + "should-format": "^3.0.2", + "should-type": "^1.4.0", + "should-type-adaptors": "^1.0.1", + "should-util": "^1.0.0" } }, "should-equal": { @@ -1520,7 +1795,7 @@ "integrity": "sha1-C26VFvJgGp+wuy3MNpr6HH4gCvc=", "dev": true, "requires": { - "should-type": "1.4.0" + "should-type": "^1.0.0" } }, "should-format": { @@ -1529,8 +1804,8 @@ "integrity": "sha1-m/yPdPo5IFxT04w01xcwPidxJPE=", "dev": true, "requires": { - "should-type": "1.4.0", - "should-type-adaptors": "1.1.0" + "should-type": "^1.3.0", + "should-type-adaptors": "^1.0.1" } }, "should-type": { @@ -1545,8 +1820,8 @@ "integrity": "sha512-JA4hdoLnN+kebEp2Vs8eBe9g7uy0zbRo+RMcU0EsNy+R+k049Ki+N5tT5Jagst2g7EAja+euFuoXFCa8vIklfA==", "dev": true, "requires": { - "should-type": "1.4.0", - "should-util": "1.0.0" + "should-type": "^1.3.0", + "should-util": "^1.0.0" } }, "should-util": { @@ -1555,27 +1830,36 @@ "integrity": "sha1-yYzaN0qmsZDfi6h8mInCtNtiAGM=", "dev": true }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, "sinon": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/sinon/-/sinon-2.4.1.tgz", "integrity": "sha512-vFTrO9Wt0ECffDYIPSP/E5bBugt0UjcBQOfQUMh66xzkyPEnhl/vM2LRZi2ajuTdkH07sA6DzrM6KvdvGIH8xw==", "dev": true, "requires": { - "diff": "3.4.0", + "diff": "^3.1.0", "formatio": "1.2.0", - "lolex": "1.6.0", - "native-promise-only": "0.8.1", - "path-to-regexp": "1.7.0", - "samsam": "1.3.0", + "lolex": "^1.6.0", + "native-promise-only": "^0.8.1", + "path-to-regexp": "^1.7.0", + "samsam": "^1.1.3", "text-encoding": "0.6.4", - "type-detect": "4.0.7" + "type-detect": "^4.0.0" } }, "slice-ansi": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz", - "integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU=", - "dev": true + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz", + "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0" + } }, "sprintf-js": { "version": "1.0.3", @@ -1589,15 +1873,266 @@ "integrity": "sha512-JURZ+85ExKLQULckDFijdX5WHzN6RC7fgiZNSV4jFQVo+3tPoQGHyBrGekye/yf0aOfb4210EM5qPNlc2cRh4w==", "dev": true, "requires": { - "eslint": "3.19.0", + "eslint": "~3.19.0", "eslint-config-standard": "10.2.1", "eslint-config-standard-jsx": "4.0.2", - "eslint-plugin-import": "2.2.0", - "eslint-plugin-node": "4.2.3", - "eslint-plugin-promise": "3.5.0", - "eslint-plugin-react": "6.10.3", - "eslint-plugin-standard": "3.0.1", - "standard-engine": "7.0.0" + "eslint-plugin-import": "~2.2.0", + "eslint-plugin-node": "~4.2.2", + "eslint-plugin-promise": "~3.5.0", + "eslint-plugin-react": "~6.10.0", + "eslint-plugin-standard": "~3.0.1", + "standard-engine": "~7.0.0" + }, + "dependencies": { + "ajv": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", + "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", + "dev": true, + "requires": { + "co": "^4.6.0", + "json-stable-stringify": "^1.0.1" + } + }, + "ajv-keywords": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-1.5.1.tgz", + "integrity": "sha1-MU3QpLM2j609/NxU7eYXG4htrzw=", + "dev": true + }, + "ansi-escapes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", + "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "cli-cursor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", + "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", + "dev": true, + "requires": { + "restore-cursor": "^1.0.1" + } + }, + "eslint": { + "version": "3.19.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-3.19.0.tgz", + "integrity": "sha1-yPxiAcf0DdCJQbh8CFdnOGpnmsw=", + "dev": true, + "requires": { + "babel-code-frame": "^6.16.0", + "chalk": "^1.1.3", + "concat-stream": "^1.5.2", + "debug": "^2.1.1", + "doctrine": "^2.0.0", + "escope": "^3.6.0", + "espree": "^3.4.0", + "esquery": "^1.0.0", + "estraverse": "^4.2.0", + "esutils": "^2.0.2", + "file-entry-cache": "^2.0.0", + "glob": "^7.0.3", + "globals": "^9.14.0", + "ignore": "^3.2.0", + "imurmurhash": "^0.1.4", + "inquirer": "^0.12.0", + "is-my-json-valid": "^2.10.0", + "is-resolvable": "^1.0.0", + "js-yaml": "^3.5.1", + "json-stable-stringify": "^1.0.0", + "levn": "^0.3.0", + "lodash": "^4.0.0", + "mkdirp": "^0.5.0", + "natural-compare": "^1.4.0", + "optionator": "^0.8.2", + "path-is-inside": "^1.0.1", + "pluralize": "^1.2.1", + "progress": "^1.1.8", + "require-uncached": "^1.0.2", + "shelljs": "^0.7.5", + "strip-bom": "^3.0.0", + "strip-json-comments": "~2.0.1", + "table": "^3.7.8", + "text-table": "~0.2.0", + "user-home": "^2.0.0" + } + }, + "figures": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", + "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5", + "object-assign": "^4.1.0" + } + }, + "globals": { + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", + "dev": true + }, + "inquirer": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-0.12.0.tgz", + "integrity": "sha1-HvK/1jUE3wvHV4X/+MLEHfEvB34=", + "dev": true, + "requires": { + "ansi-escapes": "^1.1.0", + "ansi-regex": "^2.0.0", + "chalk": "^1.0.0", + "cli-cursor": "^1.0.1", + "cli-width": "^2.0.0", + "figures": "^1.3.5", + "lodash": "^4.3.0", + "readline2": "^1.0.1", + "run-async": "^0.1.0", + "rx-lite": "^3.1.2", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.0", + "through": "^2.3.6" + } + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "onetime": { + "version": "1.1.0", + "resolved": "http://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", + "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", + "dev": true + }, + "pluralize": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-1.2.1.tgz", + "integrity": "sha1-0aIUg/0iu0HlihL6NCGCMUCJfEU=", + "dev": true + }, + "progress": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/progress/-/progress-1.1.8.tgz", + "integrity": "sha1-4mDHj2Fhzdmw5WzD4Khd4Xx6V74=", + "dev": true + }, + "restore-cursor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", + "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", + "dev": true, + "requires": { + "exit-hook": "^1.0.0", + "onetime": "^1.0.0" + } + }, + "run-async": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-0.1.0.tgz", + "integrity": "sha1-yK1KXhEGYeQCp9IbUw4AnyX444k=", + "dev": true, + "requires": { + "once": "^1.3.0" + } + }, + "rx-lite": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-3.1.2.tgz", + "integrity": "sha1-Gc5QLKVyZl87ZHsQk5+X/RYV8QI=", + "dev": true + }, + "slice-ansi": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz", + "integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU=", + "dev": true + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "table": { + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/table/-/table-3.8.3.tgz", + "integrity": "sha1-K7xULw/amGGnVdOUf+/Ys/UThV8=", + "dev": true, + "requires": { + "ajv": "^4.7.0", + "ajv-keywords": "^1.0.0", + "chalk": "^1.1.1", + "lodash": "^4.0.0", + "slice-ansi": "0.0.4", + "string-width": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + } } }, "standard-engine": { @@ -1606,10 +2141,10 @@ "integrity": "sha1-67d7nI/CyBZf+jU72Rug3/Qa9pA=", "dev": true, "requires": { - "deglob": "2.1.0", - "get-stdin": "5.0.1", - "minimist": "1.2.0", - "pkg-conf": "2.1.0" + "deglob": "^2.1.0", + "get-stdin": "^5.0.1", + "minimist": "^1.1.0", + "pkg-conf": "^2.0.0" }, "dependencies": { "minimist": { @@ -1621,32 +2156,39 @@ } }, "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" } }, "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { - "safe-buffer": "5.1.1" + "safe-buffer": "~5.1.0" } }, "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^3.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + } } }, "strip-bom": { @@ -1668,50 +2210,17 @@ "dev": true }, "table": { - "version": "3.8.3", - "resolved": "https://registry.npmjs.org/table/-/table-3.8.3.tgz", - "integrity": "sha1-K7xULw/amGGnVdOUf+/Ys/UThV8=", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/table/-/table-4.0.2.tgz", + "integrity": "sha512-UUkEAPdSGxtRpiV9ozJ5cMTtYiqz7Ni1OGqLXRCynrvzdtR1p+cfOWe2RJLwvUG8hNanaSRjecIqwOjqeatDsA==", "dev": true, "requires": { - "ajv": "4.11.8", - "ajv-keywords": "1.5.1", - "chalk": "1.1.3", - "lodash": "4.17.4", - "slice-ansi": "0.0.4", - "string-width": "2.1.1" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "3.0.0" - } - } + "ajv": "^5.2.3", + "ajv-keywords": "^2.1.0", + "chalk": "^2.1.0", + "lodash": "^4.17.4", + "slice-ansi": "1.0.0", + "string-width": "^2.1.1" } }, "text-encoding": { @@ -1732,13 +2241,22 @@ "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", "dev": true }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, "type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", "dev": true, "requires": { - "prelude-ls": "1.1.2" + "prelude-ls": "~1.1.2" } }, "type-detect": { @@ -1771,7 +2289,7 @@ "integrity": "sha1-nHC/2Babwdy/SGBODwS4tJzenp8=", "dev": true, "requires": { - "os-homedir": "1.0.2" + "os-homedir": "^1.0.0" } }, "util-deprecate": { @@ -1780,6 +2298,15 @@ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true }, + "which": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", + "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, "wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", @@ -1798,7 +2325,7 @@ "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", "dev": true, "requires": { - "mkdirp": "0.5.1" + "mkdirp": "^0.5.1" } }, "xtend": { @@ -1806,6 +2333,12 @@ "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", "dev": true + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true } } } diff --git a/package.json b/package.json index ca710d66a..de415afcb 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "dependencies": {}, "devDependencies": { "@types/node": "^7.0.55", - "eslint": "^3.19.0", + "eslint": "^4.19.1", "should": "^11.2.1", "sinon": "^2.4.1", "standard": "^10.0.3", From 89edef006f5a174c2a0d1f602cc94c162bef01cb Mon Sep 17 00:00:00 2001 From: Blair Zajac Date: Mon, 21 May 2018 19:07:25 +0200 Subject: [PATCH 067/108] Fix types (#804) * Command#opts type is { [key: string]: any }. * Command#help's return type is never. --- typings/index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/typings/index.d.ts b/typings/index.d.ts index 483076741..312b056de 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -218,9 +218,9 @@ declare namespace local { /** * Return an object containing options as key-value pairs * - * @returns {{[key: string]: string}} + * @returns {{[key: string]: any}} */ - opts(): { [key: string]: string }; + opts(): { [key: string]: any }; /** * Set the description to `str`. @@ -275,7 +275,7 @@ declare namespace local { * * @param {(str: string) => string} [cb] */ - help(cb?: (str: string) => string): void; + help(cb?: (str: string) => string): never; } } From 2415089a0242f1ec8a8d5fb214e15ddca38bc10c Mon Sep 17 00:00:00 2001 From: Steven Date: Tue, 22 May 2018 10:51:16 -0400 Subject: [PATCH 068/108] Add badge to display install size --- Readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Readme.md b/Readme.md index 49b935881..fbf56103d 100644 --- a/Readme.md +++ b/Readme.md @@ -4,6 +4,7 @@ [![Build Status](https://api.travis-ci.org/tj/commander.js.svg?branch=master)](http://travis-ci.org/tj/commander.js) [![NPM Version](http://img.shields.io/npm/v/commander.svg?style=flat)](https://www.npmjs.org/package/commander) [![NPM Downloads](https://img.shields.io/npm/dm/commander.svg?style=flat)](https://npmcharts.com/compare/commander?minimal=true) +[![Install Size](https://packagephobia.now.sh/badge?p=commander)](https://packagephobia.now.sh/result?p=commander) [![Join the chat at https://gitter.im/tj/commander.js](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/tj/commander.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) The complete solution for [node.js](http://nodejs.org) command-line interfaces, inspired by Ruby's [commander](https://github.com/commander-rb/commander). From 55ff22f0938084a2b6116e0543b1796224b3fd6a Mon Sep 17 00:00:00 2001 From: Ritvik Saraf <13ritvik@gmail.com> Date: Tue, 5 Jun 2018 00:54:35 +0530 Subject: [PATCH 069/108] fixed typo in readme --- Readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index 49b935881..3694b75d1 100644 --- a/Readme.md +++ b/Readme.md @@ -232,7 +232,7 @@ program When `.command()` is invoked with a description argument, no `.action(callback)` should be called to handle sub-commands, otherwise there will be an error. This tells commander that you're going to use separate executables for sub-commands, much like `git(1)` and other popular tools. The commander will try to search the executables in the directory of the entry script (like `./examples/pm`) with the name `program-command`, like `pm-install`, `pm-search`. -Options can be passed with the call to `.command()`. Specifying `true` for `opts.noHelp` will remove the option from the generated help output. Specifying `true` for `opts.isDefault` will run the subcommand if no other subcommand is specified. +Options can be passed with the call to `.command()`. Specifying `true` for `opts.noHelp` will remove the subcommand from the generated help output. Specifying `true` for `opts.isDefault` will run the subcommand if no other subcommand is specified. If the program is designed to be installed globally, make sure the executables have proper modes, like `755`. From d5c1d7d0b77d3fe7f0d021288da1fb231e801c26 Mon Sep 17 00:00:00 2001 From: Daniel Ruf Date: Sun, 10 Jun 2018 15:25:54 +0200 Subject: [PATCH 070/108] chore: remove Node.js 4 (EOL), add Node.js 10 --- .travis.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3eda82b4a..b2be7aa2b 100755 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,9 @@ language: node_js sudo: false node_js: -- "4" - "6" - "8" -- "9" -before_install: if [[ $(node -v) == v4* && $(npm -v) != 3* ]]; then npm i -g npm@3; fi +- "10" script: - npm run lint - npm test From 6889693e6b564184b98619bc85019a4e200ff01a Mon Sep 17 00:00:00 2001 From: Daniel Ruf Date: Sun, 10 Jun 2018 15:27:18 +0200 Subject: [PATCH 071/108] chore: cache node_modules --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index b2be7aa2b..2783c4f8f 100755 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,9 @@ node_js: - "6" - "8" - "10" +cache: + directories: + - "node_modules" script: - npm run lint - npm test From 3f4f5cafbf8069912173ec7385f74ad512863ec2 Mon Sep 17 00:00:00 2001 From: Bartosz Sosnowski Date: Thu, 28 Jun 2018 09:24:09 +0200 Subject: [PATCH 072/108] Make 'npm test' run on Windows (#820) --- Makefile | 3 +-- package.json | 2 +- test/run.js | 22 ++++++++++++++++++++++ 3 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 test/run.js diff --git a/Makefile b/Makefile index 007462553..4f5fc0193 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,6 @@ -TESTS = $(shell find test/test.*.js) test: - @./test/run $(TESTS) + @./test/run.js .PHONY: test \ No newline at end of file diff --git a/package.json b/package.json index de415afcb..c522c2602 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ }, "scripts": { "lint": "eslint index.js", - "test": "make test && npm run test-typings", + "test": "node test/run.js && npm run test-typings", "test-typings": "node_modules/typescript/bin/tsc -p tsconfig.json" }, "main": "index", diff --git a/test/run.js b/test/run.js new file mode 100644 index 000000000..45ddce056 --- /dev/null +++ b/test/run.js @@ -0,0 +1,22 @@ +#!/usr/bin/env node + +const { spawnSync } = require('child_process') +const { readdirSync } = require('fs') +const { extname, join } = require('path') + +process.env.NODE_ENV = 'test'; + +process.stdout.write('\n') +readdirSync(__dirname).forEach((file) => { + if (!file.startsWith('test.') || extname(file) !== '.js') + return; + process.stdout.write(`\x1b[90m ${file}\x1b[0m `); + const result = spawnSync(process.argv0, [ join('test', file) ]); + if (result.status === 0) { + process.stdout.write('\x1b[36m✓\x1b[0m\n'); + } else { + process.stdout.write('\x1b[31m✖\x1b[0m\n'); + console.error(result.stderr.toString('utf8')); + process.exit(result.status); + } +}) From 1f9354f2449e8a3746e9b70e12fe1ab6e5e09e71 Mon Sep 17 00:00:00 2001 From: Tomoaki Abe Date: Thu, 28 Jun 2018 18:42:03 +0900 Subject: [PATCH 073/108] Remove Makefile and `test/run` (#821) It becomes unnecessary in the following PR * Make 'npm test' run on Windows #820 --- Makefile | 6 ------ test/run | 16 ---------------- 2 files changed, 22 deletions(-) delete mode 100644 Makefile delete mode 100755 test/run diff --git a/Makefile b/Makefile deleted file mode 100644 index 4f5fc0193..000000000 --- a/Makefile +++ /dev/null @@ -1,6 +0,0 @@ - - -test: - @./test/run.js - -.PHONY: test \ No newline at end of file diff --git a/test/run b/test/run deleted file mode 100755 index 37893b525..000000000 --- a/test/run +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -export NODE_ENV=test - -echo -for file in $@; do - printf "\033[90m ${file#test/}\033[0m " - node $file 2> /tmp/stderr && echo "\033[36m✓\033[0m" - code=$? - if test $code -ne 0; then - echo "\033[31m✖\033[0m" - cat /tmp/stderr >&2 - exit $code - fi -done -echo \ No newline at end of file From 8db14db0e84d609398773288354ef85c610a3b97 Mon Sep 17 00:00:00 2001 From: abetomo Date: Fri, 29 Jun 2018 10:27:35 +0900 Subject: [PATCH 074/108] version bump 2.16.0 --- CHANGELOG.md | 14 ++++++++++++++ package-lock.json | 14 +++++++------- package.json | 6 +++--- 3 files changed, 24 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e2f813aa..2845bc159 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,18 @@ +2.16.0 / 2018-06-29 +================== + + * Remove Makefile and `test/run` (#821) + * Make 'npm test' run on Windows (#820) + * Add badge to display install size (#807) + * chore: cache node_modules (#814) + * chore: remove Node.js 4 (EOL), add Node.js 10 (#813) + * fixed typo in readme (#812) + * Fix types (#804) + * Update eslint to resolve vulnerabilities in lodash (#799) + * updated readme with custom event listeners. (#791) + * fix tests (#794) + 2.15.0 / 2018-03-07 ================== diff --git a/package-lock.json b/package-lock.json index 79c2a4f88..bb9e10cfd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,13 +1,13 @@ { "name": "commander", - "version": "2.15.1", + "version": "2.16.0", "lockfileVersion": 1, "requires": true, "dependencies": { "@types/node": { - "version": "7.0.55", - "resolved": "https://registry.npmjs.org/@types/node/-/node-7.0.55.tgz", - "integrity": "sha512-diCxfWNT4g2UM9Y+BPgy4s3egcZ2qOXc0mXLauvbsBUq9SBKQfh0SmuEUEhJVFZt/p6UDsjg1s2EgfM6OSlp4g==", + "version": "7.0.66", + "resolved": "https://registry.npmjs.org/@types/node/-/node-7.0.66.tgz", + "integrity": "sha512-W11u5kUNSX2+N6bJ7rPyLW4N98/xzrZg8apRoTwC0zbFjIie//oxgKAvqkQNQ97KVchB49ost74kgzoeDiE+Uw==", "dev": true }, "acorn": { @@ -2272,9 +2272,9 @@ "dev": true }, "typescript": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.7.2.tgz", - "integrity": "sha512-p5TCYZDAO0m4G344hD+wx/LATebLWZNkkh2asWUFqSsD2OrDNhbAHuSjobrmsUmdzjJjEeZVU9g1h3O6vpstnw==", + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz", + "integrity": "sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w==", "dev": true }, "uniq": { diff --git a/package.json b/package.json index c522c2602..d1418a919 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "commander", - "version": "2.15.1", + "version": "2.16.0", "description": "the complete solution for node.js command-line programs", "keywords": [ "commander", @@ -26,12 +26,12 @@ ], "dependencies": {}, "devDependencies": { - "@types/node": "^7.0.55", + "@types/node": "^7.0.66", "eslint": "^4.19.1", "should": "^11.2.1", "sinon": "^2.4.1", "standard": "^10.0.3", - "typescript": "^2.7.2" + "typescript": "^2.9.2" }, "typings": "typings/index.d.ts" } From aaa447a8f0717771d0b021c27b709ef867c220e0 Mon Sep 17 00:00:00 2001 From: Tomoaki Abe Date: Wed, 4 Jul 2018 03:13:17 +0900 Subject: [PATCH 075/108] npm update (#823) --- package-lock.json | 1421 +++++++++++++++++++++------------------------ package.json | 10 +- 2 files changed, 653 insertions(+), 778 deletions(-) diff --git a/package-lock.json b/package-lock.json index bb9e10cfd..709f0b0e1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,51 +4,52 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "@sinonjs/formatio": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", + "integrity": "sha512-ls6CAMA6/5gG+O/IdsBcblvnd8qcO/l1TYoNeAzp3wcISOxlPXQEus0mLcdwazEkWjaBdaJ3TaxmNgCLWwvWzg==", + "dev": true, + "requires": { + "samsam": "1.3.0" + } + }, "@types/node": { - "version": "7.0.66", - "resolved": "https://registry.npmjs.org/@types/node/-/node-7.0.66.tgz", - "integrity": "sha512-W11u5kUNSX2+N6bJ7rPyLW4N98/xzrZg8apRoTwC0zbFjIie//oxgKAvqkQNQ97KVchB49ost74kgzoeDiE+Uw==", + "version": "10.5.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.5.1.tgz", + "integrity": "sha512-AFLl1IALIuyt6oK4AYZsgWVJ/5rnyzQWud7IebaZWWV3YmgtPZkQmYio9R5Ze/2pdd7XfqF5bP+hWS11mAKoOQ==", "dev": true }, "acorn": { - "version": "5.5.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.3.tgz", - "integrity": "sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ==", + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.1.tgz", + "integrity": "sha512-d+nbxBUGKg7Arpsvbnlq61mc12ek3EY8EQldM3GPAhWJ1UVxC6TDGbIvUMNU6obBX3i1+ptCIzV4vq0gFPEGVQ==", "dev": true }, "acorn-jsx": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz", - "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-4.1.1.tgz", + "integrity": "sha512-JY+iV6r+cO21KtntVvFkD+iqjtdpRUpGqKWgfkCdZq1R+kbreEl8EcdcJR4SmiIgsIQT33s6QzheQ9a275Q8xw==", "dev": true, "requires": { - "acorn": "^3.0.4" - }, - "dependencies": { - "acorn": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", - "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", - "dev": true - } + "acorn": "^5.0.3" } }, "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.1.tgz", + "integrity": "sha512-pgZos1vgOHDiC7gKNbZW8eKvCnNXARv2oqrGQT7Hzbq5Azp7aZG6DJzADnkuSq7RH6qkXp4J/m68yPX/2uBHyQ==", "dev": true, "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", + "fast-deep-equal": "^2.0.1", "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.1" } }, "ajv-keywords": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-2.1.1.tgz", - "integrity": "sha1-YXmX/F9gV2iUxDX5QNgZ4TW4B2I=", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.2.0.tgz", + "integrity": "sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo=", "dev": true }, "ansi-escapes": { @@ -78,6 +79,16 @@ "sprintf-js": "~1.0.2" } }, + "array-includes": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.0.3.tgz", + "integrity": "sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0=", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "es-abstract": "^1.7.0" + } + }, "array-union": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", @@ -93,16 +104,6 @@ "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", "dev": true }, - "array.prototype.find": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/array.prototype.find/-/array.prototype.find-2.0.4.tgz", - "integrity": "sha1-VWpcU2LAhkgyPdrrnenRS8GGTJA=", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.7.0" - } - }, "arrify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", @@ -151,9 +152,9 @@ "dev": true }, "brace-expansion": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", - "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "requires": { "balanced-match": "^1.0.0", @@ -161,9 +162,9 @@ } }, "buffer-from": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.0.0.tgz", - "integrity": "sha512-83apNb8KK0Se60UE1+4Ukbe3HbfELJ6UlI4ldtOGs7So4KD26orJM8hIY9lxdzP+UpItH1Yh/Y8GUvNFWFFRxA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.0.tgz", + "integrity": "sha512-c5mRlguI/Pe2dSZmpER62rSCu0ryKmWddzRYsuXc50U2/g8jMOulc31VZMa4mYx31U5xsmSOpDCgH88Vl9cDGQ==", "dev": true }, "builtin-modules": { @@ -251,25 +252,19 @@ "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", "dev": true }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true - }, "color-convert": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", - "integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==", + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.2.tgz", + "integrity": "sha512-3NUJZdhMhcdPn8vJ9v2UQJoH0qqoGUkYTgFEPZaPjEtwmmKUfNV46zZmgB2M5M4DCEQHMaCfWHCxiBflLm04Tg==", "dev": true, "requires": { - "color-name": "^1.1.1" + "color-name": "1.1.1" } }, "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.1.tgz", + "integrity": "sha1-SxQVMEz1ACjqgWQ2Q72C6gWANok=", "dev": true }, "concat-map": { @@ -303,29 +298,22 @@ "dev": true }, "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", "dev": true, "requires": { - "lru-cache": "^4.0.1", + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", "shebang-command": "^1.2.0", "which": "^1.2.9" } }, - "d": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", - "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", - "dev": true, - "requires": { - "es5-ext": "^0.10.9" - } - }, "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", "dev": true, "requires": { "ms": "2.0.0" @@ -354,9 +342,9 @@ } }, "deglob": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/deglob/-/deglob-2.1.0.tgz", - "integrity": "sha1-TUSr4W7zLHebSXK9FBqAMlApoUo=", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/deglob/-/deglob-2.1.1.tgz", + "integrity": "sha512-2kjwuGGonL7gWE1XU4Fv79+vVzpoQCl0V+boMwWtOQJV2AGDabCwez++nB1Nli/8BabAfZQ/UuHPlp6AymKdWw==", "dev": true, "requires": { "find-root": "^1.0.0", @@ -383,9 +371,9 @@ } }, "diff": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.4.0.tgz", - "integrity": "sha512-QpVuMTEoJMF7cKzi6bvWhRulU1fZqZnvyVQgNhPaxxuTYwyjn/j1v9falseQ/uXWwPnO56RBfwtg4h/EQXmucA==", + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", "dev": true }, "doctrine": { @@ -398,18 +386,18 @@ } }, "error-ex": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", - "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "dev": true, "requires": { "is-arrayish": "^0.2.1" } }, "es-abstract": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.10.0.tgz", - "integrity": "sha512-/uh/DhdqIOSkAWifU+8nG78vlQxdLckUdI/sPgy0VhuXi2qJ7T8czBmqIYtLQVpCIFYafChnsRsB5pyb1JdmCQ==", + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz", + "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==", "dev": true, "requires": { "es-to-primitive": "^1.1.1", @@ -430,203 +418,139 @@ "is-symbol": "^1.0.1" } }, - "es5-ext": { - "version": "0.10.42", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.42.tgz", - "integrity": "sha512-AJxO1rmPe1bDEfSR6TJ/FgMFYuTBhR5R57KW58iCkYACMyFbrkqVyzXSurYoScDGvgyMpk7uRF/lPUPPTmsRSA==", - "dev": true, - "requires": { - "es6-iterator": "~2.0.3", - "es6-symbol": "~3.1.1", - "next-tick": "1" - } - }, - "es6-iterator": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" - } - }, - "es6-map": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz", - "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "~0.10.14", - "es6-iterator": "~2.0.1", - "es6-set": "~0.1.5", - "es6-symbol": "~3.1.1", - "event-emitter": "~0.3.5" - } - }, - "es6-set": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz", - "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "~0.10.14", - "es6-iterator": "~2.0.1", - "es6-symbol": "3.1.1", - "event-emitter": "~0.3.5" - } - }, - "es6-symbol": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", - "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "~0.10.14" - } - }, - "es6-weak-map": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz", - "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "^0.10.14", - "es6-iterator": "^2.0.1", - "es6-symbol": "^3.1.1" - } - }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "dev": true }, - "escope": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz", - "integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=", - "dev": true, - "requires": { - "es6-map": "^0.1.3", - "es6-weak-map": "^2.0.1", - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - } - }, "eslint": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.19.1.tgz", - "integrity": "sha512-bT3/1x1EbZB7phzYu7vCr1v3ONuzDtX8WjuM9c0iYxe+cq+pwcKEoQjl7zd3RpC6YOLgnSy3cTN58M2jcoPDIQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.0.1.tgz", + "integrity": "sha512-D5nG2rErquLUstgUaxJlWB5+gu+U/3VDY0fk/Iuq8y9CUFy/7Y6oF4N2cR1tV8knzQvciIbfqfohd359xTLIKQ==", "dev": true, "requires": { - "ajv": "^5.3.0", - "babel-code-frame": "^6.22.0", + "ajv": "^6.5.0", + "babel-code-frame": "^6.26.0", "chalk": "^2.1.0", - "concat-stream": "^1.6.0", - "cross-spawn": "^5.1.0", + "cross-spawn": "^6.0.5", "debug": "^3.1.0", "doctrine": "^2.1.0", - "eslint-scope": "^3.7.1", + "eslint-scope": "^4.0.0", "eslint-visitor-keys": "^1.0.0", - "espree": "^3.5.4", - "esquery": "^1.0.0", + "espree": "^4.0.0", + "esquery": "^1.0.1", "esutils": "^2.0.2", "file-entry-cache": "^2.0.0", "functional-red-black-tree": "^1.0.1", "glob": "^7.1.2", - "globals": "^11.0.1", + "globals": "^11.5.0", "ignore": "^3.3.3", "imurmurhash": "^0.1.4", - "inquirer": "^3.0.6", - "is-resolvable": "^1.0.0", - "js-yaml": "^3.9.1", + "inquirer": "^5.2.0", + "is-resolvable": "^1.1.0", + "js-yaml": "^3.11.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.3.0", - "lodash": "^4.17.4", - "minimatch": "^3.0.2", + "lodash": "^4.17.5", + "minimatch": "^3.0.4", "mkdirp": "^0.5.1", "natural-compare": "^1.4.0", "optionator": "^0.8.2", "path-is-inside": "^1.0.2", "pluralize": "^7.0.0", "progress": "^2.0.0", - "regexpp": "^1.0.1", + "regexpp": "^1.1.0", "require-uncached": "^1.0.3", - "semver": "^5.3.0", + "semver": "^5.5.0", + "string.prototype.matchall": "^2.0.0", "strip-ansi": "^4.0.0", - "strip-json-comments": "~2.0.1", - "table": "4.0.2", - "text-table": "~0.2.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } + "strip-json-comments": "^2.0.1", + "table": "^4.0.3", + "text-table": "^0.2.0" } }, "eslint-config-standard": { - "version": "10.2.1", - "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-10.2.1.tgz", - "integrity": "sha1-wGHk0GbzedwXzVYsZOgZtN1FRZE=", + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-11.0.0.tgz", + "integrity": "sha512-oDdENzpViEe5fwuRCWla7AXQd++/oyIp8zP+iP9jiUPG6NBj3SHgdgtl/kTn00AjeN+1HNvavTKmYbMo+xMOlw==", "dev": true }, "eslint-config-standard-jsx": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/eslint-config-standard-jsx/-/eslint-config-standard-jsx-4.0.2.tgz", - "integrity": "sha512-F8fRh2WFnTek7dZH9ZaE0PCBwdVGkwVWZmizla/DDNOmg7Tx6B/IlK5+oYpiX29jpu73LszeJj5i1axEZv6VMw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-standard-jsx/-/eslint-config-standard-jsx-5.0.0.tgz", + "integrity": "sha512-rLToPAEqLMPBfWnYTu6xRhm2OWziS2n40QFqJ8jAM8NSVzeVKTa3nclhsU4DpPJQRY60F34Oo1wi/71PN/eITg==", "dev": true }, "eslint-import-resolver-node": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.2.3.tgz", - "integrity": "sha1-Wt2BBujJKNssuiMrzZ76hG49oWw=", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz", + "integrity": "sha512-sfmTqJfPSizWu4aymbPr4Iidp5yKm8yDkHp+Ir3YiTHiiDfxh69mOUsmiqW6RZ9zRXFaF64GtYmN7e+8GHBv6Q==", "dev": true, "requires": { - "debug": "^2.2.0", - "object-assign": "^4.0.1", - "resolve": "^1.1.6" + "debug": "^2.6.9", + "resolve": "^1.5.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } } }, "eslint-module-utils": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.1.1.tgz", - "integrity": "sha512-jDI/X5l/6D1rRD/3T43q8Qgbls2nq5km5KSqiwlyUbGo5+04fXhMKdCPhjwbqAa6HXWaMxj8Q4hQDIh7IadJQw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.2.0.tgz", + "integrity": "sha1-snA2LNiLGkitMIl2zn+lTphBF0Y=", "dev": true, "requires": { "debug": "^2.6.8", "pkg-dir": "^1.0.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } } }, "eslint-plugin-import": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.2.0.tgz", - "integrity": "sha1-crowb60wXWfEgWNIpGmaQimsi04=", + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.9.0.tgz", + "integrity": "sha1-JgAu+/ylmJtyiKwEdQi9JPIXsWk=", "dev": true, "requires": { "builtin-modules": "^1.1.1", "contains-path": "^0.1.0", - "debug": "^2.2.0", + "debug": "^2.6.8", "doctrine": "1.5.0", - "eslint-import-resolver-node": "^0.2.0", - "eslint-module-utils": "^2.0.0", + "eslint-import-resolver-node": "^0.3.1", + "eslint-module-utils": "^2.1.1", "has": "^1.0.1", - "lodash.cond": "^4.3.0", + "lodash": "^4.17.4", "minimatch": "^3.0.3", - "pkg-up": "^1.0.0" + "read-pkg-up": "^2.0.0" }, "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, "doctrine": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", @@ -636,51 +560,43 @@ "esutils": "^2.0.2", "isarray": "^1.0.0" } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true } } }, "eslint-plugin-node": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-4.2.3.tgz", - "integrity": "sha512-vIUQPuwbVYdz/CYnlTLsJrRy7iXHQjdEe5wz0XhhdTym3IInM/zZLlPf9nZ2mThsH0QcsieCOWs2vOeCy/22LQ==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-6.0.1.tgz", + "integrity": "sha512-Q/Cc2sW1OAISDS+Ji6lZS2KV4b7ueA/WydVWd1BECTQwVvfQy5JAi3glhINoKzoMnfnuRgNP+ZWKrGAbp3QDxw==", "dev": true, "requires": { - "ignore": "^3.0.11", - "minimatch": "^3.0.2", - "object-assign": "^4.0.1", - "resolve": "^1.1.7", - "semver": "5.3.0" + "ignore": "^3.3.6", + "minimatch": "^3.0.4", + "resolve": "^1.3.3", + "semver": "^5.4.1" } }, "eslint-plugin-promise": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-3.5.0.tgz", - "integrity": "sha1-ePu2/+BHIBYnVp6FpsU3OvKmj8o=", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-3.7.0.tgz", + "integrity": "sha512-2WO+ZFh7vxUKRfR0cOIMrWgYKdR6S1AlOezw6pC52B6oYpd5WFghN+QHxvrRdZMtbo8h3dfUZ2o1rWb0UPbKtg==", "dev": true }, "eslint-plugin-react": { - "version": "6.10.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-6.10.3.tgz", - "integrity": "sha1-xUNb6wZ3ThLH2y9qut3L+QDNP3g=", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.7.0.tgz", + "integrity": "sha512-KC7Snr4YsWZD5flu6A5c0AcIZidzW3Exbqp7OT67OaD2AppJtlBr/GuPrW/vaQM/yfZotEvKAdrxrO+v8vwYJA==", "dev": true, "requires": { - "array.prototype.find": "^2.0.1", - "doctrine": "^1.2.2", + "doctrine": "^2.0.2", "has": "^1.0.1", - "jsx-ast-utils": "^1.3.4", - "object.assign": "^4.0.4" - }, - "dependencies": { - "doctrine": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", - "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "isarray": "^1.0.0" - } - } + "jsx-ast-utils": "^2.0.1", + "prop-types": "^15.6.0" } }, "eslint-plugin-standard": { @@ -690,9 +606,9 @@ "dev": true }, "eslint-scope": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", - "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.0.tgz", + "integrity": "sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==", "dev": true, "requires": { "esrecurse": "^4.1.0", @@ -706,13 +622,13 @@ "dev": true }, "espree": { - "version": "3.5.4", - "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.4.tgz", - "integrity": "sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-4.0.0.tgz", + "integrity": "sha512-kapdTCt1bjmspxStVKX6huolXVV5ZfyZguY1lcfhVVZstce3bqxH9mcLzNn3/mlgW6wQ732+0fuG9v7h0ZQoKg==", "dev": true, "requires": { - "acorn": "^5.5.0", - "acorn-jsx": "^3.0.0" + "acorn": "^5.6.0", + "acorn-jsx": "^4.1.1" } }, "esprima": { @@ -751,22 +667,6 @@ "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", "dev": true }, - "event-emitter": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", - "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "~0.10.14" - } - }, - "exit-hook": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz", - "integrity": "sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g=", - "dev": true - }, "external-editor": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", @@ -779,9 +679,9 @@ } }, "fast-deep-equal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", - "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", "dev": true }, "fast-json-stable-stringify": { @@ -849,15 +749,6 @@ "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=", "dev": true }, - "formatio": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/formatio/-/formatio-1.2.0.tgz", - "integrity": "sha1-87IWfZBoxGmKjVH092CjmlTYGOs=", - "dev": true, - "requires": { - "samsam": "1.x" - } - }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -876,25 +767,10 @@ "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", "dev": true }, - "generate-function": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz", - "integrity": "sha1-aFj+fAlpt9TpCTM3ZHrHn2DfvnQ=", - "dev": true - }, - "generate-object-property": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz", - "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=", - "dev": true, - "requires": { - "is-property": "^1.0.0" - } - }, "get-stdin": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-5.0.1.tgz", - "integrity": "sha1-Ei4WFZHiH/TFJTAwVpPyDmOTo5g=", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", + "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==", "dev": true }, "glob": { @@ -912,9 +788,9 @@ } }, "globals": { - "version": "11.5.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.5.0.tgz", - "integrity": "sha512-hYyf+kI8dm3nORsiiXUQigOU62hDLfJ9G01uyGMxhc6BKsircrUhC4uJPQPUSuq2GrTmiiEt7ewxlMdBewfmKQ==", + "version": "11.7.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.7.0.tgz", + "integrity": "sha512-K8BNSPySfeShBQXsahYB/AbbWruVOTyVpgoIDnl8odPpeSfP2J5QO2oLFFdl2j7GfDCtZj2bMKar2T49itTPCg==", "dev": true }, "globby": { @@ -938,12 +814,12 @@ "dev": true }, "has": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz", - "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "dev": true, "requires": { - "function-bind": "^1.0.2" + "function-bind": "^1.1.1" } }, "has-ansi": { @@ -967,6 +843,12 @@ "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", "dev": true }, + "hosted-git-info": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.1.tgz", + "integrity": "sha512-Ba4+0M4YvIDUUsprMjhVTU1yN9F2/LJSAl69ZpzaLT4l4j5mwTS6jqqW9Ojvj6lKz/veqPzpJBqGbXspOb533A==", + "dev": true + }, "iconv-lite": { "version": "0.4.23", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", @@ -977,9 +859,9 @@ } }, "ignore": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.7.tgz", - "integrity": "sha512-YGG3ejvBNHRqu0559EOxxNFihD0AjpvHlC/pdGKd3X3ofe+CoJkYazwNJYTNebqpPKN+VVQbh4ZFn1DivMNuHA==", + "version": "3.3.10", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", + "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", "dev": true }, "imurmurhash": { @@ -1005,39 +887,41 @@ "dev": true }, "inquirer": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz", - "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-5.2.0.tgz", + "integrity": "sha512-E9BmnJbAKLPGonz0HeWHtbKf+EeSP93paWO3ZYoUpq/aowXvYGjjCSuashhXPpzbArIjBbji39THkxTz9ZeEUQ==", "dev": true, "requires": { "ansi-escapes": "^3.0.0", "chalk": "^2.0.0", "cli-cursor": "^2.1.0", "cli-width": "^2.0.0", - "external-editor": "^2.0.4", + "external-editor": "^2.1.0", "figures": "^2.0.0", "lodash": "^4.3.0", "mute-stream": "0.0.7", "run-async": "^2.2.0", - "rx-lite": "^4.0.8", - "rx-lite-aggregates": "^4.0.8", + "rxjs": "^5.5.2", "string-width": "^2.1.0", "strip-ansi": "^4.0.0", "through": "^2.3.6" } }, - "interpret": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", - "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=", - "dev": true - }, "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", "dev": true }, + "is-builtin-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "dev": true, + "requires": { + "builtin-modules": "^1.0.0" + } + }, "is-callable": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.3.tgz", @@ -1056,25 +940,6 @@ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true }, - "is-my-ip-valid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-my-ip-valid/-/is-my-ip-valid-1.0.0.tgz", - "integrity": "sha512-gmh/eWXROncUzRnIa1Ubrt5b8ep/MGSnfAUI3aRp+sqTCs1tv1Isl8d8F6JmkN3dXKc3ehZMrtiPN9eL03NuaQ==", - "dev": true - }, - "is-my-json-valid": { - "version": "2.17.2", - "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.17.2.tgz", - "integrity": "sha512-IBhBslgngMQN8DDSppmgDv7RNrlFotuuDsKcrCP3+HbFaVivIBU7u9oiiErw8sH4ynx3+gOGQ3q2otkgiSi6kg==", - "dev": true, - "requires": { - "generate-function": "^2.0.0", - "generate-object-property": "^1.1.0", - "is-my-ip-valid": "^1.0.0", - "jsonpointer": "^4.0.0", - "xtend": "^4.0.0" - } - }, "is-path-cwd": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", @@ -1105,12 +970,6 @@ "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", "dev": true }, - "is-property": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", - "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=", - "dev": true - }, "is-regex": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", @@ -1133,9 +992,9 @@ "dev": true }, "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", "dev": true }, "isexe": { @@ -1151,9 +1010,9 @@ "dev": true }, "js-yaml": { - "version": "3.11.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.11.0.tgz", - "integrity": "sha512-saJstZWv7oNeOyBh3+Dx1qWzhW0+e6/8eDzo7p5rDFqxntSztloLtuKu+Ejhtq82jsilwOIZYsCz+lIjthg1Hw==", + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", + "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", "dev": true, "requires": { "argparse": "^1.0.7", @@ -1161,48 +1020,36 @@ } }, "json-parse-better-errors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.1.tgz", - "integrity": "sha512-xyQpxeWWMKyJps9CuGJYeng6ssI5bpqS9ltQpdVQ90t4ql6NdnxFKh95JcRt2cun/DjMVNrdjniLPuMA69xmCw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", "dev": true }, "json-schema-traverse": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", - "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, - "json-stable-stringify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", - "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", - "dev": true, - "requires": { - "jsonify": "~0.0.0" - } - }, "json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", "dev": true }, - "jsonify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", - "dev": true - }, - "jsonpointer": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz", - "integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=", - "dev": true - }, "jsx-ast-utils": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-1.4.1.tgz", - "integrity": "sha1-OGchPo3Xm/Ho8jAMDPwe+xgsDfE=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-2.0.1.tgz", + "integrity": "sha1-6AGxs5mF4g//yHtA43SAgOLcrH8=", + "dev": true, + "requires": { + "array-includes": "^3.0.3" + } + }, + "just-extend": { + "version": "1.1.27", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-1.1.27.tgz", + "integrity": "sha512-mJVp13Ix6gFo3SBAy9U/kL+oeZqzlYYYLQBwXVBlVzIsZwBqGREnOro24oC/8s8aox+rJhtZ2DiQof++IrkA+g==", "dev": true }, "levn": { @@ -1216,23 +1063,15 @@ } }, "load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "dev": true, "requires": { "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", + "parse-json": "^2.2.0", + "pify": "^2.0.0", "strip-bom": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } } }, "locate-path": { @@ -1259,18 +1098,27 @@ "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==", "dev": true }, - "lodash.cond": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/lodash.cond/-/lodash.cond-4.5.2.tgz", - "integrity": "sha1-9HGh2khr5g9quVXRcRVSPdHSVdU=", + "lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", "dev": true }, "lolex": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/lolex/-/lolex-1.6.0.tgz", - "integrity": "sha1-OpoCg0UqR9dDnnJzG54H1zhuSfY=", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.7.0.tgz", + "integrity": "sha512-uJkH2e0BVfU5KOJUevbTOtpDduooSarH5PopO+LfM/vZf8Z9sJzODqKev804JYM2i++ktJfUmC1le4LwFQ1VMg==", "dev": true }, + "loose-envify": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", + "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", + "dev": true, + "requires": { + "js-tokens": "^3.0.0" + } + }, "lru-cache": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", @@ -1323,29 +1171,42 @@ "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", "dev": true }, - "native-promise-only": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/native-promise-only/-/native-promise-only-0.8.1.tgz", - "integrity": "sha1-IKMYwwy0X3H+et+/eyHJnBRy7xE=", - "dev": true - }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, - "next-tick": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", - "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", + "nice-try": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.4.tgz", + "integrity": "sha512-2NpiFHqC87y/zFke0fC0spBXL3bBsoh/p5H1EFhshxjCR5+0g2d6BiXbUFz9v1sAcxsk2htp2eQnNIci2dIYcA==", "dev": true }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true + "nise": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/nise/-/nise-1.4.2.tgz", + "integrity": "sha512-BxH/DxoQYYdhKgVAfqVy4pzXRZELHOIewzoesxpjYvpU+7YOalQhGNPf7wAx8pLrTNPrHRDlLOkAl8UI0ZpXjw==", + "dev": true, + "requires": { + "@sinonjs/formatio": "^2.0.0", + "just-extend": "^1.1.27", + "lolex": "^2.3.2", + "path-to-regexp": "^1.7.0", + "text-encoding": "^0.6.4" + } + }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } }, "object-assign": { "version": "4.1.1", @@ -1354,23 +1215,11 @@ "dev": true }, "object-keys": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz", - "integrity": "sha1-xUYBd4rVYPEULODgG8yotW0TQm0=", + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", + "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==", "dev": true }, - "object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" - } - }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -1403,12 +1252,6 @@ "wordwrap": "~1.0.0" } }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", - "dev": true - }, "os-tmpdir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", @@ -1416,9 +1259,9 @@ "dev": true }, "p-limit": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.2.0.tgz", - "integrity": "sha512-Y/OtIaXtUPr4/YpMv1pCL5L5ed0rumAaAeBSj12F+bSlMdys7i8oQF/GUJmfpTS/QoaRrS/k6pma29haJpsMng==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", "dev": true, "requires": { "p-try": "^1.0.0" @@ -1440,13 +1283,12 @@ "dev": true }, "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", "dev": true, "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" + "error-ex": "^1.2.0" } }, "path-exists": { @@ -1470,6 +1312,12 @@ "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", "dev": true }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, "path-parse": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", @@ -1483,14 +1331,15 @@ "dev": true, "requires": { "isarray": "0.0.1" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - } + } + }, + "path-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "dev": true, + "requires": { + "pify": "^2.0.0" } }, "pify": { @@ -1532,6 +1381,34 @@ "requires": { "locate-path": "^2.0.0" } + }, + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + } + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true } } }, @@ -1555,15 +1432,6 @@ "find-up": "^1.0.0" } }, - "pkg-up": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-1.0.0.tgz", - "integrity": "sha1-Pgj7RhUlxEIWJKM7n35tCvWwWiY=", - "dev": true, - "requires": { - "find-up": "^1.0.0" - } - }, "pluralize": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", @@ -1588,12 +1456,60 @@ "integrity": "sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8=", "dev": true }, + "prop-types": { + "version": "15.6.2", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.2.tgz", + "integrity": "sha512-3pboPvLiWD7dkI3qf3KbUe6hKFKa52w+AE0VCqECtf+QHAKgOL37tTaNCnuX1nAAQ4ZhyP+kYVKf8rLmJ/feDQ==", + "dev": true, + "requires": { + "loose-envify": "^1.3.1", + "object-assign": "^4.1.1" + } + }, "pseudomap": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", "dev": true }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "read-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "dev": true, + "requires": { + "load-json-file": "^2.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^2.0.0" + } + }, + "read-pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "dev": true, + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^2.0.0" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + } + } + }, "readable-stream": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", @@ -1607,43 +1523,23 @@ "safe-buffer": "~5.1.1", "string_decoder": "~1.1.1", "util-deprecate": "~1.0.1" - } - }, - "readline2": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/readline2/-/readline2-1.0.1.tgz", - "integrity": "sha1-QQWWCP/BVHV7cV2ZidGZ/783LjU=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "mute-stream": "0.0.5" }, "dependencies": { - "is-fullwidth-code-point": { + "isarray": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "mute-stream": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.5.tgz", - "integrity": "sha1-j7+rsKmKJT0xhDMfno3rc3L6xsA=", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", "dev": true } } }, - "rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "regexp.prototype.flags": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.2.0.tgz", + "integrity": "sha512-ztaw4M1VqgMwl9HlPpOuiYgItcHlunW0He2fE6eNfT6E/CF2FtYi9ofOYe4mKntstYk0Fyh/rDRBdS3AnxjlrA==", "dev": true, "requires": { - "resolve": "^1.1.6" + "define-properties": "^1.1.2" } }, "regexpp": { @@ -1663,9 +1559,9 @@ } }, "resolve": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz", - "integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", + "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", "dev": true, "requires": { "path-parse": "^1.0.5" @@ -1706,9 +1602,9 @@ } }, "run-parallel": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.6.tgz", - "integrity": "sha1-KQA8miFj4B4tLfyQV18sbB1hoDk=", + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.9.tgz", + "integrity": "sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q==", "dev": true }, "rx-lite": { @@ -1726,6 +1622,15 @@ "rx-lite": "*" } }, + "rxjs": { + "version": "5.5.11", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.11.tgz", + "integrity": "sha512-3bjO7UwWfA2CV7lmwYMBzj4fQ6Cq+ftHc2MvUe+WMS7wcdJ1LosDWmdjPQanYp2dBRj572p7PeU81JUxHKOcBA==", + "dev": true, + "requires": { + "symbol-observable": "1.0.1" + } + }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -1745,9 +1650,9 @@ "dev": true }, "semver": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", - "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", "dev": true }, "shebang-command": { @@ -1765,37 +1670,26 @@ "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", "dev": true }, - "shelljs": { - "version": "0.7.8", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.7.8.tgz", - "integrity": "sha1-3svPh0sNHl+3LhSxZKloMEjprLM=", - "dev": true, - "requires": { - "glob": "^7.0.0", - "interpret": "^1.0.0", - "rechoir": "^0.6.2" - } - }, "should": { - "version": "11.2.1", - "resolved": "https://registry.npmjs.org/should/-/should-11.2.1.tgz", - "integrity": "sha1-kPVRRVUtAc/CAGZuToGKHJZw7aI=", + "version": "13.2.1", + "resolved": "https://registry.npmjs.org/should/-/should-13.2.1.tgz", + "integrity": "sha512-l+/NwEMO+DcstsHEwPHRHzC9j4UOE3VQwJGcMWSsD/vqpqHbnQ+1iSHy64Ihmmjx1uiRPD9pFadTSc3MJtXAgw==", "dev": true, "requires": { - "should-equal": "^1.0.0", - "should-format": "^3.0.2", + "should-equal": "^2.0.0", + "should-format": "^3.0.3", "should-type": "^1.4.0", "should-type-adaptors": "^1.0.1", "should-util": "^1.0.0" } }, "should-equal": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/should-equal/-/should-equal-1.0.1.tgz", - "integrity": "sha1-C26VFvJgGp+wuy3MNpr6HH4gCvc=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/should-equal/-/should-equal-2.0.0.tgz", + "integrity": "sha512-ZP36TMrK9euEuWQYBig9W55WPC7uo37qzAEmbjHz4gfyuXrEUgF8cUvQVO+w+d3OMfPvSRQJ22lSm8MQJ43LTA==", "dev": true, "requires": { - "should-type": "^1.0.0" + "should-type": "^1.4.0" } }, "should-format": { @@ -1837,19 +1731,29 @@ "dev": true }, "sinon": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-2.4.1.tgz", - "integrity": "sha512-vFTrO9Wt0ECffDYIPSP/E5bBugt0UjcBQOfQUMh66xzkyPEnhl/vM2LRZi2ajuTdkH07sA6DzrM6KvdvGIH8xw==", - "dev": true, - "requires": { - "diff": "^3.1.0", - "formatio": "1.2.0", - "lolex": "^1.6.0", - "native-promise-only": "^0.8.1", - "path-to-regexp": "^1.7.0", - "samsam": "^1.1.3", - "text-encoding": "0.6.4", - "type-detect": "^4.0.0" + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-6.0.1.tgz", + "integrity": "sha512-rfszhNcfamK2+ofIPi9XqeH89pH7KGDcAtM+F9CsjHXOK3jzWG99vyhyD2V+r7s4IipmWcWUFYq4ftZ9/Eu2Wg==", + "dev": true, + "requires": { + "@sinonjs/formatio": "^2.0.0", + "diff": "^3.5.0", + "lodash.get": "^4.4.2", + "lolex": "^2.4.2", + "nise": "^1.3.3", + "supports-color": "^5.4.0", + "type-detect": "^4.0.8" + }, + "dependencies": { + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } } }, "slice-ansi": { @@ -1861,6 +1765,38 @@ "is-fullwidth-code-point": "^2.0.0" } }, + "spdx-correct": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", + "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", + "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", + "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==", + "dev": true + }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -1868,281 +1804,191 @@ "dev": true }, "standard": { - "version": "10.0.3", - "resolved": "https://registry.npmjs.org/standard/-/standard-10.0.3.tgz", - "integrity": "sha512-JURZ+85ExKLQULckDFijdX5WHzN6RC7fgiZNSV4jFQVo+3tPoQGHyBrGekye/yf0aOfb4210EM5qPNlc2cRh4w==", - "dev": true, - "requires": { - "eslint": "~3.19.0", - "eslint-config-standard": "10.2.1", - "eslint-config-standard-jsx": "4.0.2", - "eslint-plugin-import": "~2.2.0", - "eslint-plugin-node": "~4.2.2", - "eslint-plugin-promise": "~3.5.0", - "eslint-plugin-react": "~6.10.0", + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/standard/-/standard-11.0.1.tgz", + "integrity": "sha512-nu0jAcHiSc8H+gJCXeiziMVZNDYi8MuqrYJKxTgjP4xKXZMKm311boqQIzDrYI/ktosltxt2CbDjYQs9ANC8IA==", + "dev": true, + "requires": { + "eslint": "~4.18.0", + "eslint-config-standard": "11.0.0", + "eslint-config-standard-jsx": "5.0.0", + "eslint-plugin-import": "~2.9.0", + "eslint-plugin-node": "~6.0.0", + "eslint-plugin-promise": "~3.7.0", + "eslint-plugin-react": "~7.7.0", "eslint-plugin-standard": "~3.0.1", - "standard-engine": "~7.0.0" + "standard-engine": "~8.0.0" }, "dependencies": { + "acorn-jsx": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz", + "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", + "dev": true, + "requires": { + "acorn": "^3.0.4" + }, + "dependencies": { + "acorn": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", + "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", + "dev": true + } + } + }, "ajv": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", - "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", "dev": true, "requires": { "co": "^4.6.0", - "json-stable-stringify": "^1.0.1" + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" } }, "ajv-keywords": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-1.5.1.tgz", - "integrity": "sha1-MU3QpLM2j609/NxU7eYXG4htrzw=", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-2.1.1.tgz", + "integrity": "sha1-YXmX/F9gV2iUxDX5QNgZ4TW4B2I=", "dev": true }, - "ansi-escapes": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", - "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "cli-cursor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", - "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", "dev": true, "requires": { - "restore-cursor": "^1.0.1" + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" } }, "eslint": { - "version": "3.19.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-3.19.0.tgz", - "integrity": "sha1-yPxiAcf0DdCJQbh8CFdnOGpnmsw=", + "version": "4.18.2", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.18.2.tgz", + "integrity": "sha512-qy4i3wODqKMYfz9LUI8N2qYDkHkoieTbiHpMrYUI/WbjhXJQr7lI4VngixTgaG+yHX+NBCv7nW4hA0ShbvaNKw==", "dev": true, "requires": { - "babel-code-frame": "^6.16.0", - "chalk": "^1.1.3", - "concat-stream": "^1.5.2", - "debug": "^2.1.1", - "doctrine": "^2.0.0", - "escope": "^3.6.0", - "espree": "^3.4.0", + "ajv": "^5.3.0", + "babel-code-frame": "^6.22.0", + "chalk": "^2.1.0", + "concat-stream": "^1.6.0", + "cross-spawn": "^5.1.0", + "debug": "^3.1.0", + "doctrine": "^2.1.0", + "eslint-scope": "^3.7.1", + "eslint-visitor-keys": "^1.0.0", + "espree": "^3.5.2", "esquery": "^1.0.0", - "estraverse": "^4.2.0", "esutils": "^2.0.2", "file-entry-cache": "^2.0.0", - "glob": "^7.0.3", - "globals": "^9.14.0", - "ignore": "^3.2.0", + "functional-red-black-tree": "^1.0.1", + "glob": "^7.1.2", + "globals": "^11.0.1", + "ignore": "^3.3.3", "imurmurhash": "^0.1.4", - "inquirer": "^0.12.0", - "is-my-json-valid": "^2.10.0", + "inquirer": "^3.0.6", "is-resolvable": "^1.0.0", - "js-yaml": "^3.5.1", - "json-stable-stringify": "^1.0.0", + "js-yaml": "^3.9.1", + "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.3.0", - "lodash": "^4.0.0", - "mkdirp": "^0.5.0", + "lodash": "^4.17.4", + "minimatch": "^3.0.2", + "mkdirp": "^0.5.1", "natural-compare": "^1.4.0", "optionator": "^0.8.2", - "path-is-inside": "^1.0.1", - "pluralize": "^1.2.1", - "progress": "^1.1.8", - "require-uncached": "^1.0.2", - "shelljs": "^0.7.5", - "strip-bom": "^3.0.0", + "path-is-inside": "^1.0.2", + "pluralize": "^7.0.0", + "progress": "^2.0.0", + "require-uncached": "^1.0.3", + "semver": "^5.3.0", + "strip-ansi": "^4.0.0", "strip-json-comments": "~2.0.1", - "table": "^3.7.8", - "text-table": "~0.2.0", - "user-home": "^2.0.0" - } - }, - "figures": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", - "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5", - "object-assign": "^4.1.0" + "table": "4.0.2", + "text-table": "~0.2.0" } }, - "globals": { - "version": "9.18.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", - "dev": true - }, - "inquirer": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-0.12.0.tgz", - "integrity": "sha1-HvK/1jUE3wvHV4X/+MLEHfEvB34=", + "eslint-scope": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", + "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", "dev": true, "requires": { - "ansi-escapes": "^1.1.0", - "ansi-regex": "^2.0.0", - "chalk": "^1.0.0", - "cli-cursor": "^1.0.1", - "cli-width": "^2.0.0", - "figures": "^1.3.5", - "lodash": "^4.3.0", - "readline2": "^1.0.1", - "run-async": "^0.1.0", - "rx-lite": "^3.1.2", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.0", - "through": "^2.3.6" + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" } }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "espree": { + "version": "3.5.4", + "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.4.tgz", + "integrity": "sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A==", "dev": true, "requires": { - "number-is-nan": "^1.0.0" + "acorn": "^5.5.0", + "acorn-jsx": "^3.0.0" } }, - "onetime": { + "fast-deep-equal": { "version": "1.1.0", - "resolved": "http://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", - "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", - "dev": true - }, - "pluralize": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-1.2.1.tgz", - "integrity": "sha1-0aIUg/0iu0HlihL6NCGCMUCJfEU=", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", "dev": true }, - "progress": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/progress/-/progress-1.1.8.tgz", - "integrity": "sha1-4mDHj2Fhzdmw5WzD4Khd4Xx6V74=", - "dev": true - }, - "restore-cursor": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", - "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", - "dev": true, - "requires": { - "exit-hook": "^1.0.0", - "onetime": "^1.0.0" - } - }, - "run-async": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-0.1.0.tgz", - "integrity": "sha1-yK1KXhEGYeQCp9IbUw4AnyX444k=", + "inquirer": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz", + "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", "dev": true, "requires": { - "once": "^1.3.0" + "ansi-escapes": "^3.0.0", + "chalk": "^2.0.0", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^2.0.4", + "figures": "^2.0.0", + "lodash": "^4.3.0", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rx-lite": "^4.0.8", + "rx-lite-aggregates": "^4.0.8", + "string-width": "^2.1.0", + "strip-ansi": "^4.0.0", + "through": "^2.3.6" } }, - "rx-lite": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-3.1.2.tgz", - "integrity": "sha1-Gc5QLKVyZl87ZHsQk5+X/RYV8QI=", - "dev": true - }, - "slice-ansi": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz", - "integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU=", + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", "dev": true }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, "table": { - "version": "3.8.3", - "resolved": "https://registry.npmjs.org/table/-/table-3.8.3.tgz", - "integrity": "sha1-K7xULw/amGGnVdOUf+/Ys/UThV8=", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/table/-/table-4.0.2.tgz", + "integrity": "sha512-UUkEAPdSGxtRpiV9ozJ5cMTtYiqz7Ni1OGqLXRCynrvzdtR1p+cfOWe2RJLwvUG8hNanaSRjecIqwOjqeatDsA==", "dev": true, "requires": { - "ajv": "^4.7.0", - "ajv-keywords": "^1.0.0", - "chalk": "^1.1.1", - "lodash": "^4.0.0", - "slice-ansi": "0.0.4", - "string-width": "^2.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } + "ajv": "^5.2.3", + "ajv-keywords": "^2.1.0", + "chalk": "^2.1.0", + "lodash": "^4.17.4", + "slice-ansi": "1.0.0", + "string-width": "^2.1.1" } } } }, "standard-engine": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/standard-engine/-/standard-engine-7.0.0.tgz", - "integrity": "sha1-67d7nI/CyBZf+jU72Rug3/Qa9pA=", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/standard-engine/-/standard-engine-8.0.1.tgz", + "integrity": "sha512-LA531C3+nljom/XRvdW/hGPXwmilRkaRkENhO3FAGF1Vtq/WtCXzgmnc5S6vUHHsgv534MRy02C1ikMwZXC+tw==", "dev": true, "requires": { "deglob": "^2.1.0", - "get-stdin": "^5.0.1", + "get-stdin": "^6.0.0", "minimist": "^1.1.0", "pkg-conf": "^2.0.0" }, @@ -2165,6 +2011,19 @@ "strip-ansi": "^4.0.0" } }, + "string.prototype.matchall": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-2.0.0.tgz", + "integrity": "sha512-WoZ+B2ypng1dp4iFLF2kmZlwwlE19gmjgKuhL1FJfDgCREWb3ye3SDVHSzLH6bxfnvYmkCxbzkmWcQZHA4P//Q==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "es-abstract": "^1.10.0", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "regexp.prototype.flags": "^1.2.0" + } + }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -2209,14 +2068,20 @@ "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", "dev": true }, + "symbol-observable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", + "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=", + "dev": true + }, "table": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/table/-/table-4.0.2.tgz", - "integrity": "sha512-UUkEAPdSGxtRpiV9ozJ5cMTtYiqz7Ni1OGqLXRCynrvzdtR1p+cfOWe2RJLwvUG8hNanaSRjecIqwOjqeatDsA==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/table/-/table-4.0.3.tgz", + "integrity": "sha512-S7rnFITmBH1EnyKcvxBh1LjYeQMmnZtCXSEbHcH6S0NoKit24ZuFO/T1vDcLdYsLQkM188PVVhQmzKIuThNkKg==", "dev": true, "requires": { - "ajv": "^5.2.3", - "ajv-keywords": "^2.1.0", + "ajv": "^6.0.1", + "ajv-keywords": "^3.0.0", "chalk": "^2.1.0", "lodash": "^4.17.4", "slice-ansi": "1.0.0", @@ -2260,9 +2125,9 @@ } }, "type-detect": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.7.tgz", - "integrity": "sha512-4Rh17pAMVdMWzktddFhISRnUnFIStObtUMNGzDwlA6w/77bmGv3aBbRdCmQR6IjzfkTo9otnW+2K/cDRhKSxDA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true }, "typedarray": { @@ -2283,13 +2148,13 @@ "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=", "dev": true }, - "user-home": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/user-home/-/user-home-2.0.0.tgz", - "integrity": "sha1-nHC/2Babwdy/SGBODwS4tJzenp8=", + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", "dev": true, "requires": { - "os-homedir": "^1.0.0" + "punycode": "^2.1.0" } }, "util-deprecate": { @@ -2298,10 +2163,20 @@ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true }, + "validate-npm-package-license": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz", + "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, "which": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", - "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, "requires": { "isexe": "^2.0.0" diff --git a/package.json b/package.json index d1418a919..c037762ba 100644 --- a/package.json +++ b/package.json @@ -26,11 +26,11 @@ ], "dependencies": {}, "devDependencies": { - "@types/node": "^7.0.66", - "eslint": "^4.19.1", - "should": "^11.2.1", - "sinon": "^2.4.1", - "standard": "^10.0.3", + "@types/node": "^10.5.1", + "eslint": "^5.0.1", + "should": "^13.2.1", + "sinon": "^6.0.1", + "standard": "^11.0.1", "typescript": "^2.9.2" }, "typings": "typings/index.d.ts" From 2d49ddf7ab4663629f8661e216ca66b5fad3966d Mon Sep 17 00:00:00 2001 From: Tomoaki Abe Date: Sat, 14 Jul 2018 05:01:14 +0900 Subject: [PATCH 076/108] Fix the path of tsc command (#824) Since there is a tsc command below `./node_modules/.bin`, `./node_modules/.bin` has been added to `PATH`. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c037762ba..baa3e770b 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "scripts": { "lint": "eslint index.js", "test": "node test/run.js && npm run test-typings", - "test-typings": "node_modules/typescript/bin/tsc -p tsconfig.json" + "test-typings": "tsc -p tsconfig.json" }, "main": "index", "files": [ From 28ff02a9e47a91a5e01adaf06ac49e127813759c Mon Sep 17 00:00:00 2001 From: Tomoaki Abe Date: Tue, 17 Jul 2018 15:09:59 +0900 Subject: [PATCH 077/108] Fix to emit the action even without command (#778) * Fix to emit the action even without command * Fix to emit the action even without command --- index.js | 3 +++ test/test.noCommand.action.js | 13 +++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 test/test.noCommand.action.js diff --git a/index.js b/index.js index 0f54b5ef7..28932c329 100644 --- a/index.js +++ b/index.js @@ -660,6 +660,9 @@ Command.prototype.parseArgs = function(args, unknown) { if (unknown.length > 0) { this.unknownOption(unknown[0]); } + if (this._args.filter(a => a.required).length === 0) { + this.emit('command:*'); + } } return this; diff --git a/test/test.noCommand.action.js b/test/test.noCommand.action.js new file mode 100644 index 000000000..ae4aecc66 --- /dev/null +++ b/test/test.noCommand.action.js @@ -0,0 +1,13 @@ +var program = require('../') + , should = require('should'); + +var val = false; +program + .option('-C, --no-color', 'turn off color output') + .action(function () { + val = this.color; + }); + +program.parse(['node', 'test']); + +program.color.should.equal(val); From 6ddb8ebf01b61b312094870db6a587d972e8ee31 Mon Sep 17 00:00:00 2001 From: Jared Petersen Date: Thu, 2 Aug 2018 08:43:54 -0700 Subject: [PATCH 078/108] fixed newline output after help information (#833) --- index.js | 1 + test/test.command.helpInformation.js | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 test/test.command.helpInformation.js diff --git a/index.js b/index.js index 28932c329..eebaec03a 100644 --- a/index.js +++ b/index.js @@ -1130,6 +1130,7 @@ Command.prototype.helpInformation = function() { .concat(desc) .concat(options) .concat(cmds) + .concat(['']) .join('\n'); }; diff --git a/test/test.command.helpInformation.js b/test/test.command.helpInformation.js new file mode 100644 index 000000000..0c8f3877e --- /dev/null +++ b/test/test.command.helpInformation.js @@ -0,0 +1,24 @@ +var program = require('../') + , sinon = require('sinon').sandbox.create() + , should = require('should'); + + +program.command('somecommand'); +program.command('anothercommand [options]'); + +var expectedHelpInformation = [ + '', + ' Usage: [options] [command]', + '', + ' Options:', + '', + ' -h, --help output usage information', + '', + ' Commands:', + '', + ' somecommand', + ' anothercommand [options]', + '\n' +].join('\n'); + +program.helpInformation().should.equal(expectedHelpInformation); From 25b06ee12b6f14afa0b4b7b6f028a66a7c4faf5e Mon Sep 17 00:00:00 2001 From: abetomo Date: Fri, 3 Aug 2018 10:13:36 +0900 Subject: [PATCH 079/108] version bump 2.17.0 --- CHANGELOG.md | 7 +++++ package-lock.json | 68 +++++++++++++++++++++++++++++++---------------- package.json | 10 +++---- 3 files changed, 57 insertions(+), 28 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2845bc159..25df8c374 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,11 @@ +2.17.0 / 2018-08-03 +================== + + * fixed newline output after help information (#833) + * Fix to emit the action even without command (#778) + * npm update (#823) + 2.16.0 / 2018-06-29 ================== diff --git a/package-lock.json b/package-lock.json index 709f0b0e1..30693255b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "commander", - "version": "2.16.0", + "version": "2.17.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -13,10 +13,16 @@ "samsam": "1.3.0" } }, + "@sinonjs/samsam": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-2.0.0.tgz", + "integrity": "sha512-D7VxhADdZbDJ0HjUTMnSQ5xIGb4H2yWpg8k9Sf1T08zfFiQYlaxM8LZydpR4FQ2E6LZJX8IlabNZ5io4vdChwg==", + "dev": true + }, "@types/node": { - "version": "10.5.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.5.1.tgz", - "integrity": "sha512-AFLl1IALIuyt6oK4AYZsgWVJ/5rnyzQWud7IebaZWWV3YmgtPZkQmYio9R5Ze/2pdd7XfqF5bP+hWS11mAKoOQ==", + "version": "10.5.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.5.5.tgz", + "integrity": "sha512-6Qnb1gXbp3g1JX9QVJj3A6ORzc9XCyhokxUKaoonHgNXcQhmk8adhotxfkeK8El9TnFeUuH72yI6jQ5nDJKS6w==", "dev": true }, "acorn": { @@ -35,9 +41,9 @@ } }, "ajv": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.1.tgz", - "integrity": "sha512-pgZos1vgOHDiC7gKNbZW8eKvCnNXARv2oqrGQT7Hzbq5Azp7aZG6DJzADnkuSq7RH6qkXp4J/m68yPX/2uBHyQ==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.2.tgz", + "integrity": "sha512-hOs7GfvI6tUI1LfZddH82ky6mOMyTuY0mk7kE2pWpmhhUSkumzaTO5vbVwij39MdwPQWCV4Zv57Eo06NtL/GVA==", "dev": true, "requires": { "fast-deep-equal": "^2.0.1", @@ -425,9 +431,9 @@ "dev": true }, "eslint": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.0.1.tgz", - "integrity": "sha512-D5nG2rErquLUstgUaxJlWB5+gu+U/3VDY0fk/Iuq8y9CUFy/7Y6oF4N2cR1tV8knzQvciIbfqfohd359xTLIKQ==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.2.0.tgz", + "integrity": "sha512-zlggW1qp7/TBjwLfouRoY7eWXrXwJZFqCdIxxh0/LVB/QuuKuIMkzyUZEcDo6LBadsry5JcEMxIqd3H/66CXVg==", "dev": true, "requires": { "ajv": "^6.5.0", @@ -437,6 +443,7 @@ "debug": "^3.1.0", "doctrine": "^2.1.0", "eslint-scope": "^4.0.0", + "eslint-utils": "^1.3.1", "eslint-visitor-keys": "^1.0.0", "espree": "^4.0.0", "esquery": "^1.0.1", @@ -444,8 +451,8 @@ "file-entry-cache": "^2.0.0", "functional-red-black-tree": "^1.0.1", "glob": "^7.1.2", - "globals": "^11.5.0", - "ignore": "^3.3.3", + "globals": "^11.7.0", + "ignore": "^4.0.2", "imurmurhash": "^0.1.4", "inquirer": "^5.2.0", "is-resolvable": "^1.1.0", @@ -468,6 +475,14 @@ "strip-json-comments": "^2.0.1", "table": "^4.0.3", "text-table": "^0.2.0" + }, + "dependencies": { + "ignore": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.3.tgz", + "integrity": "sha512-Z/vAH2GGIEATQnBVXMclE2IGV6i0GyVngKThcGZ5kHgHMxLo9Ow2+XHRq1aEKEej5vOF1TPJNbvX6J/anT0M7A==", + "dev": true + } } }, "eslint-config-standard": { @@ -615,6 +630,12 @@ "estraverse": "^4.1.1" } }, + "eslint-utils": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz", + "integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==", + "dev": true + }, "eslint-visitor-keys": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", @@ -1105,9 +1126,9 @@ "dev": true }, "lolex": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.7.0.tgz", - "integrity": "sha512-uJkH2e0BVfU5KOJUevbTOtpDduooSarH5PopO+LfM/vZf8Z9sJzODqKev804JYM2i++ktJfUmC1le4LwFQ1VMg==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.7.1.tgz", + "integrity": "sha512-Oo2Si3RMKV3+lV5MsSWplDQFoTClz/24S0MMHYcgGWWmFXr6TMlqcqk/l1GtH+d5wLBwNRiqGnwDRMirtFalJw==", "dev": true }, "loose-envify": { @@ -1671,9 +1692,9 @@ "dev": true }, "should": { - "version": "13.2.1", - "resolved": "https://registry.npmjs.org/should/-/should-13.2.1.tgz", - "integrity": "sha512-l+/NwEMO+DcstsHEwPHRHzC9j4UOE3VQwJGcMWSsD/vqpqHbnQ+1iSHy64Ihmmjx1uiRPD9pFadTSc3MJtXAgw==", + "version": "13.2.3", + "resolved": "https://registry.npmjs.org/should/-/should-13.2.3.tgz", + "integrity": "sha512-ggLesLtu2xp+ZxI+ysJTmNjh2U0TsC+rQ/pfED9bUZZ4DKefP27D+7YJVVTvKsmjLpIi9jAa7itwDGkDDmt1GQ==", "dev": true, "requires": { "should-equal": "^2.0.0", @@ -1731,16 +1752,17 @@ "dev": true }, "sinon": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-6.0.1.tgz", - "integrity": "sha512-rfszhNcfamK2+ofIPi9XqeH89pH7KGDcAtM+F9CsjHXOK3jzWG99vyhyD2V+r7s4IipmWcWUFYq4ftZ9/Eu2Wg==", + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-6.1.4.tgz", + "integrity": "sha512-NFEts+4D4jp2sBjL94fQpZk5o73kzn/g58+I9Dp15i9vsnT4Lk1UEyUf2jACODWLG6Pz/llF0sArYUw47Aarmg==", "dev": true, "requires": { "@sinonjs/formatio": "^2.0.0", + "@sinonjs/samsam": "^2.0.0", "diff": "^3.5.0", "lodash.get": "^4.4.2", - "lolex": "^2.4.2", - "nise": "^1.3.3", + "lolex": "^2.7.1", + "nise": "^1.4.2", "supports-color": "^5.4.0", "type-detect": "^4.0.8" }, diff --git a/package.json b/package.json index baa3e770b..cd0fca5cd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "commander", - "version": "2.16.0", + "version": "2.17.0", "description": "the complete solution for node.js command-line programs", "keywords": [ "commander", @@ -26,10 +26,10 @@ ], "dependencies": {}, "devDependencies": { - "@types/node": "^10.5.1", - "eslint": "^5.0.1", - "should": "^13.2.1", - "sinon": "^6.0.1", + "@types/node": "^10.5.5", + "eslint": "^5.2.0", + "should": "^13.2.3", + "sinon": "^6.1.4", "standard": "^11.0.1", "typescript": "^2.9.2" }, From ad347172ad2563824566a74de6fad16ff525ef07 Mon Sep 17 00:00:00 2001 From: abetomo Date: Tue, 7 Aug 2018 16:57:37 +0900 Subject: [PATCH 080/108] Fix a bug in command emit fixes: #843 fixes: #842 --- index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index eebaec03a..3ad0cacfd 100644 --- a/index.js +++ b/index.js @@ -660,7 +660,8 @@ Command.prototype.parseArgs = function(args, unknown) { if (unknown.length > 0) { this.unknownOption(unknown[0]); } - if (this._args.filter(a => a.required).length === 0) { + if (this.commands.length === 0 && + this._args.filter(function(a) { return a.required }).length === 0) { this.emit('command:*'); } } From a604a5d3f1e1e6840769c7e8dee6bdbf85bdbe03 Mon Sep 17 00:00:00 2001 From: abetomo Date: Tue, 7 Aug 2018 16:59:29 +0900 Subject: [PATCH 081/108] Add test case --- test/test.commandAsterisk.action.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test/test.commandAsterisk.action.js diff --git a/test/test.commandAsterisk.action.js b/test/test.commandAsterisk.action.js new file mode 100644 index 000000000..d72381054 --- /dev/null +++ b/test/test.commandAsterisk.action.js @@ -0,0 +1,15 @@ +var program = require('../') + , should = require('should'); + +var val = false; +program + .version('0.0.1') + .command('*') + .description('test') + .action(function () { + val = true; + }); + +program.parse(['node', 'test']); + +val.should.be.false() From e5b27cc553c0c55eb2f8890dc83034d3a3eee531 Mon Sep 17 00:00:00 2001 From: abetomo Date: Tue, 7 Aug 2018 20:12:04 +0900 Subject: [PATCH 082/108] version bump 2.17.1 --- CHANGELOG.md | 5 +++++ package-lock.json | 22 +++++++++++----------- package.json | 6 +++--- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 25df8c374..67d68c595 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ +2.17.1 / 2018-08-07 +================== + + * Fix bug in command emit (#844) + 2.17.0 / 2018-08-03 ================== diff --git a/package-lock.json b/package-lock.json index 30693255b..37366edfa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "commander", - "version": "2.17.0", + "version": "2.17.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -20,9 +20,9 @@ "dev": true }, "@types/node": { - "version": "10.5.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.5.5.tgz", - "integrity": "sha512-6Qnb1gXbp3g1JX9QVJj3A6ORzc9XCyhokxUKaoonHgNXcQhmk8adhotxfkeK8El9TnFeUuH72yI6jQ5nDJKS6w==", + "version": "10.5.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.5.7.tgz", + "integrity": "sha512-VkKcfuitP+Nc/TaTFH0B8qNmn+6NbI6crLkQonbedViVz7O2w8QV/GERPlkJ4bg42VGHiEWa31CoTOPs1q6z1w==", "dev": true }, "acorn": { @@ -431,9 +431,9 @@ "dev": true }, "eslint": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.2.0.tgz", - "integrity": "sha512-zlggW1qp7/TBjwLfouRoY7eWXrXwJZFqCdIxxh0/LVB/QuuKuIMkzyUZEcDo6LBadsry5JcEMxIqd3H/66CXVg==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.3.0.tgz", + "integrity": "sha512-N/tCqlMKkyNvAvLu+zI9AqDasnSLt00K+Hu8kdsERliC9jYEc8ck12XtjvOXrBKu8fK6RrBcN9bat6Xk++9jAg==", "dev": true, "requires": { "ajv": "^6.5.0", @@ -467,7 +467,7 @@ "path-is-inside": "^1.0.2", "pluralize": "^7.0.0", "progress": "^2.0.0", - "regexpp": "^1.1.0", + "regexpp": "^2.0.0", "require-uncached": "^1.0.3", "semver": "^5.5.0", "string.prototype.matchall": "^2.0.0", @@ -1564,9 +1564,9 @@ } }, "regexpp": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-1.1.0.tgz", - "integrity": "sha512-LOPw8FpgdQF9etWMaAfG/WRthIdXJGYp4mJ2Jgn/2lpkbod9jPn0t9UqN7AxBOKNfzRbYyVfgc7Vk4t/MpnXgw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.0.tgz", + "integrity": "sha512-g2FAVtR8Uh8GO1Nv5wpxW7VFVwHcCEr4wyA8/MHiRkO8uHoR5ntAA8Uq3P1vvMTX/BeQiRVSpDGLd+Wn5HNOTA==", "dev": true }, "require-uncached": { diff --git a/package.json b/package.json index cd0fca5cd..d3a1b24b5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "commander", - "version": "2.17.0", + "version": "2.17.1", "description": "the complete solution for node.js command-line programs", "keywords": [ "commander", @@ -26,8 +26,8 @@ ], "dependencies": {}, "devDependencies": { - "@types/node": "^10.5.5", - "eslint": "^5.2.0", + "@types/node": "^10.5.7", + "eslint": "^5.3.0", "should": "^13.2.3", "sinon": "^6.1.4", "standard": "^11.0.1", From bf47dcca69951a3dbef299d1052c8dc1a3e10c76 Mon Sep 17 00:00:00 2001 From: KillWolfVlad Date: Fri, 17 Aug 2018 16:21:26 +0500 Subject: [PATCH 083/108] add support for execute typescript subcommand via ts-node --- index.js | 7 ++- package-lock.json | 52 +++++++++++++++++++ package.json | 1 + test/fixtures-ts/pm-install.ts | 3 ++ test/fixtures-ts/pm.ts | 8 +++ ...est.command.executableSubcommand.tsnode.js | 10 ++++ 6 files changed, 79 insertions(+), 2 deletions(-) create mode 100644 test/fixtures-ts/pm-install.ts create mode 100644 test/fixtures-ts/pm.ts create mode 100644 test/test.command.executableSubcommand.tsnode.js diff --git a/index.js b/index.js index 3ad0cacfd..22c15adac 100644 --- a/index.js +++ b/index.js @@ -523,7 +523,7 @@ Command.prototype.executeSubCommand = function(argv, args, unknown) { // executable var f = argv[1]; // name of the subcommand, link `pm-install` - var bin = basename(f, '.js') + '-' + args[0]; + var bin = basename(f, path.extname(f)) + '-' + args[0]; // In case of globally installed, get the base dir where executable // subcommand file should be located at @@ -539,11 +539,14 @@ Command.prototype.executeSubCommand = function(argv, args, unknown) { // prefer local `./` to bin in the $PATH var localBin = path.join(baseDir, bin); - // whether bin file is a js script with explicit `.js` extension + // whether bin file is a js script with explicit `.js` or `.ts` extension var isExplicitJS = false; if (exists(localBin + '.js')) { bin = localBin + '.js'; isExplicitJS = true; + } else if (exists(localBin + '.ts')) { + bin = localBin + '.ts'; + isExplicitJS = true; } else if (exists(localBin)) { bin = localBin; } diff --git a/package-lock.json b/package-lock.json index 37366edfa..070123580 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1150,6 +1150,12 @@ "yallist": "^2.1.2" } }, + "make-error": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.4.tgz", + "integrity": "sha512-0Dab5btKVPhibSalc9QGXb559ED7G7iLjFXBaj9Wq8O3vorueR5K5jaE3hkG6ZQINyhA/JgG6Qk4qdFQjsYV6g==", + "dev": true + }, "mimic-fn": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", @@ -1787,6 +1793,22 @@ "is-fullwidth-code-point": "^2.0.0" } }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "source-map-support": { + "version": "0.5.8", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.8.tgz", + "integrity": "sha512-WqAEWPdb78u25RfKzOF0swBpY0dKrNdjc4GvLwm7ScX/o9bj8Eh/YL8mcMhBHYDGl87UkkSXDOFnW4G7GhWhGg==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, "spdx-correct": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", @@ -2137,6 +2159,30 @@ "os-tmpdir": "~1.0.2" } }, + "ts-node": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-7.0.1.tgz", + "integrity": "sha512-BVwVbPJRspzNh2yfslyT1PSbl5uIk03EZlb493RKHN4qej/D06n1cEhjlOJG69oFsE7OT8XjpTUcYf6pKTLMhw==", + "dev": true, + "requires": { + "arrify": "^1.0.0", + "buffer-from": "^1.1.0", + "diff": "^3.1.0", + "make-error": "^1.1.1", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "source-map-support": "^0.5.6", + "yn": "^2.0.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, "type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", @@ -2236,6 +2282,12 @@ "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", "dev": true + }, + "yn": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", + "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=", + "dev": true } } } diff --git a/package.json b/package.json index d3a1b24b5..ce30a0b66 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "should": "^13.2.3", "sinon": "^6.1.4", "standard": "^11.0.1", + "ts-node": "^7.0.1", "typescript": "^2.9.2" }, "typings": "typings/index.d.ts" diff --git a/test/fixtures-ts/pm-install.ts b/test/fixtures-ts/pm-install.ts new file mode 100644 index 000000000..a99408b45 --- /dev/null +++ b/test/fixtures-ts/pm-install.ts @@ -0,0 +1,3 @@ +#!/usr/bin/env node + +console.log('install'); diff --git a/test/fixtures-ts/pm.ts b/test/fixtures-ts/pm.ts new file mode 100644 index 000000000..723ccb772 --- /dev/null +++ b/test/fixtures-ts/pm.ts @@ -0,0 +1,8 @@ +#!/usr/bin/env node + +var program = require('../../'); + +program + .version('0.0.1') + .command('install [name]', 'install one or more packages') + .parse(process.argv); diff --git a/test/test.command.executableSubcommand.tsnode.js b/test/test.command.executableSubcommand.tsnode.js new file mode 100644 index 000000000..c7e5524cc --- /dev/null +++ b/test/test.command.executableSubcommand.tsnode.js @@ -0,0 +1,10 @@ +var exec = require('child_process').exec + , path = require('path') + , should = require('should'); + +var bin = path.join(__dirname, './fixtures-ts/pm.ts') + +// success case +exec(process.argv[0] + ' -r ts-node/register ' + bin + ' install', function (error, stdout, stderr) { + stdout.should.equal('install\n'); +}); From af1799672d07cc89a8554ff39dd98f15e9c6ea0e Mon Sep 17 00:00:00 2001 From: abetomo Date: Tue, 28 Aug 2018 12:09:03 +0900 Subject: [PATCH 084/108] chmod 644 travis.yml 755 -> 644 --- .travis.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml old mode 100755 new mode 100644 From 713db77d5744a9274ee3812400243ffaae3b7abc Mon Sep 17 00:00:00 2001 From: Jared Petersen Date: Fri, 31 Aug 2018 15:05:24 -0700 Subject: [PATCH 085/108] Standardize help output (#853) * Removed newline before and after help output * Updated English documentation and examples * Unindented help output * Fixed newline and indentation for missing command error * Updated REAME examples in English and Chinese and fixed example indentation * Removed newlines surrounding EACCESS error message --- Readme.md | 50 +++++++++++++--------------- Readme_zh-CN.md | 38 ++++++++++----------- examples/custom-help | 6 ++-- index.js | 22 ++++++------ test/test.command.help.js | 4 +-- test/test.command.helpInformation.js | 15 ++++----- test/test.command.name.js | 2 +- test/test.command.nohelp.js | 8 ++--- 8 files changed, 67 insertions(+), 78 deletions(-) diff --git a/Readme.md b/Readme.md index 5897d371a..8484c47a8 100644 --- a/Readme.md +++ b/Readme.md @@ -45,7 +45,7 @@ console.log(' - %s cheese', program.cheese); Short flags may be passed as a single arg, for example `-abc` is equivalent to `-a -b -c`. Multi-word options such as "--template-engine" are camel-cased, becoming `program.templateEngine` etc. -Note that multi-word options starting with `--no` prefix negate the boolean value of the following word. For example, `--no-sauce` sets the value of `program.sauce` to false. +Note that multi-word options starting with `--no` prefix negate the boolean value of the following word. For example, `--no-sauce` sets the value of `program.sauce` to false. ```js #!/usr/bin/env node @@ -153,7 +153,7 @@ program .option('-s --size ', 'Pizza size', /^(large|medium|small)$/i, 'medium') .option('-d --drink [drink]', 'Drink', /^(coke|pepsi|izze)$/i) .parse(process.argv); - + console.log(' size: %j', program.size); console.log(' drink: %j', program.drink); ``` @@ -248,22 +248,20 @@ You can enable `--harmony` option in two ways: The help information is auto-generated based on the information commander already knows about your program, so the following `--help` info is for free: ``` - $ ./examples/pizza --help - - Usage: pizza [options] +$ ./examples/pizza --help +Usage: pizza [options] - An application for pizzas ordering +An application for pizzas ordering - Options: - - -h, --help output usage information - -V, --version output the version number - -p, --peppers Add peppers - -P, --pineapple Add pineapple - -b, --bbq Add bbq sauce - -c, --cheese Add the specified type of cheese [marble] - -C, --no-cheese You do not want any cheese +Options: + -h, --help output usage information + -V, --version output the version number + -p, --peppers Add peppers + -P, --pineapple Add pineapple + -b, --bbq Add bbq sauce + -c, --cheese Add the specified type of cheese [marble] + -C, --no-cheese You do not want any cheese ``` ## Custom help @@ -271,7 +269,7 @@ You can enable `--harmony` option in two ways: You can display arbitrary `-h, --help` information by listening for "--help". Commander will automatically exit once you are done so that the remainder of your program - does not execute causing undesired behaviours, for example + does not execute causing undesired behaviors, for example in the following executable "stuff" will not output when `--help` is used. @@ -294,11 +292,11 @@ program // node's emit() is immediate program.on('--help', function(){ - console.log(' Examples:'); - console.log(''); - console.log(' $ custom-help --help'); - console.log(' $ custom-help -h'); + console.log('') + console.log('Examples:'); console.log(''); + console.log(' $ custom-help --help'); + console.log(' $ custom-help -h'); }); program.parse(process.argv); @@ -309,7 +307,6 @@ console.log('stuff'); Yields the following help output when `node script-name.js -h` or `node script-name.js --help` are run: ``` - Usage: custom-help [options] Options: @@ -324,7 +321,6 @@ Examples: $ custom-help --help $ custom-help -h - ``` ## .outputHelp(cb) @@ -402,11 +398,11 @@ program .action(function(cmd, options){ console.log('exec "%s" using %s mode', cmd, options.exec_mode); }).on('--help', function() { - console.log(' Examples:'); - console.log(); - console.log(' $ deploy exec sequential'); - console.log(' $ deploy exec async'); - console.log(); + console.log(''); + console.log('Examples:'); + console.log(''); + console.log(' $ deploy exec sequential'); + console.log(' $ deploy exec async'); }); program diff --git a/Readme_zh-CN.md b/Readme_zh-CN.md index 87c3a87d2..d6be09786 100644 --- a/Readme_zh-CN.md +++ b/Readme_zh-CN.md @@ -186,22 +186,20 @@ Commander 将会尝试在入口脚本(例如 `./examples/pm`)的目录中搜 帮助信息是 commander 基于你的程序自动生成的,下面是 `--help` 生成的帮助信息: ``` - $ ./examples/pizza --help +$ ./examples/pizza --help +Usage: pizza [options] - Usage: pizza [options] +An application for pizzas ordering - An application for pizzas ordering - - Options: - - -h, --help output usage information - -V, --version output the version number - -p, --peppers Add peppers - -P, --pineapple Add pineapple - -b, --bbq Add bbq sauce - -c, --cheese Add the specified type of cheese [marble] - -C, --no-cheese You do not want any cheese +Options: + -h, --help output usage information + -V, --version output the version number + -p, --peppers Add peppers + -P, --pineapple Add pineapple + -b, --bbq Add bbq sauce + -c, --cheese Add the specified type of cheese [marble] + -C, --no-cheese You do not want any cheese ``` ## 自定义帮助 @@ -227,11 +225,11 @@ program // node's emit() is immediate program.on('--help', function(){ + console.log(''); console.log(' Examples:'); console.log(''); console.log(' $ custom-help --help'); console.log(' $ custom-help -h'); - console.log(''); }); program.parse(process.argv); @@ -242,7 +240,6 @@ console.log('stuff'); 下列帮助信息是运行 `node script-name.js -h` or `node script-name.js --help` 时输出的: ``` - Usage: custom-help [options] Options: @@ -257,7 +254,6 @@ Examples: $ custom-help --help $ custom-help -h - ``` ## .outputHelp(cb) @@ -318,11 +314,11 @@ program .action(function(cmd, options){ console.log('exec "%s" using %s mode', cmd, options.exec_mode); }).on('--help', function() { - console.log(' Examples:'); - console.log(); - console.log(' $ deploy exec sequential'); - console.log(' $ deploy exec async'); - console.log(); + console.log(''); + console.log('Examples:'); + console.log(''); + console.log(' $ deploy exec sequential'); + console.log(' $ deploy exec async'); }); program diff --git a/examples/custom-help b/examples/custom-help index 039e5103d..7260d9cb0 100755 --- a/examples/custom-help +++ b/examples/custom-help @@ -16,11 +16,11 @@ program // node's emit() is immediate program.on('--help', function(){ - console.log(' Examples:'); console.log(''); - console.log(' $ custom-help --help'); - console.log(' $ custom-help -h'); + console.log('Examples:'); console.log(''); + console.log(' $ custom-help --help'); + console.log(' $ custom-help -h'); }); program.parse(process.argv); diff --git a/index.js b/index.js index 22c15adac..8e296691c 100644 --- a/index.js +++ b/index.js @@ -580,9 +580,9 @@ Command.prototype.executeSubCommand = function(argv, args, unknown) { proc.on('close', process.exit.bind(process)); proc.on('error', function(err) { if (err.code === 'ENOENT') { - console.error('\n %s(1) does not exist, try --help\n', bin); + console.error('%s(1) does not exist, try --help', bin); } else if (err.code === 'EACCES') { - console.error('\n %s(1) not executable. try chmod or run with root\n', bin); + console.error('%s(1) not executable. try chmod or run with root', bin); } process.exit(1); }); @@ -1072,12 +1072,12 @@ Command.prototype.commandHelp = function() { var width = this.padWidth(); return [ - ' Commands:', + 'Commands:', '', commands.map(function(cmd) { var desc = cmd[1] ? ' ' + cmd[1] : ''; return (desc ? pad(cmd[0], width) : cmd[0]) + desc; - }).join('\n').replace(/^/gm, ' '), + }).join('\n').replace(/^/gm, ' '), '' ].join('\n'); }; @@ -1093,17 +1093,17 @@ Command.prototype.helpInformation = function() { var desc = []; if (this._description) { desc = [ - ' ' + this._description, + this._description, '' ]; var argsDescription = this._argsDescription; if (argsDescription && this._args.length) { var width = this.padWidth(); - desc.push(' Arguments:'); + desc.push('Arguments:'); desc.push(''); this._args.forEach(function(arg) { - desc.push(' ' + pad(arg.name, width) + ' ' + argsDescription[arg.name]); + desc.push(' ' + pad(arg.name, width) + ' ' + argsDescription[arg.name]); }); desc.push(''); } @@ -1114,8 +1114,7 @@ Command.prototype.helpInformation = function() { cmdName = cmdName + '|' + this._alias; } var usage = [ - '', - ' Usage: ' + cmdName + ' ' + this.usage(), + 'Usage: ' + cmdName + ' ' + this.usage(), '' ]; @@ -1124,9 +1123,9 @@ Command.prototype.helpInformation = function() { if (commandHelp) cmds = [commandHelp]; var options = [ - ' Options:', + 'Options:', '', - '' + this.optionHelp().replace(/^/gm, ' '), + '' + this.optionHelp().replace(/^/gm, ' '), '' ]; @@ -1134,7 +1133,6 @@ Command.prototype.helpInformation = function() { .concat(desc) .concat(options) .concat(cmds) - .concat(['']) .join('\n'); }; diff --git a/test/test.command.help.js b/test/test.command.help.js index 412cb3996..71cc7ccf4 100644 --- a/test/test.command.help.js +++ b/test/test.command.help.js @@ -5,8 +5,8 @@ var program = require('../') program.command('bare'); -program.commandHelp().should.equal(' Commands:\n\n bare\n'); +program.commandHelp().should.equal('Commands:\n\n bare\n'); program.command('mycommand [options]'); -program.commandHelp().should.equal(' Commands:\n\n bare\n mycommand [options]\n'); \ No newline at end of file +program.commandHelp().should.equal('Commands:\n\n bare\n mycommand [options]\n'); diff --git a/test/test.command.helpInformation.js b/test/test.command.helpInformation.js index 0c8f3877e..184b74c1a 100644 --- a/test/test.command.helpInformation.js +++ b/test/test.command.helpInformation.js @@ -7,18 +7,17 @@ program.command('somecommand'); program.command('anothercommand [options]'); var expectedHelpInformation = [ + 'Usage: [options] [command]', '', - ' Usage: [options] [command]', + 'Options:', '', - ' Options:', + ' -h, --help output usage information', '', - ' -h, --help output usage information', + 'Commands:', '', - ' Commands:', - '', - ' somecommand', - ' anothercommand [options]', - '\n' + ' somecommand', + ' anothercommand [options]', + '' ].join('\n'); program.helpInformation().should.equal(expectedHelpInformation); diff --git a/test/test.command.name.js b/test/test.command.name.js index 4f6a36d0e..0d783e9c9 100644 --- a/test/test.command.name.js +++ b/test/test.command.name.js @@ -18,7 +18,7 @@ program.commands[1].name().should.equal('help'); var output = process.stdout.write.args[0]; output[0].should.containEql([ - ' mycommand [options] this is my command' + ' mycommand [options] this is my command' ].join('\n')); sinon.restore(); diff --git a/test/test.command.nohelp.js b/test/test.command.nohelp.js index 247d6756e..417be64ab 100644 --- a/test/test.command.nohelp.js +++ b/test/test.command.nohelp.js @@ -47,10 +47,10 @@ process.stdout.write.args.length.should.equal(1); var output = process.stdout.write.args[0]; var expect = [ - ' Commands:', + 'Commands:', '', - ' mycommand [options] this is my command', - ' anothercommand [options]', - ' help [cmd] display help for [cmd]' + ' mycommand [options] this is my command', + ' anothercommand [options]', + ' help [cmd] display help for [cmd]' ].join('\n'); output[0].indexOf(expect).should.not.be.equal(-1); From 54b7f142b1fa960442c6c8982da16f7a5204c0a2 Mon Sep 17 00:00:00 2001 From: abetomo Date: Fri, 7 Sep 2018 13:44:52 +0900 Subject: [PATCH 086/108] version bump 2.18.0 --- CHANGELOG.md | 7 + package-lock.json | 655 ++++++++++++++++++---------------------------- package.json | 10 +- 3 files changed, 271 insertions(+), 401 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 67d68c595..d61aa451c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,11 @@ +2.18.0 / 2018-09-07 +================== + + * Standardize help output (#853) + * chmod 644 travis.yml (#851) + * add support for execute typescript subcommand via ts-node (#849) + 2.17.1 / 2018-08-07 ================== diff --git a/package-lock.json b/package-lock.json index 070123580..b1f7aaee3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,9 +1,46 @@ { "name": "commander", - "version": "2.17.1", + "version": "2.18.0", "lockfileVersion": 1, "requires": true, "dependencies": { + "@babel/code-frame": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", + "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==", + "dev": true, + "requires": { + "@babel/highlight": "^7.0.0" + } + }, + "@babel/highlight": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz", + "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==", + "dev": true, + "requires": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^4.0.0" + }, + "dependencies": { + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + } + } + }, + "@sinonjs/commons": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.0.2.tgz", + "integrity": "sha512-WR3dlgqJP4QNrLC4iXN/5/2WaLQQ0VijOOkmflqFGVJ6wLEpbSjo7c0ZeGIdtY8Crk7xBBp87sM6+Mkerz7alw==", + "dev": true, + "requires": { + "type-detect": "4.0.8" + } + }, "@sinonjs/formatio": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", @@ -20,9 +57,9 @@ "dev": true }, "@types/node": { - "version": "10.5.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.5.7.tgz", - "integrity": "sha512-VkKcfuitP+Nc/TaTFH0B8qNmn+6NbI6crLkQonbedViVz7O2w8QV/GERPlkJ4bg42VGHiEWa31CoTOPs1q6z1w==", + "version": "10.9.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.9.4.tgz", + "integrity": "sha512-fCHV45gS+m3hH17zgkgADUSi2RR1Vht6wOZ0jyHP8rjiQra9f+mIcgwPQHllmDocYOstIEbKlxbFDYlgrTPYqw==", "dev": true }, "acorn": { @@ -41,15 +78,15 @@ } }, "ajv": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.2.tgz", - "integrity": "sha512-hOs7GfvI6tUI1LfZddH82ky6mOMyTuY0mk7kE2pWpmhhUSkumzaTO5vbVwij39MdwPQWCV4Zv57Eo06NtL/GVA==", + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.3.tgz", + "integrity": "sha512-LqZ9wY+fx3UMiiPd741yB2pj3hhil+hQc8taf4o2QGRFpWgZ2V5C8HA165DY9sS3fJwsk7uT7ZlFEyC3Ig3lLg==", "dev": true, "requires": { "fast-deep-equal": "^2.0.1", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.1" + "uri-js": "^4.2.2" } }, "ajv-keywords": { @@ -129,7 +166,7 @@ "dependencies": { "chalk": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { @@ -252,12 +289,6 @@ "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", "dev": true }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", - "dev": true - }, "color-convert": { "version": "1.9.2", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.2.tgz", @@ -279,30 +310,12 @@ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, - "concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, "contains-path": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", "dev": true }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true - }, "cross-spawn": { "version": "6.0.5", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", @@ -338,13 +351,12 @@ "dev": true }, "define-properties": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", - "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", "dev": true, "requires": { - "foreach": "^2.0.5", - "object-keys": "^1.0.8" + "object-keys": "^1.0.12" } }, "deglob": { @@ -359,6 +371,14 @@ "pkg-config": "^1.1.0", "run-parallel": "^1.1.2", "uniq": "^1.0.1" + }, + "dependencies": { + "ignore": { + "version": "3.3.10", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", + "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", + "dev": true + } } }, "del": { @@ -431,13 +451,13 @@ "dev": true }, "eslint": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.3.0.tgz", - "integrity": "sha512-N/tCqlMKkyNvAvLu+zI9AqDasnSLt00K+Hu8kdsERliC9jYEc8ck12XtjvOXrBKu8fK6RrBcN9bat6Xk++9jAg==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.5.0.tgz", + "integrity": "sha512-m+az4vYehIJgl1Z0gb25KnFXeqQRdNreYsei1jdvkd9bB+UNQD3fsuiC2AWSQ56P+/t++kFSINZXFbfai+krOw==", "dev": true, "requires": { - "ajv": "^6.5.0", - "babel-code-frame": "^6.26.0", + "@babel/code-frame": "^7.0.0", + "ajv": "^6.5.3", "chalk": "^2.1.0", "cross-spawn": "^6.0.5", "debug": "^3.1.0", @@ -452,11 +472,11 @@ "functional-red-black-tree": "^1.0.1", "glob": "^7.1.2", "globals": "^11.7.0", - "ignore": "^4.0.2", + "ignore": "^4.0.6", "imurmurhash": "^0.1.4", - "inquirer": "^5.2.0", + "inquirer": "^6.1.0", "is-resolvable": "^1.1.0", - "js-yaml": "^3.11.0", + "js-yaml": "^3.12.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.3.0", "lodash": "^4.17.5", @@ -469,8 +489,7 @@ "progress": "^2.0.0", "regexpp": "^2.0.0", "require-uncached": "^1.0.3", - "semver": "^5.5.0", - "string.prototype.matchall": "^2.0.0", + "semver": "^5.5.1", "strip-ansi": "^4.0.0", "strip-json-comments": "^2.0.1", "table": "^4.0.3", @@ -478,23 +497,29 @@ }, "dependencies": { "ignore": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.3.tgz", - "integrity": "sha512-Z/vAH2GGIEATQnBVXMclE2IGV6i0GyVngKThcGZ5kHgHMxLo9Ow2+XHRq1aEKEej5vOF1TPJNbvX6J/anT0M7A==", + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "semver": { + "version": "5.5.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.1.tgz", + "integrity": "sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw==", "dev": true } } }, "eslint-config-standard": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-11.0.0.tgz", - "integrity": "sha512-oDdENzpViEe5fwuRCWla7AXQd++/oyIp8zP+iP9jiUPG6NBj3SHgdgtl/kTn00AjeN+1HNvavTKmYbMo+xMOlw==", + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-12.0.0.tgz", + "integrity": "sha512-COUz8FnXhqFitYj4DTqHzidjIL/t4mumGZto5c7DrBpvWoie+Sn3P4sLEzUGeYhRElWuFEf8K1S1EfvD1vixCQ==", "dev": true }, "eslint-config-standard-jsx": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-standard-jsx/-/eslint-config-standard-jsx-5.0.0.tgz", - "integrity": "sha512-rLToPAEqLMPBfWnYTu6xRhm2OWziS2n40QFqJ8jAM8NSVzeVKTa3nclhsU4DpPJQRY60F34Oo1wi/71PN/eITg==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/eslint-config-standard-jsx/-/eslint-config-standard-jsx-6.0.2.tgz", + "integrity": "sha512-D+YWAoXw+2GIdbMBRAzWwr1ZtvnSf4n4yL0gKGg7ShUOGXkSOLerI17K4F6LdQMJPNMoWYqepzQD/fKY+tXNSg==", "dev": true }, "eslint-import-resolver-node": { @@ -539,22 +564,32 @@ } } }, + "eslint-plugin-es": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-1.3.1.tgz", + "integrity": "sha512-9XcVyZiQRVeFjqHw8qHNDAZcQLqaHlOGGpeYqzYh8S4JYCWTCO3yzyen8yVmA5PratfzTRWDwCOFphtDEG+w/w==", + "dev": true, + "requires": { + "eslint-utils": "^1.3.0", + "regexpp": "^2.0.0" + } + }, "eslint-plugin-import": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.9.0.tgz", - "integrity": "sha1-JgAu+/ylmJtyiKwEdQi9JPIXsWk=", + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.14.0.tgz", + "integrity": "sha512-FpuRtniD/AY6sXByma2Wr0TXvXJ4nA/2/04VPlfpmUDPOpOY264x+ILiwnrk/k4RINgDAyFZByxqPUbSQ5YE7g==", "dev": true, "requires": { - "builtin-modules": "^1.1.1", "contains-path": "^0.1.0", "debug": "^2.6.8", "doctrine": "1.5.0", "eslint-import-resolver-node": "^0.3.1", - "eslint-module-utils": "^2.1.1", + "eslint-module-utils": "^2.2.0", "has": "^1.0.1", "lodash": "^4.17.4", "minimatch": "^3.0.3", - "read-pkg-up": "^2.0.0" + "read-pkg-up": "^2.0.0", + "resolve": "^1.6.0" }, "dependencies": { "debug": { @@ -585,39 +620,42 @@ } }, "eslint-plugin-node": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-6.0.1.tgz", - "integrity": "sha512-Q/Cc2sW1OAISDS+Ji6lZS2KV4b7ueA/WydVWd1BECTQwVvfQy5JAi3glhINoKzoMnfnuRgNP+ZWKrGAbp3QDxw==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-7.0.1.tgz", + "integrity": "sha512-lfVw3TEqThwq0j2Ba/Ckn2ABdwmL5dkOgAux1rvOk6CO7A6yGyPI2+zIxN6FyNkp1X1X/BSvKOceD6mBWSj4Yw==", "dev": true, "requires": { - "ignore": "^3.3.6", + "eslint-plugin-es": "^1.3.1", + "eslint-utils": "^1.3.1", + "ignore": "^4.0.2", "minimatch": "^3.0.4", - "resolve": "^1.3.3", - "semver": "^5.4.1" + "resolve": "^1.8.1", + "semver": "^5.5.0" } }, "eslint-plugin-promise": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-3.7.0.tgz", - "integrity": "sha512-2WO+ZFh7vxUKRfR0cOIMrWgYKdR6S1AlOezw6pC52B6oYpd5WFghN+QHxvrRdZMtbo8h3dfUZ2o1rWb0UPbKtg==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-4.0.1.tgz", + "integrity": "sha512-Si16O0+Hqz1gDHsys6RtFRrW7cCTB6P7p3OJmKp3Y3dxpQE2qwOA7d3xnV+0mBmrPoi0RBnxlCKvqu70te6wjg==", "dev": true }, "eslint-plugin-react": { - "version": "7.7.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.7.0.tgz", - "integrity": "sha512-KC7Snr4YsWZD5flu6A5c0AcIZidzW3Exbqp7OT67OaD2AppJtlBr/GuPrW/vaQM/yfZotEvKAdrxrO+v8vwYJA==", + "version": "7.11.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.11.1.tgz", + "integrity": "sha512-cVVyMadRyW7qsIUh3FHp3u6QHNhOgVrLQYdQEB1bPWBsgbNCHdFAeNMquBMCcZJu59eNthX053L70l7gRt4SCw==", "dev": true, "requires": { - "doctrine": "^2.0.2", - "has": "^1.0.1", + "array-includes": "^3.0.3", + "doctrine": "^2.1.0", + "has": "^1.0.3", "jsx-ast-utils": "^2.0.1", - "prop-types": "^15.6.0" + "prop-types": "^15.6.2" } }, "eslint-plugin-standard": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-3.0.1.tgz", - "integrity": "sha1-NNDJFbRe3G8BA5PH7vOCOwhWXPI=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-4.0.0.tgz", + "integrity": "sha512-OwxJkR6TQiYMmt1EsNRMe5qG3GsbjlcOhbGUBY4LtavF9DsLaTcoR+j2Tdjqi23oUwKNUqX7qcn5fPStafMdlA==", "dev": true }, "eslint-scope": { @@ -690,7 +728,7 @@ }, "external-editor": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", + "resolved": "http://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", "dev": true, "requires": { @@ -764,12 +802,6 @@ "write": "^0.2.1" } }, - "foreach": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", - "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=", - "dev": true - }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -858,31 +890,25 @@ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, - "has-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", - "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", - "dev": true - }, "hosted-git-info": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.1.tgz", - "integrity": "sha512-Ba4+0M4YvIDUUsprMjhVTU1yN9F2/LJSAl69ZpzaLT4l4j5mwTS6jqqW9Ojvj6lKz/veqPzpJBqGbXspOb533A==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", + "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", "dev": true }, "iconv-lite": { - "version": "0.4.23", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", - "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dev": true, "requires": { "safer-buffer": ">= 2.1.2 < 3" } }, "ignore": { - "version": "3.3.10", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", - "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "dev": true }, "imurmurhash": { @@ -908,24 +934,52 @@ "dev": true }, "inquirer": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-5.2.0.tgz", - "integrity": "sha512-E9BmnJbAKLPGonz0HeWHtbKf+EeSP93paWO3ZYoUpq/aowXvYGjjCSuashhXPpzbArIjBbji39THkxTz9ZeEUQ==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.2.0.tgz", + "integrity": "sha512-QIEQG4YyQ2UYZGDC4srMZ7BjHOmNk1lR2JQj5UknBapklm6WHA+VVH7N+sUdX3A7NeCfGF8o4X1S3Ao7nAcIeg==", "dev": true, "requires": { "ansi-escapes": "^3.0.0", "chalk": "^2.0.0", "cli-cursor": "^2.1.0", "cli-width": "^2.0.0", - "external-editor": "^2.1.0", + "external-editor": "^3.0.0", "figures": "^2.0.0", - "lodash": "^4.3.0", + "lodash": "^4.17.10", "mute-stream": "0.0.7", "run-async": "^2.2.0", - "rxjs": "^5.5.2", + "rxjs": "^6.1.0", "string-width": "^2.1.0", "strip-ansi": "^4.0.0", "through": "^2.3.6" + }, + "dependencies": { + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, + "external-editor": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.3.tgz", + "integrity": "sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA==", + "dev": true, + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + } } }, "is-arrayish": { @@ -944,9 +998,9 @@ } }, "is-callable": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.3.tgz", - "integrity": "sha1-hut1OSgF3cM69xySoO7fdO52BLI=", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", + "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", "dev": true }, "is-date-object": { @@ -1068,9 +1122,9 @@ } }, "just-extend": { - "version": "1.1.27", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-1.1.27.tgz", - "integrity": "sha512-mJVp13Ix6gFo3SBAy9U/kL+oeZqzlYYYLQBwXVBlVzIsZwBqGREnOro24oC/8s8aox+rJhtZ2DiQof++IrkA+g==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-3.0.0.tgz", + "integrity": "sha512-Fu3T6pKBuxjWT/p4DkqGHFRsysc8OauWr4ZRTY9dIx07Y9O0RkoR5jcv28aeD1vuAwhm3nLkDurwLXoALp4DpQ==", "dev": true }, "levn": { @@ -1126,28 +1180,18 @@ "dev": true }, "lolex": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.7.1.tgz", - "integrity": "sha512-Oo2Si3RMKV3+lV5MsSWplDQFoTClz/24S0MMHYcgGWWmFXr6TMlqcqk/l1GtH+d5wLBwNRiqGnwDRMirtFalJw==", + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.7.4.tgz", + "integrity": "sha512-Gh6Vffq/piTeHwunLNFR1jFVaqlwK9GMNUxFcsO1cwHyvbRKHwX8UDkxmrDnbcPdHNmpv7z2kxtkkSx5xkNpMw==", "dev": true }, "loose-envify": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", - "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", - "dev": true, - "requires": { - "js-tokens": "^3.0.0" - } - }, - "lru-cache": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", - "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", "dev": true, "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" + "js-tokens": "^3.0.0 || ^4.0.0" } }, "make-error": { @@ -1205,19 +1249,19 @@ "dev": true }, "nice-try": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.4.tgz", - "integrity": "sha512-2NpiFHqC87y/zFke0fC0spBXL3bBsoh/p5H1EFhshxjCR5+0g2d6BiXbUFz9v1sAcxsk2htp2eQnNIci2dIYcA==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", "dev": true }, "nise": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/nise/-/nise-1.4.2.tgz", - "integrity": "sha512-BxH/DxoQYYdhKgVAfqVy4pzXRZELHOIewzoesxpjYvpU+7YOalQhGNPf7wAx8pLrTNPrHRDlLOkAl8UI0ZpXjw==", + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/nise/-/nise-1.4.4.tgz", + "integrity": "sha512-pxE0c9PzgrUTyhfv5p+5eMIdfU2bLEsq8VQEuE0kxM4zP7SujSar7rk9wpI2F7RyyCEvLyj5O7Is3RER5F36Fg==", "dev": true, "requires": { "@sinonjs/formatio": "^2.0.0", - "just-extend": "^1.1.27", + "just-extend": "^3.0.0", "lolex": "^2.3.2", "path-to-regexp": "^1.7.0", "text-encoding": "^0.6.4" @@ -1346,9 +1390,9 @@ "dev": true }, "path-parse": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", - "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", "dev": true }, "path-to-regexp": { @@ -1471,12 +1515,6 @@ "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", "dev": true }, - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", - "dev": true - }, "progress": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.0.tgz", @@ -1493,12 +1531,6 @@ "object-assign": "^4.1.1" } }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true - }, "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", @@ -1537,38 +1569,6 @@ } } }, - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - } - } - }, - "regexp.prototype.flags": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.2.0.tgz", - "integrity": "sha512-ztaw4M1VqgMwl9HlPpOuiYgItcHlunW0He2fE6eNfT6E/CF2FtYi9ofOYe4mKntstYk0Fyh/rDRBdS3AnxjlrA==", - "dev": true, - "requires": { - "define-properties": "^1.1.2" - } - }, "regexpp": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.0.tgz", @@ -1634,36 +1634,15 @@ "integrity": "sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q==", "dev": true }, - "rx-lite": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", - "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=", - "dev": true - }, - "rx-lite-aggregates": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz", - "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", - "dev": true, - "requires": { - "rx-lite": "*" - } - }, "rxjs": { - "version": "5.5.11", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.11.tgz", - "integrity": "sha512-3bjO7UwWfA2CV7lmwYMBzj4fQ6Cq+ftHc2MvUe+WMS7wcdJ1LosDWmdjPQanYp2dBRj572p7PeU81JUxHKOcBA==", + "version": "6.3.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.3.2.tgz", + "integrity": "sha512-hV7criqbR0pe7EeL3O66UYVg92IR0XsA97+9y+BWTePK9SKmEI5Qd3Zj6uPnGkNzXsBywBQWTvujPl+1Kn9Zjw==", "dev": true, "requires": { - "symbol-observable": "1.0.1" + "tslib": "^1.9.0" } }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -1758,25 +1737,26 @@ "dev": true }, "sinon": { - "version": "6.1.4", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-6.1.4.tgz", - "integrity": "sha512-NFEts+4D4jp2sBjL94fQpZk5o73kzn/g58+I9Dp15i9vsnT4Lk1UEyUf2jACODWLG6Pz/llF0sArYUw47Aarmg==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-6.2.0.tgz", + "integrity": "sha512-gLFZz5UYvOhYzQ+DBzw/OCkmWaLAHlAyQiE2wxUOmAGVdasP9Yw93E+OwZ0UuhW3ReMu1FKniuNsL6VukvC77w==", "dev": true, "requires": { + "@sinonjs/commons": "^1.0.2", "@sinonjs/formatio": "^2.0.0", "@sinonjs/samsam": "^2.0.0", "diff": "^3.5.0", "lodash.get": "^4.4.2", - "lolex": "^2.7.1", - "nise": "^1.4.2", - "supports-color": "^5.4.0", + "lolex": "^2.7.2", + "nise": "^1.4.4", + "supports-color": "^5.5.0", "type-detect": "^4.0.8" }, "dependencies": { "supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "requires": { "has-flag": "^3.0.0" @@ -1848,187 +1828,104 @@ "dev": true }, "standard": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/standard/-/standard-11.0.1.tgz", - "integrity": "sha512-nu0jAcHiSc8H+gJCXeiziMVZNDYi8MuqrYJKxTgjP4xKXZMKm311boqQIzDrYI/ktosltxt2CbDjYQs9ANC8IA==", - "dev": true, - "requires": { - "eslint": "~4.18.0", - "eslint-config-standard": "11.0.0", - "eslint-config-standard-jsx": "5.0.0", - "eslint-plugin-import": "~2.9.0", - "eslint-plugin-node": "~6.0.0", - "eslint-plugin-promise": "~3.7.0", - "eslint-plugin-react": "~7.7.0", - "eslint-plugin-standard": "~3.0.1", - "standard-engine": "~8.0.0" + "version": "12.0.1", + "resolved": "https://registry.npmjs.org/standard/-/standard-12.0.1.tgz", + "integrity": "sha512-UqdHjh87OG2gUrNCSM4QRLF5n9h3TFPwrCNyVlkqu31Hej0L/rc8hzKqVvkb2W3x0WMq7PzZdkLfEcBhVOR6lg==", + "dev": true, + "requires": { + "eslint": "~5.4.0", + "eslint-config-standard": "12.0.0", + "eslint-config-standard-jsx": "6.0.2", + "eslint-plugin-import": "~2.14.0", + "eslint-plugin-node": "~7.0.1", + "eslint-plugin-promise": "~4.0.0", + "eslint-plugin-react": "~7.11.1", + "eslint-plugin-standard": "~4.0.0", + "standard-engine": "~9.0.0" }, "dependencies": { - "acorn-jsx": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz", - "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", - "dev": true, - "requires": { - "acorn": "^3.0.4" - }, - "dependencies": { - "acorn": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", - "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", - "dev": true - } - } - }, - "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", - "dev": true, - "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" - } - }, - "ajv-keywords": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-2.1.1.tgz", - "integrity": "sha1-YXmX/F9gV2iUxDX5QNgZ4TW4B2I=", - "dev": true - }, - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, "eslint": { - "version": "4.18.2", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.18.2.tgz", - "integrity": "sha512-qy4i3wODqKMYfz9LUI8N2qYDkHkoieTbiHpMrYUI/WbjhXJQr7lI4VngixTgaG+yHX+NBCv7nW4hA0ShbvaNKw==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.4.0.tgz", + "integrity": "sha512-UIpL91XGex3qtL6qwyCQJar2j3osKxK9e3ano3OcGEIRM4oWIpCkDg9x95AXEC2wMs7PnxzOkPZ2gq+tsMS9yg==", "dev": true, "requires": { - "ajv": "^5.3.0", - "babel-code-frame": "^6.22.0", + "ajv": "^6.5.0", + "babel-code-frame": "^6.26.0", "chalk": "^2.1.0", - "concat-stream": "^1.6.0", - "cross-spawn": "^5.1.0", + "cross-spawn": "^6.0.5", "debug": "^3.1.0", "doctrine": "^2.1.0", - "eslint-scope": "^3.7.1", + "eslint-scope": "^4.0.0", + "eslint-utils": "^1.3.1", "eslint-visitor-keys": "^1.0.0", - "espree": "^3.5.2", - "esquery": "^1.0.0", + "espree": "^4.0.0", + "esquery": "^1.0.1", "esutils": "^2.0.2", "file-entry-cache": "^2.0.0", "functional-red-black-tree": "^1.0.1", "glob": "^7.1.2", - "globals": "^11.0.1", - "ignore": "^3.3.3", + "globals": "^11.7.0", + "ignore": "^4.0.2", "imurmurhash": "^0.1.4", - "inquirer": "^3.0.6", - "is-resolvable": "^1.0.0", - "js-yaml": "^3.9.1", + "inquirer": "^5.2.0", + "is-resolvable": "^1.1.0", + "js-yaml": "^3.11.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.3.0", - "lodash": "^4.17.4", - "minimatch": "^3.0.2", + "lodash": "^4.17.5", + "minimatch": "^3.0.4", "mkdirp": "^0.5.1", "natural-compare": "^1.4.0", "optionator": "^0.8.2", "path-is-inside": "^1.0.2", "pluralize": "^7.0.0", "progress": "^2.0.0", + "regexpp": "^2.0.0", "require-uncached": "^1.0.3", - "semver": "^5.3.0", + "semver": "^5.5.0", "strip-ansi": "^4.0.0", - "strip-json-comments": "~2.0.1", - "table": "4.0.2", - "text-table": "~0.2.0" - } - }, - "eslint-scope": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", - "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", - "dev": true, - "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - } - }, - "espree": { - "version": "3.5.4", - "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.4.tgz", - "integrity": "sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A==", - "dev": true, - "requires": { - "acorn": "^5.5.0", - "acorn-jsx": "^3.0.0" + "strip-json-comments": "^2.0.1", + "table": "^4.0.3", + "text-table": "^0.2.0" } }, - "fast-deep-equal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", - "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", - "dev": true - }, "inquirer": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz", - "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-5.2.0.tgz", + "integrity": "sha512-E9BmnJbAKLPGonz0HeWHtbKf+EeSP93paWO3ZYoUpq/aowXvYGjjCSuashhXPpzbArIjBbji39THkxTz9ZeEUQ==", "dev": true, "requires": { "ansi-escapes": "^3.0.0", "chalk": "^2.0.0", "cli-cursor": "^2.1.0", "cli-width": "^2.0.0", - "external-editor": "^2.0.4", + "external-editor": "^2.1.0", "figures": "^2.0.0", "lodash": "^4.3.0", "mute-stream": "0.0.7", "run-async": "^2.2.0", - "rx-lite": "^4.0.8", - "rx-lite-aggregates": "^4.0.8", + "rxjs": "^5.5.2", "string-width": "^2.1.0", "strip-ansi": "^4.0.0", "through": "^2.3.6" } }, - "json-schema-traverse": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", - "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", - "dev": true - }, - "table": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/table/-/table-4.0.2.tgz", - "integrity": "sha512-UUkEAPdSGxtRpiV9ozJ5cMTtYiqz7Ni1OGqLXRCynrvzdtR1p+cfOWe2RJLwvUG8hNanaSRjecIqwOjqeatDsA==", + "rxjs": { + "version": "5.5.12", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.12.tgz", + "integrity": "sha512-xx2itnL5sBbqeeiVgNPVuQQ1nC8Jp2WfNJhXWHmElW9YmrpS9UVnNzhP3EH3HFqexO5Tlp8GhYY+WEcqcVMvGw==", "dev": true, "requires": { - "ajv": "^5.2.3", - "ajv-keywords": "^2.1.0", - "chalk": "^2.1.0", - "lodash": "^4.17.4", - "slice-ansi": "1.0.0", - "string-width": "^2.1.1" + "symbol-observable": "1.0.1" } } } }, "standard-engine": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/standard-engine/-/standard-engine-8.0.1.tgz", - "integrity": "sha512-LA531C3+nljom/XRvdW/hGPXwmilRkaRkENhO3FAGF1Vtq/WtCXzgmnc5S6vUHHsgv534MRy02C1ikMwZXC+tw==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/standard-engine/-/standard-engine-9.0.0.tgz", + "integrity": "sha512-ZfNfCWZ2Xq67VNvKMPiVMKHnMdvxYzvZkf1AH8/cw2NLDBm5LRsxMqvEJpsjLI/dUosZ3Z1d6JlHDp5rAvvk2w==", "dev": true, "requires": { "deglob": "^2.1.0", @@ -2039,7 +1936,7 @@ "dependencies": { "minimist": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true } @@ -2055,28 +1952,6 @@ "strip-ansi": "^4.0.0" } }, - "string.prototype.matchall": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-2.0.0.tgz", - "integrity": "sha512-WoZ+B2ypng1dp4iFLF2kmZlwwlE19gmjgKuhL1FJfDgCREWb3ye3SDVHSzLH6bxfnvYmkCxbzkmWcQZHA4P//Q==", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.10.0", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "regexp.prototype.flags": "^1.2.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, "strip-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", @@ -2183,6 +2058,12 @@ } } }, + "tslib": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", + "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", + "dev": true + }, "type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", @@ -2198,12 +2079,6 @@ "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", - "dev": true - }, "typescript": { "version": "2.9.2", "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz", @@ -2225,16 +2100,10 @@ "punycode": "^2.1.0" } }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, "validate-npm-package-license": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz", - "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", "dev": true, "requires": { "spdx-correct": "^3.0.0", @@ -2277,12 +2146,6 @@ "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", "dev": true }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - }, "yn": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", diff --git a/package.json b/package.json index ce30a0b66..5ce7058a9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "commander", - "version": "2.17.1", + "version": "2.18.0", "description": "the complete solution for node.js command-line programs", "keywords": [ "commander", @@ -26,11 +26,11 @@ ], "dependencies": {}, "devDependencies": { - "@types/node": "^10.5.7", - "eslint": "^5.3.0", + "@types/node": "^10.9.4", + "eslint": "^5.5.0", "should": "^13.2.3", - "sinon": "^6.1.4", - "standard": "^11.0.1", + "sinon": "^6.2.0", + "standard": "^12.0.1", "ts-node": "^7.0.1", "typescript": "^2.9.2" }, From 4c294c174b89c00d5442b21e020258a4128a45b1 Mon Sep 17 00:00:00 2001 From: abetomo Date: Mon, 3 Sep 2018 12:18:10 +0900 Subject: [PATCH 087/108] Fix to change default value to string fixes: https://github.com/tj/commander.js/issues/855 --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 8e296691c..53ec69854 100644 --- a/index.js +++ b/index.js @@ -1053,7 +1053,7 @@ Command.prototype.optionHelp = function() { // Append the help information return this.options.map(function(option) { return pad(option.flags, width) + ' ' + option.description + - ((option.bool && option.defaultValue !== undefined) ? ' (default: ' + option.defaultValue + ')' : ''); + ((option.bool && option.defaultValue !== undefined) ? ' (default: ' + JSON.stringify(option.defaultValue) + ')' : ''); }).concat([pad('-h, --help', width) + ' ' + 'output usage information']) .join('\n'); }; From 2c20e91d5de863f52530489fac72e2517875cfbf Mon Sep 17 00:00:00 2001 From: Jared Petersen Date: Sun, 16 Sep 2018 20:52:36 -0700 Subject: [PATCH 088/108] removed newline after options and commands headers --- Readme.md | 4 ---- Readme_zh-CN.md | 10 +++------- index.js | 2 -- test/test.command.help.js | 4 ++-- test/test.command.helpInformation.js | 2 -- test/test.command.nohelp.js | 1 - 6 files changed, 5 insertions(+), 18 deletions(-) diff --git a/Readme.md b/Readme.md index 8484c47a8..a2a154738 100644 --- a/Readme.md +++ b/Readme.md @@ -254,7 +254,6 @@ Usage: pizza [options] An application for pizzas ordering Options: - -h, --help output usage information -V, --version output the version number -p, --peppers Add peppers @@ -294,7 +293,6 @@ program program.on('--help', function(){ console.log('') console.log('Examples:'); - console.log(''); console.log(' $ custom-help --help'); console.log(' $ custom-help -h'); }); @@ -310,7 +308,6 @@ Yields the following help output when `node script-name.js -h` or `node script-n Usage: custom-help [options] Options: - -h, --help output usage information -V, --version output the version number -f, --foo enable some foo @@ -318,7 +315,6 @@ Options: -B, --baz enable some baz Examples: - $ custom-help --help $ custom-help -h ``` diff --git a/Readme_zh-CN.md b/Readme_zh-CN.md index d6be09786..f91d2d5c6 100644 --- a/Readme_zh-CN.md +++ b/Readme_zh-CN.md @@ -192,7 +192,6 @@ Usage: pizza [options] An application for pizzas ordering Options: - -h, --help output usage information -V, --version output the version number -p, --peppers Add peppers @@ -226,10 +225,9 @@ program program.on('--help', function(){ console.log(''); - console.log(' Examples:'); - console.log(''); - console.log(' $ custom-help --help'); - console.log(' $ custom-help -h'); + console.log('Examples:'); + console.log(' $ custom-help --help'); + console.log(' $ custom-help -h'); }); program.parse(process.argv); @@ -243,7 +241,6 @@ console.log('stuff'); Usage: custom-help [options] Options: - -h, --help output usage information -V, --version output the version number -f, --foo enable some foo @@ -251,7 +248,6 @@ Options: -B, --baz enable some baz Examples: - $ custom-help --help $ custom-help -h ``` diff --git a/index.js b/index.js index 53ec69854..6ddfdd792 100644 --- a/index.js +++ b/index.js @@ -1073,7 +1073,6 @@ Command.prototype.commandHelp = function() { return [ 'Commands:', - '', commands.map(function(cmd) { var desc = cmd[1] ? ' ' + cmd[1] : ''; return (desc ? pad(cmd[0], width) : cmd[0]) + desc; @@ -1124,7 +1123,6 @@ Command.prototype.helpInformation = function() { var options = [ 'Options:', - '', '' + this.optionHelp().replace(/^/gm, ' '), '' ]; diff --git a/test/test.command.help.js b/test/test.command.help.js index 71cc7ccf4..18a6bc7c3 100644 --- a/test/test.command.help.js +++ b/test/test.command.help.js @@ -5,8 +5,8 @@ var program = require('../') program.command('bare'); -program.commandHelp().should.equal('Commands:\n\n bare\n'); +program.commandHelp().should.equal('Commands:\n bare\n'); program.command('mycommand [options]'); -program.commandHelp().should.equal('Commands:\n\n bare\n mycommand [options]\n'); +program.commandHelp().should.equal('Commands:\n bare\n mycommand [options]\n'); diff --git a/test/test.command.helpInformation.js b/test/test.command.helpInformation.js index 184b74c1a..5ec9c3ab8 100644 --- a/test/test.command.helpInformation.js +++ b/test/test.command.helpInformation.js @@ -10,11 +10,9 @@ var expectedHelpInformation = [ 'Usage: [options] [command]', '', 'Options:', - '', ' -h, --help output usage information', '', 'Commands:', - '', ' somecommand', ' anothercommand [options]', '' diff --git a/test/test.command.nohelp.js b/test/test.command.nohelp.js index 417be64ab..a56972185 100644 --- a/test/test.command.nohelp.js +++ b/test/test.command.nohelp.js @@ -48,7 +48,6 @@ var output = process.stdout.write.args[0]; var expect = [ 'Commands:', - '', ' mycommand [options] this is my command', ' anothercommand [options]', ' help [cmd] display help for [cmd]' From b6549f272e796a6a7b64837dbedcc695c24e43d4 Mon Sep 17 00:00:00 2001 From: Jared Petersen Date: Sun, 16 Sep 2018 20:18:51 -0700 Subject: [PATCH 089/108] removed indentation from errors --- index.js | 10 +++++----- test/test.options.args.required.js | 2 +- test/test.variadic.args.js | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/index.js b/index.js index 6ddfdd792..a557b32fe 100644 --- a/index.js +++ b/index.js @@ -793,7 +793,7 @@ Command.prototype.opts = function() { Command.prototype.missingArgument = function(name) { console.error(); - console.error(" error: missing required argument `%s'", name); + console.error("error: missing required argument `%s'", name); console.error(); process.exit(1); }; @@ -809,9 +809,9 @@ Command.prototype.missingArgument = function(name) { Command.prototype.optionMissingArgument = function(option, flag) { console.error(); if (flag) { - console.error(" error: option `%s' argument missing, got `%s'", option.flags, flag); + console.error("error: option `%s' argument missing, got `%s'", option.flags, flag); } else { - console.error(" error: option `%s' argument missing", option.flags); + console.error("error: option `%s' argument missing", option.flags); } console.error(); process.exit(1); @@ -827,7 +827,7 @@ Command.prototype.optionMissingArgument = function(option, flag) { Command.prototype.unknownOption = function(flag) { if (this._allowUnknownOption) return; console.error(); - console.error(" error: unknown option `%s'", flag); + console.error("error: unknown option `%s'", flag); console.error(); process.exit(1); }; @@ -841,7 +841,7 @@ Command.prototype.unknownOption = function(flag) { Command.prototype.variadicArgNotLast = function(name) { console.error(); - console.error(" error: variadic arguments must be last `%s'", name); + console.error("error: variadic arguments must be last `%s'", name); console.error(); process.exit(1); }; diff --git a/test/test.options.args.required.js b/test/test.options.args.required.js index f809f3f67..ba20e44b2 100644 --- a/test/test.options.args.required.js +++ b/test/test.options.args.required.js @@ -15,7 +15,7 @@ console.error = function () { process.on('exit', function (code) { code.should.equal(1); info.length.should.equal(3); - info[1].should.equal(" error: option `-c, --cheese ' argument missing"); + info[1].should.equal("error: option `-c, --cheese ' argument missing"); process.exit(0) }); diff --git a/test/test.variadic.args.js b/test/test.variadic.args.js index 72cff8ae1..11bf13bba 100644 --- a/test/test.variadic.args.js +++ b/test/test.variadic.args.js @@ -59,6 +59,6 @@ console.error = oldConsoleError; [ '', - ' error: variadic arguments must be last `variadicArg\'', + 'error: variadic arguments must be last `variadicArg\'', '' ].join('\n').should.eql(errorMessage); From 6c0c1f64b63374dc554145fcf26dcbc3a60732db Mon Sep 17 00:00:00 2001 From: Jared Petersen Date: Sun, 16 Sep 2018 20:30:09 -0700 Subject: [PATCH 090/108] removed newline above and below errors --- index.js | 8 -------- test/test.command.allowUnknownOption.js | 4 ++-- test/test.options.args.required.js | 4 ++-- test/test.variadic.args.js | 6 +----- 4 files changed, 5 insertions(+), 17 deletions(-) diff --git a/index.js b/index.js index a557b32fe..724f98f33 100644 --- a/index.js +++ b/index.js @@ -792,9 +792,7 @@ Command.prototype.opts = function() { */ Command.prototype.missingArgument = function(name) { - console.error(); console.error("error: missing required argument `%s'", name); - console.error(); process.exit(1); }; @@ -807,13 +805,11 @@ Command.prototype.missingArgument = function(name) { */ Command.prototype.optionMissingArgument = function(option, flag) { - console.error(); if (flag) { console.error("error: option `%s' argument missing, got `%s'", option.flags, flag); } else { console.error("error: option `%s' argument missing", option.flags); } - console.error(); process.exit(1); }; @@ -826,9 +822,7 @@ Command.prototype.optionMissingArgument = function(option, flag) { Command.prototype.unknownOption = function(flag) { if (this._allowUnknownOption) return; - console.error(); console.error("error: unknown option `%s'", flag); - console.error(); process.exit(1); }; @@ -840,9 +834,7 @@ Command.prototype.unknownOption = function(flag) { */ Command.prototype.variadicArgNotLast = function(name) { - console.error(); console.error("error: variadic arguments must be last `%s'", name); - console.error(); process.exit(1); }; diff --git a/test/test.command.allowUnknownOption.js b/test/test.command.allowUnknownOption.js index 7261dd95a..598d21d4d 100644 --- a/test/test.command.allowUnknownOption.js +++ b/test/test.command.allowUnknownOption.js @@ -13,7 +13,7 @@ program .option('-p, --pepper', 'add pepper'); program.parse('node test -m'.split(' ')); -stubError.callCount.should.equal(3); +stubError.callCount.should.equal(1); // test subcommand @@ -24,7 +24,7 @@ program }); program.parse('node test sub -m'.split(' ')); -stubError.callCount.should.equal(3); +stubError.callCount.should.equal(1); stubExit.calledOnce.should.be.true(); // command with `allowUnknownOption` diff --git a/test/test.options.args.required.js b/test/test.options.args.required.js index ba20e44b2..10eebc10b 100644 --- a/test/test.options.args.required.js +++ b/test/test.options.args.required.js @@ -14,8 +14,8 @@ console.error = function () { process.on('exit', function (code) { code.should.equal(1); - info.length.should.equal(3); - info[1].should.equal("error: option `-c, --cheese ' argument missing"); + info.length.should.equal(1); + info[0].should.equal("error: option `-c, --cheese ' argument missing"); process.exit(0) }); diff --git a/test/test.variadic.args.js b/test/test.variadic.args.js index 11bf13bba..80bdad530 100644 --- a/test/test.variadic.args.js +++ b/test/test.variadic.args.js @@ -57,8 +57,4 @@ try { process.exit = oldProcessExit; console.error = oldConsoleError; -[ - '', - 'error: variadic arguments must be last `variadicArg\'', - '' -].join('\n').should.eql(errorMessage); +'error: variadic arguments must be last `variadicArg\''.should.eql(errorMessage); From 6aafa200211727ac80401ee7e4188be043e56a83 Mon Sep 17 00:00:00 2001 From: Jared Petersen Date: Sat, 29 Sep 2018 13:20:47 -0700 Subject: [PATCH 091/108] prefixed error messages with "error:" --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 724f98f33..bf039c90a 100644 --- a/index.js +++ b/index.js @@ -580,9 +580,9 @@ Command.prototype.executeSubCommand = function(argv, args, unknown) { proc.on('close', process.exit.bind(process)); proc.on('error', function(err) { if (err.code === 'ENOENT') { - console.error('%s(1) does not exist, try --help', bin); + console.error('error: %s(1) does not exist, try --help', bin); } else if (err.code === 'EACCES') { - console.error('%s(1) not executable. try chmod or run with root', bin); + console.error('error: %s(1) not executable. try chmod or run with root', bin); } process.exit(1); }); From 78b7dbd18aabc23ccc9d151db411913237a3c483 Mon Sep 17 00:00:00 2001 From: abetomo Date: Tue, 2 Oct 2018 10:08:28 +0900 Subject: [PATCH 092/108] version bump 2.19.0 --- CHANGELOG.md | 7 +++ package-lock.json | 120 ++++++++++++++++++++++++++-------------------- package.json | 8 ++-- 3 files changed, 78 insertions(+), 57 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d61aa451c..fd4f69c99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,11 @@ +2.19.0 / 2018-10-02 +================== + + * Removed newline after Options and Commands headers (#864) + * Bugfix - Error output (#862) + * Fix to change default value to string (#856) + 2.18.0 / 2018-09-07 ================== diff --git a/package-lock.json b/package-lock.json index b1f7aaee3..54f6aa992 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "commander", - "version": "2.18.0", + "version": "2.19.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -42,24 +42,38 @@ } }, "@sinonjs/formatio": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", - "integrity": "sha512-ls6CAMA6/5gG+O/IdsBcblvnd8qcO/l1TYoNeAzp3wcISOxlPXQEus0mLcdwazEkWjaBdaJ3TaxmNgCLWwvWzg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-3.0.0.tgz", + "integrity": "sha512-vdjoYLDptCgvtJs57ULshak3iJe4NW3sJ3g36xVDGff5AE8P30S6A093EIEPjdi2noGhfuNOEkbxt3J3awFW1w==", "dev": true, "requires": { - "samsam": "1.3.0" + "@sinonjs/samsam": "2.1.0" + }, + "dependencies": { + "@sinonjs/samsam": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-2.1.0.tgz", + "integrity": "sha512-5x2kFgJYupaF1ns/RmharQ90lQkd2ELS8A9X0ymkAAdemYHGtI2KiUHG8nX2WU0T1qgnOU5YMqnBM2V7NUanNw==", + "dev": true, + "requires": { + "array-from": "^2.1.1" + } + } } }, "@sinonjs/samsam": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-2.0.0.tgz", - "integrity": "sha512-D7VxhADdZbDJ0HjUTMnSQ5xIGb4H2yWpg8k9Sf1T08zfFiQYlaxM8LZydpR4FQ2E6LZJX8IlabNZ5io4vdChwg==", - "dev": true + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-2.1.1.tgz", + "integrity": "sha512-7oX6PXMulvdN37h88dvlvRyu61GYZau40fL4wEZvPEHvrjpJc3lDv6xDM5n4Z0StufUVB5nDvVZUM+jZHdMOOQ==", + "dev": true, + "requires": { + "array-from": "^2.1.1" + } }, "@types/node": { - "version": "10.9.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.9.4.tgz", - "integrity": "sha512-fCHV45gS+m3hH17zgkgADUSi2RR1Vht6wOZ0jyHP8rjiQra9f+mIcgwPQHllmDocYOstIEbKlxbFDYlgrTPYqw==", + "version": "10.11.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.11.3.tgz", + "integrity": "sha512-3AvcEJAh9EMatxs+OxAlvAEs7OTy6AG94mcH1iqyVDwVVndekLxzwkWQ/Z4SDbY6GO2oyUXyWW8tQ4rENSSQVQ==", "dev": true }, "acorn": { @@ -122,6 +136,12 @@ "sprintf-js": "~1.0.2" } }, + "array-from": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/array-from/-/array-from-2.1.1.tgz", + "integrity": "sha1-z+nYwmYoudxa7MYqn12PHzUsEZU=", + "dev": true + }, "array-includes": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.0.3.tgz", @@ -451,16 +471,16 @@ "dev": true }, "eslint": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.5.0.tgz", - "integrity": "sha512-m+az4vYehIJgl1Z0gb25KnFXeqQRdNreYsei1jdvkd9bB+UNQD3fsuiC2AWSQ56P+/t++kFSINZXFbfai+krOw==", + "version": "5.6.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.6.1.tgz", + "integrity": "sha512-hgrDtGWz368b7Wqf+v1Z69O3ZebNR0+GA7PtDdbmuz4rInFVUV9uw7whjZEiWyLzCjVb5Rs5WRN1TAS6eo7AYA==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", "ajv": "^6.5.3", "chalk": "^2.1.0", "cross-spawn": "^6.0.5", - "debug": "^3.1.0", + "debug": "^4.0.1", "doctrine": "^2.1.0", "eslint-scope": "^4.0.0", "eslint-utils": "^1.3.1", @@ -496,10 +516,19 @@ "text-table": "^0.2.0" }, "dependencies": { - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "debug": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.0.1.tgz", + "integrity": "sha512-K23FHJ/Mt404FSlp6gSZCevIbTMLX0j3fmHhUEhQ3Wq0FMODW3+cUSoLdy1Gx4polAf4t/lphhmHH35BB8cLYw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", "dev": true }, "semver": { @@ -970,15 +999,6 @@ "iconv-lite": "^0.4.24", "tmp": "^0.0.33" } - }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } } } }, @@ -1180,9 +1200,9 @@ "dev": true }, "lolex": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.7.4.tgz", - "integrity": "sha512-Gh6Vffq/piTeHwunLNFR1jFVaqlwK9GMNUxFcsO1cwHyvbRKHwX8UDkxmrDnbcPdHNmpv7z2kxtkkSx5xkNpMw==", + "version": "2.7.5", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.7.5.tgz", + "integrity": "sha512-l9x0+1offnKKIzYVjyXU2SiwhXDLekRzKyhnbyldPHvC7BvLPVpdNUNR2KeMAiCN2D/kLNttZgQD5WjSxuBx3Q==", "dev": true }, "loose-envify": { @@ -1255,12 +1275,12 @@ "dev": true }, "nise": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/nise/-/nise-1.4.4.tgz", - "integrity": "sha512-pxE0c9PzgrUTyhfv5p+5eMIdfU2bLEsq8VQEuE0kxM4zP7SujSar7rk9wpI2F7RyyCEvLyj5O7Is3RER5F36Fg==", + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/nise/-/nise-1.4.5.tgz", + "integrity": "sha512-OHRVvdxKgwZELf2DTgsJEIA4MOq8XWvpSUzoOXyxJ2mY0mMENWC66+70AShLR2z05B1dzrzWlUQJmJERlOUpZw==", "dev": true, "requires": { - "@sinonjs/formatio": "^2.0.0", + "@sinonjs/formatio": "3.0.0", "just-extend": "^3.0.0", "lolex": "^2.3.2", "path-to-regexp": "^1.7.0", @@ -1635,9 +1655,9 @@ "dev": true }, "rxjs": { - "version": "6.3.2", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.3.2.tgz", - "integrity": "sha512-hV7criqbR0pe7EeL3O66UYVg92IR0XsA97+9y+BWTePK9SKmEI5Qd3Zj6uPnGkNzXsBywBQWTvujPl+1Kn9Zjw==", + "version": "6.3.3", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.3.3.tgz", + "integrity": "sha512-JTWmoY9tWCs7zvIk/CvRjhjGaOd+OVBM987mxFo+OW66cGpdKjZcpmc74ES1sB//7Kl/PAe8+wEakuhG4pcgOw==", "dev": true, "requires": { "tslib": "^1.9.0" @@ -1649,12 +1669,6 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true }, - "samsam": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/samsam/-/samsam-1.3.0.tgz", - "integrity": "sha512-1HwIYD/8UlOtFS3QO3w7ey+SdSDFE4HRNLZoZRYVQefrOY3l17epswImeB1ijgJFQJodIaHcwkp3r/myBjFVbg==", - "dev": true - }, "semver": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", @@ -1737,18 +1751,18 @@ "dev": true }, "sinon": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-6.2.0.tgz", - "integrity": "sha512-gLFZz5UYvOhYzQ+DBzw/OCkmWaLAHlAyQiE2wxUOmAGVdasP9Yw93E+OwZ0UuhW3ReMu1FKniuNsL6VukvC77w==", + "version": "6.3.4", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-6.3.4.tgz", + "integrity": "sha512-NIaR56Z1mefuRBXYrf4otqBxkWiKveX+fvqs3HzFq2b07HcgpkMgIwmQM/owNjNFAHkx0kJXW+Q0mDthiuslXw==", "dev": true, "requires": { "@sinonjs/commons": "^1.0.2", - "@sinonjs/formatio": "^2.0.0", - "@sinonjs/samsam": "^2.0.0", + "@sinonjs/formatio": "^3.0.0", + "@sinonjs/samsam": "^2.1.1", "diff": "^3.5.0", "lodash.get": "^4.4.2", - "lolex": "^2.7.2", - "nise": "^1.4.4", + "lolex": "^2.7.4", + "nise": "^1.4.5", "supports-color": "^5.5.0", "type-detect": "^4.0.8" }, @@ -2009,7 +2023,7 @@ }, "text-encoding": { "version": "0.6.4", - "resolved": "https://registry.npmjs.org/text-encoding/-/text-encoding-0.6.4.tgz", + "resolved": "http://registry.npmjs.org/text-encoding/-/text-encoding-0.6.4.tgz", "integrity": "sha1-45mpgiV6J22uQou5KEXLcb3CbRk=", "dev": true }, diff --git a/package.json b/package.json index 5ce7058a9..a68384294 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "commander", - "version": "2.18.0", + "version": "2.19.0", "description": "the complete solution for node.js command-line programs", "keywords": [ "commander", @@ -26,10 +26,10 @@ ], "dependencies": {}, "devDependencies": { - "@types/node": "^10.9.4", - "eslint": "^5.5.0", + "@types/node": "^10.11.3", + "eslint": "^5.6.1", "should": "^13.2.3", - "sinon": "^6.2.0", + "sinon": "^6.3.4", "standard": "^12.0.1", "ts-node": "^7.0.1", "typescript": "^2.9.2" From 700130ee5db09d1529e89dbce74709d215640fed Mon Sep 17 00:00:00 2001 From: Manoel Lobo Date: Mon, 8 Oct 2018 16:11:28 -0300 Subject: [PATCH 093/108] Add extension to .eslintrc --- .eslintrc => .eslintrc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .eslintrc => .eslintrc.json (71%) diff --git a/.eslintrc b/.eslintrc.json similarity index 71% rename from .eslintrc rename to .eslintrc.json index f3a6a3b85..c75e9aed0 100644 --- a/.eslintrc +++ b/.eslintrc.json @@ -3,6 +3,6 @@ "rules": { "one-var": "off", "semi": ["error", "always", { "omitLastInOneLineBlock": true }], - "space-before-function-paren": ["error", "never"], + "space-before-function-paren": ["error", "never"] } } From f054510f17cf745b054f3e9b3b31b4171883ee46 Mon Sep 17 00:00:00 2001 From: reviewher <24845478+reviewher@users.noreply.github.com> Date: Sat, 20 Oct 2018 18:45:27 -0400 Subject: [PATCH 094/108] Added missing semicolon --- .eslintrc.json | 2 +- index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index c75e9aed0..9acfc3c48 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -2,7 +2,7 @@ "extends": "standard", "rules": { "one-var": "off", - "semi": ["error", "always", { "omitLastInOneLineBlock": true }], + "semi": ["error", "always"], "space-before-function-paren": ["error", "never"] } } diff --git a/index.js b/index.js index bf039c90a..84436d8ea 100644 --- a/index.js +++ b/index.js @@ -664,7 +664,7 @@ Command.prototype.parseArgs = function(args, unknown) { this.unknownOption(unknown[0]); } if (this.commands.length === 0 && - this._args.filter(function(a) { return a.required }).length === 0) { + this._args.filter(function(a) { return a.required; }).length === 0) { this.emit('command:*'); } } From 03f7d387013594e98a18e4561c8e059ab8fe0a93 Mon Sep 17 00:00:00 2001 From: codyj110 Date: Wed, 5 Sep 2018 22:56:29 -0400 Subject: [PATCH 095/108] Added example of receiving args from options Updated file to give example and how to manage arguments using options parsing. --- Readme.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Readme.md b/Readme.md index a2a154738..6d5864020 100644 --- a/Readme.md +++ b/Readme.md @@ -65,6 +65,18 @@ if (program.sauce) console.log(' with sauce'); else console.log(' without sauce'); ``` +To get string arguments from options you will need to use angle brackets <> for required inputs
+or square brackets [] for optional inputs. + +e.g. ```.option(' -m --myarg [myVar]', 'my super cool description')```
+ +Then to access the input if it was passed in. + +e.g. ```var myInput = program.myarg``` + +**NOTE**: If you pass a argument without using brackets the example above will return true and not the value passed in. + + ## Version option Calling the `version` implicitly adds the `-V` and `--version` options to the command. From d24008158d0870a6df2279dc93c7a36d3f41926d Mon Sep 17 00:00:00 2001 From: codyj110 Date: Thu, 6 Sep 2018 08:29:41 -0400 Subject: [PATCH 096/108] Update Readme.md removed
not needed --- Readme.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Readme.md b/Readme.md index 6d5864020..1f9490750 100644 --- a/Readme.md +++ b/Readme.md @@ -65,10 +65,9 @@ if (program.sauce) console.log(' with sauce'); else console.log(' without sauce'); ``` -To get string arguments from options you will need to use angle brackets <> for required inputs
-or square brackets [] for optional inputs. +To get string arguments from options you will need to use angle brackets <> for required inputs or square brackets [] for optional inputs. -e.g. ```.option(' -m --myarg [myVar]', 'my super cool description')```
+e.g. ```.option(' -m --myarg [myVar]', 'my super cool description')``` Then to access the input if it was passed in. From cec57f5508711f3222cf434ccd46fafb5d6114a0 Mon Sep 17 00:00:00 2001 From: James George Date: Fri, 28 Dec 2018 08:45:04 +0530 Subject: [PATCH 097/108] Add link to the license file :+1: --- Readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index 1f9490750..d23e4b59c 100644 --- a/Readme.md +++ b/Readme.md @@ -425,4 +425,4 @@ More Demos can be found in the [examples](https://github.com/tj/commander.js/tre ## License -MIT +[MIT](https://github.com/jamesgeorge007/commander.js/blob/master/LICENSE) From 82d0d0ae6d66163f5c97ce56031b796621bef4ce Mon Sep 17 00:00:00 2001 From: James George Date: Fri, 28 Dec 2018 15:30:51 +0530 Subject: [PATCH 098/108] fix url :construction: --- Readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index d23e4b59c..7e09c21ec 100644 --- a/Readme.md +++ b/Readme.md @@ -425,4 +425,4 @@ More Demos can be found in the [examples](https://github.com/tj/commander.js/tre ## License -[MIT](https://github.com/jamesgeorge007/commander.js/blob/master/LICENSE) +[MIT](https://github.com/tj/commander.js/blob/master/LICENSE) From 68545af7130967bc1a35ae30e9567d78c5e56d8a Mon Sep 17 00:00:00 2001 From: Steve Moser Date: Mon, 18 Feb 2019 14:38:29 -0500 Subject: [PATCH 099/108] Remove --save option as it isn't required anymore --- Readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index 7e09c21ec..474df29a8 100644 --- a/Readme.md +++ b/Readme.md @@ -13,7 +13,7 @@ ## Installation - $ npm install commander --save + $ npm install commander ## Option parsing From 77bb5807476fef649bbc1721c0e9e6ef59b9b560 Mon Sep 17 00:00:00 2001 From: Dearest <35801357+ForJing@users.noreply.github.com> Date: Sat, 2 Mar 2019 16:23:21 +0800 Subject: [PATCH 100/108] Update Readme.md remove the white space otherwise run `-m xxx` the `program.myarg` would be `undefined` --- Readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index 474df29a8..c846e7a2d 100644 --- a/Readme.md +++ b/Readme.md @@ -67,7 +67,7 @@ else console.log(' without sauce'); To get string arguments from options you will need to use angle brackets <> for required inputs or square brackets [] for optional inputs. -e.g. ```.option(' -m --myarg [myVar]', 'my super cool description')``` +e.g. ```.option('-m --myarg [myVar]', 'my super cool description')``` Then to access the input if it was passed in. From e31bb8ad665c64d53ae690aa21a35579a42e8c08 Mon Sep 17 00:00:00 2001 From: kira1928 Date: Thu, 14 Mar 2019 11:33:16 +0800 Subject: [PATCH 101/108] Update index.d.ts Add the optional parameter `argsDescription` to description() function --- typings/index.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/typings/index.d.ts b/typings/index.d.ts index 312b056de..efea94f18 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -226,9 +226,10 @@ declare namespace local { * Set the description to `str`. * * @param {string} str + * @param {{[key: string]: any}} argsDescription * @return {(Command | string)} */ - description(str: string): Command; + description(str: string, argsDescription?: {[key: string]: any}): Command; description(): string; /** From a67994996a07cd871eb56147bd21a58aaa93ff1d Mon Sep 17 00:00:00 2001 From: kira1928 Date: Thu, 14 Mar 2019 22:45:08 +0800 Subject: [PATCH 102/108] Refine variable name. Use strict type definition instead of --- typings/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typings/index.d.ts b/typings/index.d.ts index efea94f18..4c5a8dc5a 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -226,7 +226,7 @@ declare namespace local { * Set the description to `str`. * * @param {string} str - * @param {{[key: string]: any}} argsDescription + * @param {{[argName: string]: string}} argsDescription * @return {(Command | string)} */ description(str: string, argsDescription?: {[key: string]: any}): Command; From a4691373f301a6f3060078899eab4fd8d1a8fa8c Mon Sep 17 00:00:00 2001 From: kira1928 Date: Thu, 14 Mar 2019 22:50:56 +0800 Subject: [PATCH 103/108] some more fix. --- typings/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typings/index.d.ts b/typings/index.d.ts index 4c5a8dc5a..bcda2771e 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -229,7 +229,7 @@ declare namespace local { * @param {{[argName: string]: string}} argsDescription * @return {(Command | string)} */ - description(str: string, argsDescription?: {[key: string]: any}): Command; + description(str: string, argsDescription?: {[argName: string]: string}): Command; description(): string; /** From 994d24ddad4c1139d1ea3d5f94286f6d79b61f99 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Thu, 21 Mar 2019 13:43:46 -0700 Subject: [PATCH 104/108] fix: resolve symbol links until their are no more symbolic links Depending on your npm / yarn set up a global install may have to resolve through several symlinks before it correctly arrives the the baseDir that actually contains the other subcommands. The changes the resolution logic to resolve symlinks until their are no more to resolve by using realpath which will resolve links all the way to the final destination. --- index.js | 11 ++++------- test/fixtures/another-dir/pm | 1 + test/fixtures/other-dir/pm | 1 + test/test.command.executableSubcommand.js | 7 +++++++ test/test.command.executableSubcommandAlias.js | 7 +++++++ test/test.command.executableSubcommandDefault.js | 7 +++++++ 6 files changed, 27 insertions(+), 7 deletions(-) create mode 120000 test/fixtures/another-dir/pm create mode 120000 test/fixtures/other-dir/pm diff --git a/index.js b/index.js index 84436d8ea..06173c1a0 100644 --- a/index.js +++ b/index.js @@ -527,14 +527,11 @@ Command.prototype.executeSubCommand = function(argv, args, unknown) { // In case of globally installed, get the base dir where executable // subcommand file should be located at - var baseDir, - link = fs.lstatSync(f).isSymbolicLink() ? fs.readlinkSync(f) : f; + var baseDir; - // when symbolink is relative path - if (link !== f && link.charAt(0) !== '/') { - link = path.join(dirname(f), link); - } - baseDir = dirname(link); + var resolvedLink = fs.realpathSync(f); + + baseDir = dirname(resolvedLink); // prefer local `./` to bin in the $PATH var localBin = path.join(baseDir, bin); diff --git a/test/fixtures/another-dir/pm b/test/fixtures/another-dir/pm new file mode 120000 index 000000000..9e8f71e18 --- /dev/null +++ b/test/fixtures/another-dir/pm @@ -0,0 +1 @@ +../other-dir/pm \ No newline at end of file diff --git a/test/fixtures/other-dir/pm b/test/fixtures/other-dir/pm new file mode 120000 index 000000000..d7569ef30 --- /dev/null +++ b/test/fixtures/other-dir/pm @@ -0,0 +1 @@ +../pm \ No newline at end of file diff --git a/test/test.command.executableSubcommand.js b/test/test.command.executableSubcommand.js index 2dae6b7bf..b9c720c04 100644 --- a/test/test.command.executableSubcommand.js +++ b/test/test.command.executableSubcommand.js @@ -34,3 +34,10 @@ var bin = path.join(__dirname, './fixtures/pmlink') exec(bin + ' install', function (error, stdout, stderr) { stdout.should.equal('install\n'); }); + +// when `bin` is a symbol link pointing at a symbolic for mocking global install +var bin = path.join(__dirname, './fixtures/another-dir/pm') +// success case +exec(bin + ' install', function (error, stdout, stderr) { + stdout.should.equal('install\n'); +}); diff --git a/test/test.command.executableSubcommandAlias.js b/test/test.command.executableSubcommandAlias.js index 6d03161eb..0bf1fb0f4 100644 --- a/test/test.command.executableSubcommandAlias.js +++ b/test/test.command.executableSubcommandAlias.js @@ -26,3 +26,10 @@ var bin = path.join(__dirname, './fixtures/pmlink') exec(bin + ' i', function (error, stdout, stderr) { stdout.should.equal('install\n'); }); + +// when `bin` is a symbol link pointing at a symbolic for mocking global install +var bin = path.join(__dirname, './fixtures/another-dir/pm') +// success case +exec(bin + ' install', function (error, stdout, stderr) { + stdout.should.equal('install\n'); +}); diff --git a/test/test.command.executableSubcommandDefault.js b/test/test.command.executableSubcommandDefault.js index 36796d867..cf6d773a8 100644 --- a/test/test.command.executableSubcommandDefault.js +++ b/test/test.command.executableSubcommandDefault.js @@ -44,3 +44,10 @@ var bin = path.join(__dirname, './fixtures/pmlink') exec(bin + ' install', function (error, stdout, stderr) { stdout.should.equal('install\n'); }); + +// when `bin` is a symbol link pointing at a symbolic for mocking global install +var bin = path.join(__dirname, './fixtures/another-dir/pm') +// success case +exec(bin + ' install', function (error, stdout, stderr) { + stdout.should.equal('install\n'); +}); From 1ffcbefb1545767bd81f63dcff1a75c0d7deb8a1 Mon Sep 17 00:00:00 2001 From: abetomo Date: Tue, 2 Apr 2019 09:41:04 +0900 Subject: [PATCH 105/108] version bump 2.20.0 --- CHANGELOG.md | 12 ++++++++++++ package-lock.json | 2 +- package.json | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fd4f69c99..953ef21b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,16 @@ +2.20.0 / 2019-04-02 +================== + + * fix: resolve symbolic links completely when hunting for subcommands (#935) + * Update index.d.ts (#930) + * Update Readme.md (#924) + * Remove --save option as it isn't required anymore (#918) + * Add link to the license file (#900) + * Added example of receiving args from options (#858) + * Added missing semicolon (#882) + * Add extension to .eslintrc (#876) + 2.19.0 / 2018-10-02 ================== diff --git a/package-lock.json b/package-lock.json index 54f6aa992..9f11925a2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "commander", - "version": "2.19.0", + "version": "2.20.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index a68384294..098df2bbc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "commander", - "version": "2.19.0", + "version": "2.20.0", "description": "the complete solution for node.js command-line programs", "keywords": [ "commander", From f8fd9da4a1f162022b80475dfe0a0acdbec803e1 Mon Sep 17 00:00:00 2001 From: John Gee Date: Sat, 6 Apr 2019 18:27:55 +1300 Subject: [PATCH 106/108] Remove gitter badge as chat inactive --- Readme.md | 1 - Readme_zh-CN.md | 1 - 2 files changed, 2 deletions(-) diff --git a/Readme.md b/Readme.md index c846e7a2d..3c00815cb 100644 --- a/Readme.md +++ b/Readme.md @@ -5,7 +5,6 @@ [![NPM Version](http://img.shields.io/npm/v/commander.svg?style=flat)](https://www.npmjs.org/package/commander) [![NPM Downloads](https://img.shields.io/npm/dm/commander.svg?style=flat)](https://npmcharts.com/compare/commander?minimal=true) [![Install Size](https://packagephobia.now.sh/badge?p=commander)](https://packagephobia.now.sh/result?p=commander) -[![Join the chat at https://gitter.im/tj/commander.js](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/tj/commander.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) The complete solution for [node.js](http://nodejs.org) command-line interfaces, inspired by Ruby's [commander](https://github.com/commander-rb/commander). [API documentation](http://tj.github.com/commander.js/) diff --git a/Readme_zh-CN.md b/Readme_zh-CN.md index f91d2d5c6..febfadd63 100644 --- a/Readme_zh-CN.md +++ b/Readme_zh-CN.md @@ -4,7 +4,6 @@ [![Build Status](https://api.travis-ci.org/tj/commander.js.svg)](http://travis-ci.org/tj/commander.js) [![NPM Version](http://img.shields.io/npm/v/commander.svg?style=flat)](https://www.npmjs.org/package/commander) [![NPM Downloads](https://img.shields.io/npm/dm/commander.svg?style=flat)](https://www.npmjs.org/package/commander) -[![Join the chat at https://gitter.im/tj/commander.js](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/tj/commander.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [node.js](http://nodejs.org) 命令行接口的完整解决方案,灵感来自 Ruby 的 [commander](https://github.com/commander-rb/commander)。 [API 文档](http://tj.github.com/commander.js/) From 62ef8e8d0f35bae6aec3f2eec1ef03945d66557d Mon Sep 17 00:00:00 2001 From: Eduard Badillo Date: Fri, 12 Apr 2019 19:51:28 +0200 Subject: [PATCH 107/108] Add mjs file extension --- index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/index.js b/index.js index 06173c1a0..289814d12 100644 --- a/index.js +++ b/index.js @@ -544,6 +544,9 @@ Command.prototype.executeSubCommand = function(argv, args, unknown) { } else if (exists(localBin + '.ts')) { bin = localBin + '.ts'; isExplicitJS = true; + } else if (exists(localBin + '.mjs')) { + bin = localBin + '.mjs'; + isExplicitJS = true; } else if (exists(localBin)) { bin = localBin; } From d3552abd04cdbf44aa82e76a852cb8071eb10f53 Mon Sep 17 00:00:00 2001 From: John Gee Date: Tue, 16 Apr 2019 16:19:51 +1200 Subject: [PATCH 108/108] Add editorconfig with existing style --- .editorconfig | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..8f7d6654a --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +# EditorConfig is awesome: http://EditorConfig.org + +# top-most EditorConfig file +root = true + +[*] +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 2 +tab_width = 2 +# trim_trailing_whitespace = true