Socket
Socket
Sign inDemoInstall

nock

Package Overview
Dependencies
4
Maintainers
4
Versions
422
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 13.5.3 to 13.5.4

21

lib/interceptor.js

@@ -201,6 +201,12 @@ 'use strict'

}
const readStream = fs.createReadStream(filePath)
readStream.pause()
this.filePath = filePath
return this.reply(statusCode, readStream, headers)
return this.reply(
statusCode,
() => {
const readStream = fs.createReadStream(filePath)
readStream.pause()
return readStream
},
headers,
)
}

@@ -457,11 +463,2 @@

if (
(this.scope.shouldPersist() || this.counter > 0) &&
this.interceptionCounter > 1 &&
this.filePath
) {
this.body = fs.createReadStream(this.filePath)
this.body.pause()
}
remove(this)

@@ -468,0 +465,0 @@

@@ -10,3 +10,3 @@ {

],
"version": "13.5.3",
"version": "13.5.4",
"author": "Pedro Teixeira <pedro.teixeira@gmail.com>",

@@ -49,3 +49,3 @@ "repository": {

"nyc": "^15.0.0",
"prettier": "3.1.0",
"prettier": "3.2.4",
"proxyquire": "^2.1.0",

@@ -52,0 +52,0 @@ "rimraf": "^3.0.0",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc