Comparing version 2.0.0 to 2.1.0
@@ -8,2 +8,3 @@ const readline = require('readline') | ||
output = process.stdout, | ||
completer, | ||
prompt = '', | ||
@@ -39,3 +40,3 @@ silent, | ||
return new Promise((resolve, reject) => { | ||
const rl = readline.createInterface({ input, output, terminal }) | ||
const rl = readline.createInterface({ input, output, terminal, silent: true, completer }) | ||
const timer = timeout && setTimeout(() => onError(new Error('timed out')), timeout) | ||
@@ -71,7 +72,6 @@ | ||
output.unmute() | ||
output.write('\r\n') | ||
} | ||
done() | ||
// truncate the \n at the end. | ||
const res = line.replace(/\r?\n$/, '') || def || '' | ||
const res = line.replace(/\r?\n?$/, '') || def || '' | ||
return resolve(res) | ||
@@ -78,0 +78,0 @@ }) |
{ | ||
"name": "read", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"main": "lib/read.js", | ||
@@ -10,3 +10,3 @@ "dependencies": { | ||
"@npmcli/eslint-config": "^4.0.0", | ||
"@npmcli/template-oss": "4.11.0", | ||
"@npmcli/template-oss": "4.13.0", | ||
"tap": "^16.3.0" | ||
@@ -39,3 +39,4 @@ }, | ||
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", | ||
"version": "4.11.0" | ||
"version": "4.13.0", | ||
"publish": "true" | ||
}, | ||
@@ -42,0 +43,0 @@ "tap": { |
@@ -32,2 +32,3 @@ ## read | ||
* `output` Writable stream to write prompts to. (default: `process.stdout`) | ||
* `completer` Autocomplete callback (see [official api](https://nodejs.org/api/readline.html#readline_readline_createinterface_options) for details | ||
@@ -34,0 +35,0 @@ If silent is true, and the input is a TTY, then read will set raw |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
4880
40