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

minipass-fetch

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

minipass-fetch - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

14

lib/body.js

@@ -170,14 +170,18 @@ 'use strict'

if (Minipass.isStream(body) && typeof body.getBoundary !== 'function') {
// create a dedicated tee stream so that we don't lose data
// potentially sitting in the body stream's buffer by writing it
// immediately to p1 and not having it for p2.
const tee = new Minipass()
const p1 = new Minipass()
const p2 = new Minipass()
body.pause()
body.on('error', er => {
tee.on('error', er => {
p1.emit('error', er)
p2.emit('error', er)
})
body.pipe(p1)
body.pipe(p2)
body.on('error', er => tee.emit('error', er))
tee.pipe(p1)
tee.pipe(p2)
body.pipe(tee)
// set instance body to one fork, return the other
instance[INTERNALS].body = p1
body.resume()
return p2

@@ -184,0 +188,0 @@ } else

{
"name": "minipass-fetch",
"version": "1.0.0",
"version": "1.0.1",
"description": "An implementation of window.fetch in Node.js using Minipass streams",

@@ -29,3 +29,3 @@ "license": "MIT",

"dependencies": {
"minipass": "^2.8.4",
"minipass": "^2.8.6",
"minipass-pipeline": "^1.2.0",

@@ -32,0 +32,0 @@ "minipass-sized": "^1.0.2",

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