Comparing version 1.2.3 to 2.0.0
@@ -25,3 +25,3 @@ 'use strict'; | ||
name: val.name || val.value, | ||
value: val.hasOwnProperty('value') ? val.value : val.name, | ||
value: 'value' in val ? val.value : val.name, | ||
short: val.short || val.name || val.value | ||
@@ -28,0 +28,0 @@ }); |
@@ -225,3 +225,3 @@ /** | ||
Prompt.prototype.generateChoicesString = function (choices, defaultIndex) { | ||
var defIndex = 0; | ||
var defIndex = choices.realLength - 1; | ||
if (_.isNumber(defaultIndex) && this.opt.choices.getChoice(defaultIndex)) { | ||
@@ -228,0 +228,0 @@ defIndex = defaultIndex; |
@@ -43,3 +43,3 @@ 'use strict'; | ||
.reduce(function (answers, answer) { | ||
this.answers[answer.name] = answer.answer; | ||
_.set(this.answers, answer.name, answer.answer); | ||
return this.answers; | ||
@@ -46,0 +46,0 @@ }.bind(this), {}) |
{ | ||
"name": "inquirer", | ||
"version": "1.2.3", | ||
"version": "2.0.0", | ||
"description": "A collection of common interactive command line user interfaces.", | ||
@@ -30,3 +30,3 @@ "author": "Simon Boudrias <admin@simonboudrias.com>", | ||
"external-editor": "^1.1.0", | ||
"figures": "^1.3.5", | ||
"figures": "^2.0.0", | ||
"lodash": "^4.3.0", | ||
@@ -37,3 +37,3 @@ "mute-stream": "0.0.6", | ||
"rx": "^4.1.0", | ||
"string-width": "^1.0.1", | ||
"string-width": "^2.0.0", | ||
"strip-ansi": "^3.0.0", | ||
@@ -45,15 +45,15 @@ "through": "^2.3.6" | ||
"cmdify": "^0.0.4", | ||
"eslint": "^2.1.0", | ||
"eslint-config-xo-space": "^0.12.0", | ||
"eslint": "^3.10.2", | ||
"eslint-config-xo-space": "^0.15.0", | ||
"gulp": "^3.9.0", | ||
"gulp-coveralls": "^0.1.0", | ||
"gulp-eslint": "^2.0.0", | ||
"gulp-eslint": "^3.0.1", | ||
"gulp-exclude-gitignore": "^1.0.0", | ||
"gulp-istanbul": "^0.10.3", | ||
"gulp-istanbul": "^1.1.1", | ||
"gulp-line-ending-corrector": "^1.0.1", | ||
"gulp-mocha": "^2.0.0", | ||
"gulp-mocha": "^3.0.1", | ||
"gulp-nsp": "^2.1.0", | ||
"gulp-plumber": "^1.0.0", | ||
"mocha": "^2.2.1", | ||
"mockery": "^1.4.0", | ||
"mocha": "^3.1.2", | ||
"mockery": "^2.0.0", | ||
"sinon": "^1.12.1" | ||
@@ -60,0 +60,0 @@ }, |
@@ -106,3 +106,3 @@ Inquirer.js | ||
`list`, `rawlist`, `expand`, `checkbox`, `password`, `editor` | ||
- **name**: (String) The name to use when storing the answer in the answers hash. | ||
- **name**: (String) The name to use when storing the answer in the answers hash. If the name contains periods, it will define a path in the answers hash. | ||
- **message**: (String|Function) The question to print. If defined as a function, the first parameter will be the current inquirer session answers. | ||
@@ -202,3 +202,3 @@ - **default**: (String|Number|Array|Function) Default value(s) to use if nothing is entered, or a function that returns the default value(s). If defined as a function, the first parameter will be the current inquirer session answers. | ||
Take `type`, `name`, `message`, `choices`[, `default`] properties. (Note that | ||
default must be the choice `index` in the array) | ||
default must be the choice `index` in the array. If `default` key not provided, then `help` will be used as default choice) | ||
@@ -304,3 +304,3 @@ Note that the `choices` object will take an extra parameter called `key` for the `expand` prompt. This parameter must be a single (lowercased) character. The `h` option is added by the prompt and shouldn't be defined by the user. | ||
```js | ||
inquirer.prompt(prompts).process.subscribe( | ||
inquirer.prompt(prompts).ui.process.subscribe( | ||
onEachAnswer, | ||
@@ -307,0 +307,0 @@ onError, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
68360
1
+ Addedansi-regex@3.0.1(transitive)
+ Addedfigures@2.0.0(transitive)
+ Addedis-fullwidth-code-point@2.0.0(transitive)
+ Addedstring-width@2.1.1(transitive)
+ Addedstrip-ansi@4.0.0(transitive)
- Removedcode-point-at@1.1.0(transitive)
- Removedfigures@1.7.0(transitive)
- Removedis-fullwidth-code-point@1.0.0(transitive)
- Removednumber-is-nan@1.0.1(transitive)
- Removedobject-assign@4.1.1(transitive)
- Removedstring-width@1.0.2(transitive)
Updatedfigures@^2.0.0
Updatedstring-width@^2.0.0