Comparing version 3.1.1 to 3.2.0
@@ -37,9 +37,6 @@ /** | ||
// Default being a Number | ||
// If def is a Number, then use as index. Otherwise, check for value. | ||
if (_.isNumber(def) && def >= 0 && def < this.opt.choices.realLength) { | ||
this.selected = def; | ||
} | ||
// Default being a String | ||
if (_.isString(def)) { | ||
} else if (!_.isNumber(def) && def != null) { | ||
this.selected = this.opt.choices.pluck('value').indexOf(def); | ||
@@ -46,0 +43,0 @@ } |
@@ -21,4 +21,8 @@ 'use strict'; | ||
// Make sure new prompt start on a newline when closing | ||
this.rl.on('SIGINT', this.onForceClose); | ||
process.on('exit', this.onForceClose); | ||
// Terminate process on SIGINT (which will call process.on('exit') in return) | ||
this.rl.on('SIGINT', function () { | ||
process.exit(0); | ||
}); | ||
}; | ||
@@ -25,0 +29,0 @@ |
@@ -7,3 +7,3 @@ 'use strict'; | ||
/** | ||
* The paginator keep trakcs of a pointer index in a list and return | ||
* The paginator keeps track of a pointer index in a list and returns | ||
* a subset of the choices if the list is too long. | ||
@@ -10,0 +10,0 @@ */ |
{ | ||
"name": "inquirer", | ||
"version": "3.1.1", | ||
"version": "3.2.0", | ||
"description": "A collection of common interactive command line user interfaces.", | ||
@@ -26,3 +26,3 @@ "author": "Simon Boudrias <admin@simonboudrias.com>", | ||
"ansi-escapes": "^2.0.0", | ||
"chalk": "^1.0.0", | ||
"chalk": "^2.0.0", | ||
"cli-cursor": "^2.1.0", | ||
@@ -37,4 +37,4 @@ "cli-width": "^2.0.0", | ||
"rx-lite-aggregates": "^4.0.8", | ||
"string-width": "^2.0.0", | ||
"strip-ansi": "^3.0.0", | ||
"string-width": "^2.1.0", | ||
"strip-ansi": "^4.0.0", | ||
"through": "^2.3.6" | ||
@@ -45,3 +45,3 @@ }, | ||
"cmdify": "^0.0.4", | ||
"eslint": "^4.0.0", | ||
"eslint": "^4.2.0", | ||
"eslint-config-xo-space": "^0.16.0", | ||
@@ -59,5 +59,5 @@ "gulp": "^3.9.0", | ||
"mocha": "^3.4.2", | ||
"mockery": "^2.0.0", | ||
"sinon": "^2.3.4" | ||
"mockery": "^2.1.0", | ||
"sinon": "^2.3.6" | ||
} | ||
} |
@@ -25,2 +25,3 @@ Inquirer.js | ||
6. [License](#license) | ||
7. [Plugins](#plugins) | ||
@@ -356,1 +357,17 @@ | ||
Licensed under the MIT license. | ||
## Plugins | ||
<a name="plugins"></a> | ||
### Prompts ### | ||
[__autocomplete__](https://github.com/mokkabonna/inquirer-autocomplete-prompt)<br> | ||
Presents a list of options as the user types, compatible with other packages such as fuzzy (for search)<br> | ||
<br> | ||
![autocomplete prompt](https://github.com/mokkabonna/inquirer-autocomplete-prompt/raw/master/inquirer.gif) | ||
[__datetime__](https://github.com/DerekTBrown/inquirer-datepicker-prompt)<br> | ||
Customizable date/time selector using both number pad and arrow keys<br> | ||
<br> | ||
![Datetime Prompt](https://github.com/DerekTBrown/inquirer-datepicker-prompt/raw/master/example/datetime-prompt.png) | ||
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
69621
1847
372
+ Addedansi-styles@3.2.1(transitive)
+ Addedchalk@2.4.2(transitive)
+ Addedcolor-convert@1.9.3(transitive)
+ Addedcolor-name@1.1.3(transitive)
+ Addedhas-flag@3.0.0(transitive)
+ Addedsupports-color@5.5.0(transitive)
- Removedansi-regex@2.1.1(transitive)
- Removedansi-styles@2.2.1(transitive)
- Removedchalk@1.1.3(transitive)
- Removedhas-ansi@2.0.0(transitive)
- Removedstrip-ansi@3.0.1(transitive)
- Removedsupports-color@2.0.0(transitive)
Updatedchalk@^2.0.0
Updatedstring-width@^2.1.0
Updatedstrip-ansi@^4.0.0