Skip to content

Commit

Permalink
deps: read@2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wraithgar committed Apr 17, 2023
1 parent 2472205 commit acb9120
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
6 changes: 3 additions & 3 deletions node_modules/read/lib/read.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module.exports = async function read ({
default: def = '',
input = process.stdin,
output = process.stdout,
completer,
prompt = '',
silent,
timeout,
Expand Down Expand Up @@ -35,7 +36,7 @@ module.exports = async function read ({
output = m

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)

output.unmute()
Expand Down Expand Up @@ -66,11 +67,10 @@ module.exports = async function read ({
rl.on('line', (line) => {
if (silent && terminal) {
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)
})

Expand Down
7 changes: 4 additions & 3 deletions node_modules/read/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "read",
"version": "2.0.0",
"version": "2.1.0",
"main": "lib/read.js",
"dependencies": {
"mute-stream": "~1.0.0"
},
"devDependencies": {
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/template-oss": "4.11.0",
"@npmcli/template-oss": "4.13.0",
"tap": "^16.3.0"
},
"engines": {
Expand Down Expand Up @@ -35,7 +35,8 @@
],
"templateOSS": {
"//@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"
},
"tap": {
"statements": 77,
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
"parse-conflict-json": "^3.0.1",
"proc-log": "^3.0.0",
"qrcode-terminal": "^0.12.0",
"read": "^2.0.0",
"read": "^2.1.0",
"read-package-json": "^6.0.1",
"read-package-json-fast": "^3.0.2",
"semver": "^7.3.8",
Expand Down Expand Up @@ -10346,9 +10346,9 @@
}
},
"node_modules/read": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/read/-/read-2.0.0.tgz",
"integrity": "sha512-88JMmpeeRYzW9gvIpYyXlYadWanW4vB2CYtDDVBfbRpbSogUNjTWEBXxJXMIVFSLjWVdCcdcIjI3+VV3Z2e9mw==",
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/read/-/read-2.1.0.tgz",
"integrity": "sha512-bvxi1QLJHcaywCAEsAk4DG3nVoqiY2Csps3qzWalhj5hFqRn1d/OixkFXtLO1PrgHUcAP0FNaSY/5GYNfENFFQ==",
"inBundle": true,
"dependencies": {
"mute-stream": "~1.0.0"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
"parse-conflict-json": "^3.0.1",
"proc-log": "^3.0.0",
"qrcode-terminal": "^0.12.0",
"read": "^2.0.0",
"read": "^2.1.0",
"read-package-json": "^6.0.1",
"read-package-json-fast": "^3.0.2",
"semver": "^7.3.8",
Expand Down

0 comments on commit acb9120

Please sign in to comment.