Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGar <gar+gh@danger.computer>2021-09-15 23:04:16 +0300
committerGar <gar+gh@danger.computer>2021-09-16 00:34:24 +0300
commit371655a6b0e6664fec67f16cb247cc9f174a5197 (patch)
treecf5f73fa7d8579cfbcb83701630a0831d6e891f7 /node_modules
parent2def17a3b625b92b40c6185ff4b47e8ed006492c (diff)
deps: minipass@3.1.5
* fix: re-emit 'error' event if missed and new listener added * fix: do not blow up if process is missing
Diffstat (limited to 'node_modules')
-rw-r--r--node_modules/minipass/index.js14
-rw-r--r--node_modules/minipass/package.json4
2 files changed, 14 insertions, 4 deletions
diff --git a/node_modules/minipass/index.js b/node_modules/minipass/index.js
index 56cbd665d..ae134a066 100644
--- a/node_modules/minipass/index.js
+++ b/node_modules/minipass/index.js
@@ -1,4 +1,8 @@
'use strict'
+const proc = typeof process === 'object' && process ? process : {
+ stdout: null,
+ stderr: null,
+}
const EE = require('events')
const Stream = require('stream')
const Yallist = require('yallist')
@@ -8,6 +12,7 @@ const EOF = Symbol('EOF')
const MAYBE_EMIT_END = Symbol('maybeEmitEnd')
const EMITTED_END = Symbol('emittedEnd')
const EMITTING_END = Symbol('emittingEnd')
+const EMITTED_ERROR = Symbol('emittedError')
const CLOSED = Symbol('closed')
const READ = Symbol('read')
const FLUSH = Symbol('flush')
@@ -66,6 +71,7 @@ module.exports = class Minipass extends Stream {
this[EMITTED_END] = false
this[EMITTING_END] = false
this[CLOSED] = false
+ this[EMITTED_ERROR] = null
this.writable = true
this.readable = true
this[BUFFERLENGTH] = 0
@@ -310,7 +316,7 @@ module.exports = class Minipass extends Stream {
const ended = this[EMITTED_END]
opts = opts || {}
- if (dest === process.stdout || dest === process.stderr)
+ if (dest === proc.stdout || dest === proc.stderr)
opts.end = false
else
opts.end = opts.end !== false
@@ -339,6 +345,8 @@ module.exports = class Minipass extends Stream {
else if (isEndish(ev) && this[EMITTED_END]) {
super.emit(ev)
this.removeAllListeners(ev)
+ } else if (ev === 'error' && this[EMITTED_ERROR]) {
+ fn.call(this, this[EMITTED_ERROR])
}
}
}
@@ -400,6 +408,8 @@ module.exports = class Minipass extends Stream {
// don't emit close before 'end' and 'finish'
if (!this[EMITTED_END] && !this[DESTROYED])
return
+ } else if (ev === 'error') {
+ this[EMITTED_ERROR] = data
}
// TODO: replace with a spread operator when Node v4 support drops
@@ -452,8 +462,8 @@ module.exports = class Minipass extends Stream {
promise () {
return new Promise((resolve, reject) => {
this.on(DESTROYED, () => reject(new Error('stream destroyed')))
- this.on('end', () => resolve())
this.on('error', er => reject(er))
+ this.on('end', () => resolve())
})
}
diff --git a/node_modules/minipass/package.json b/node_modules/minipass/package.json
index 54f62d56d..165fa662a 100644
--- a/node_modules/minipass/package.json
+++ b/node_modules/minipass/package.json
@@ -1,6 +1,6 @@
{
"name": "minipass",
- "version": "3.1.3",
+ "version": "3.1.5",
"description": "minimal implementation of a PassThrough stream",
"main": "index.js",
"dependencies": {
@@ -8,7 +8,7 @@
},
"devDependencies": {
"end-of-stream": "^1.4.0",
- "tap": "^14.6.5",
+ "tap": "^15.0.9",
"through2": "^2.0.3"
},
"scripts": {