Socket
Socket
Sign inDemoInstall

inquirer

Package Overview
Dependencies
Maintainers
1
Versions
176
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 0.11.2 to 0.11.3

2

lib/prompts/expand.js

@@ -137,3 +137,3 @@ /**

var selected = this.opt.choices.where({ key : input.toLowerCase() })[0];
var selected = this.opt.choices.where({ key : input.toLowerCase().trim() })[0];

@@ -140,0 +140,0 @@ if ( selected != null && selected.key === "h" ) {

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

var stripAnsi = require('strip-ansi');
var stringWidth = require('string-width');

@@ -15,6 +16,2 @@ // Prevent crashes on environments where the width can't be properly detected

function width(content) {
return stripAnsi(content).length;
}
function lastLine(content) {

@@ -40,4 +37,2 @@ return _.last(content.split('\n'));

ScreenManager.prototype.render = function (content, bottomContent) {
var cursorPos = this.rl._getCursorPos();
this.rl.output.unmute();

@@ -62,2 +57,5 @@ this.clean(this.extraLinesUnderPrompt);

// setPrompt will change cursor position, now we can get correct value
var cursorPos = this.rl._getCursorPos();
content = forceLineReturn(content);

@@ -89,10 +87,6 @@ if (bottomContent) {

// Reset cursor at the beginning of the line
util.left(this.rl, width(lastLine(fullContent)));
util.left(this.rl, stringWidth(lastLine(fullContent)));
// Adjust cursor on the right
var rightPos = cursorPos.cols;
if (cursorPos.rows === 0) {
rightPos = Math.max(rightPos, width(lastLine(content)));
}
util.right(this.rl, rightPos);
util.right(this.rl, cursorPos.cols);

@@ -99,0 +93,0 @@ /**

{
"name": "inquirer",
"version": "0.11.2",
"version": "0.11.3",
"description": "A collection of common interactive command line user interfaces.",

@@ -34,2 +34,3 @@ "main": "lib/inquirer.js",

"rx-lite": "^3.1.2",
"string-width": "^1.0.1",
"strip-ansi": "^3.0.0",

@@ -36,0 +37,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