Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

inquirer

Package Overview
Dependencies
Maintainers
3
Versions
183
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inquirer - npm Package Compare versions

Comparing version 6.2.0 to 6.2.1

README.md

4

lib/prompts/checkbox.js

@@ -32,3 +32,2 @@ 'use strict';

this.pointer = 0;
this.firstRender = true;

@@ -91,3 +90,3 @@ // Make sure no default is set (so it won't be printed)

if (this.firstRender) {
if (!this.spaceKeyPressed) {
message +=

@@ -171,2 +170,3 @@ '(Press ' +

onSpaceKey() {
this.spaceKeyPressed = true;
this.toggleChoice(this.pointer);

@@ -173,0 +173,0 @@ this.render();

@@ -40,7 +40,5 @@ 'use strict';

if (this.opt.mask) {
events.keypress
.pipe(takeUntil(validation.success))
.forEach(this.onKeypress.bind(this));
}
events.keypress
.pipe(takeUntil(validation.success))
.forEach(this.onKeypress.bind(this));

@@ -47,0 +45,0 @@ // Init

@@ -70,2 +70,6 @@ 'use strict';

.forEach(this.onKeypress.bind(this));
events.normalizedUpKey.pipe(takeUntil(events.line)).forEach(this.onUpKey.bind(this));
events.normalizedDownKey
.pipe(takeUntil(events.line))
.forEach(this.onDownKey.bind(this));

@@ -150,2 +154,30 @@ // Init the prompt

}
/**
* When user press up key
*/
onUpKey() {
this.onArrowKey('up');
}
/**
* When user press down key
*/
onDownKey() {
this.onArrowKey('down');
}
/**
* When user press up or down key
* @param {String} type Arrow type: up or down
*/
onArrowKey(type) {
var index = this.rl.line.length ? Number(this.rl.line) - 1 : 0;
index += type === 'up' ? -1 : 1;
this.rl.line = String(index + 1);
this.onKeypress();
}
}

@@ -152,0 +184,0 @@

{
"name": "inquirer",
"version": "6.2.0",
"version": "6.2.1",
"description": "A collection of common interactive command line user interfaces.",
"author": "Simon Boudrias <admin@simonboudrias.com>",
"files": [
"lib"
"lib",
"README.md"
],

@@ -23,9 +24,8 @@ "main": "lib/inquirer.js",

"chai": "^4.0.1",
"chalk-pipe": "^1.2.0",
"chalk-pipe": "^2.0.0",
"cmdify": "^0.0.4",
"mocha": "^5.0.0",
"mockery": "^2.1.0",
"nsp": "^3.0.0",
"nyc": "^12.0.1",
"sinon": "^5.0.0"
"nyc": "^13.1.0",
"sinon": "^7.1.1"
},

@@ -35,3 +35,4 @@ "scripts": {

"posttest": "nyc report --reporter=text-lcov > ../../coverage/nyc-report.lcov",
"prepublish": "nsp check"
"prepublishOnly": "cp ../../README.md .",
"postpublish": "rm -f README.md"
},

@@ -52,5 +53,5 @@ "repository": "SBoudrias/Inquirer.js",

"string-width": "^2.1.0",
"strip-ansi": "^4.0.0",
"strip-ansi": "^5.0.0",
"through": "^2.3.6"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc