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

@mswjs/interceptors

Package Overview
Dependencies
Maintainers
1
Versions
158
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mswjs/interceptors - npm Package Compare versions

Comparing version 0.36.9 to 0.36.10

lib/browser/chunk-4RQHC4IY.mjs

6

lib/browser/interceptors/fetch/index.js
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
var _chunkLMBCDE7Cjs = require('../../chunk-LMBCDE7C.js');
require('../../chunk-UXPG527I.js');
var _chunkCAAXYHKDjs = require('../../chunk-CAAXYHKD.js');
require('../../chunk-CK3NCGUG.js');
require('../../chunk-7TPGF5DM.js');

@@ -10,3 +10,3 @@ require('../../chunk-PFGO5BSM.js');

exports.FetchInterceptor = _chunkLMBCDE7Cjs.FetchInterceptor;
exports.FetchInterceptor = _chunkCAAXYHKDjs.FetchInterceptor;
//# sourceMappingURL=index.js.map
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
var _chunkRKQSZCUDjs = require('../../chunk-RKQSZCUD.js');
var _chunkNNR7JKYYjs = require('../../chunk-NNR7JKYY.js');
require('../../chunk-LK6DILFK.js');
require('../../chunk-UXPG527I.js');
require('../../chunk-CK3NCGUG.js');
require('../../chunk-7TPGF5DM.js');

@@ -11,3 +11,3 @@ require('../../chunk-PFGO5BSM.js');

exports.XMLHttpRequestInterceptor = _chunkRKQSZCUDjs.XMLHttpRequestInterceptor;
exports.XMLHttpRequestInterceptor = _chunkNNR7JKYYjs.XMLHttpRequestInterceptor;
//# sourceMappingURL=index.js.map
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
var _chunkRKQSZCUDjs = require('../chunk-RKQSZCUD.js');
var _chunkNNR7JKYYjs = require('../chunk-NNR7JKYY.js');
require('../chunk-LK6DILFK.js');
var _chunkLMBCDE7Cjs = require('../chunk-LMBCDE7C.js');
require('../chunk-UXPG527I.js');
var _chunkCAAXYHKDjs = require('../chunk-CAAXYHKD.js');
require('../chunk-CK3NCGUG.js');
require('../chunk-7TPGF5DM.js');

@@ -15,4 +15,4 @@ require('../chunk-PFGO5BSM.js');

var browser_default = [
new (0, _chunkLMBCDE7Cjs.FetchInterceptor)(),
new (0, _chunkRKQSZCUDjs.XMLHttpRequestInterceptor)()
new (0, _chunkCAAXYHKDjs.FetchInterceptor)(),
new (0, _chunkNNR7JKYYjs.XMLHttpRequestInterceptor)()
];

@@ -19,0 +19,0 @@

"use strict";Object.defineProperty(exports, "__esModule", {value: true});
var _chunkFPLETXGAjs = require('../../chunk-FPLETXGA.js');
require('../../chunk-VCUEA4PL.js');
var _chunkT6USXRLLjs = require('../../chunk-T6USXRLL.js');
require('../../chunk-W46RNDIE.js');
require('../../chunk-AABH3XLQ.js');
exports.ClientRequestInterceptor = _chunkFPLETXGAjs.ClientRequestInterceptor;
exports.ClientRequestInterceptor = _chunkT6USXRLLjs.ClientRequestInterceptor;
//# sourceMappingURL=index.js.map
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
var _chunk4YT2XSVOjs = require('../../chunk-4YT2XSVO.js');
var _chunk6F2CSTH4js = require('../../chunk-6F2CSTH4.js');
require('../../chunk-PFGO5BSM.js');
require('../../chunk-73NOP3T5.js');
require('../../chunk-VCUEA4PL.js');
require('../../chunk-W46RNDIE.js');
require('../../chunk-AABH3XLQ.js');
exports.FetchInterceptor = _chunk4YT2XSVOjs.FetchInterceptor;
exports.FetchInterceptor = _chunk6F2CSTH4js.FetchInterceptor;
//# sourceMappingURL=index.js.map
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
var _chunkX2CFRRWYjs = require('../../chunk-X2CFRRWY.js');
var _chunk7F5S3MDKjs = require('../../chunk-7F5S3MDK.js');
require('../../chunk-LK6DILFK.js');
require('../../chunk-PFGO5BSM.js');
require('../../chunk-73NOP3T5.js');
require('../../chunk-VCUEA4PL.js');
require('../../chunk-W46RNDIE.js');
require('../../chunk-AABH3XLQ.js');
exports.XMLHttpRequestInterceptor = _chunkX2CFRRWYjs.XMLHttpRequestInterceptor;
exports.XMLHttpRequestInterceptor = _chunk7F5S3MDKjs.XMLHttpRequestInterceptor;
//# sourceMappingURL=index.js.map
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
var _chunkFPLETXGAjs = require('../chunk-FPLETXGA.js');
var _chunkT6USXRLLjs = require('../chunk-T6USXRLL.js');
var _chunkX2CFRRWYjs = require('../chunk-X2CFRRWY.js');
var _chunk7F5S3MDKjs = require('../chunk-7F5S3MDK.js');
require('../chunk-LK6DILFK.js');
var _chunk4YT2XSVOjs = require('../chunk-4YT2XSVO.js');
var _chunk6F2CSTH4js = require('../chunk-6F2CSTH4.js');
require('../chunk-PFGO5BSM.js');
require('../chunk-73NOP3T5.js');
require('../chunk-VCUEA4PL.js');
require('../chunk-W46RNDIE.js');
require('../chunk-AABH3XLQ.js');

@@ -18,5 +18,5 @@

var node_default = [
new (0, _chunkFPLETXGAjs.ClientRequestInterceptor)(),
new (0, _chunkX2CFRRWYjs.XMLHttpRequestInterceptor)(),
new (0, _chunk4YT2XSVOjs.FetchInterceptor)()
new (0, _chunkT6USXRLLjs.ClientRequestInterceptor)(),
new (0, _chunk7F5S3MDKjs.XMLHttpRequestInterceptor)(),
new (0, _chunk6F2CSTH4js.FetchInterceptor)()
];

@@ -23,0 +23,0 @@

@@ -6,6 +6,6 @@ "use strict";Object.defineProperty(exports, "__esModule", {value: true});

var _chunkFPLETXGAjs = require('./chunk-FPLETXGA.js');
var _chunkT6USXRLLjs = require('./chunk-T6USXRLL.js');
var _chunkX2CFRRWYjs = require('./chunk-X2CFRRWY.js');
var _chunk7F5S3MDKjs = require('./chunk-7F5S3MDK.js');
require('./chunk-LK6DILFK.js');

@@ -17,3 +17,3 @@ require('./chunk-PFGO5BSM.js');

var _chunkVCUEA4PLjs = require('./chunk-VCUEA4PL.js');
var _chunkW46RNDIEjs = require('./chunk-W46RNDIE.js');

@@ -29,4 +29,4 @@

interceptors: [
new (0, _chunkFPLETXGAjs.ClientRequestInterceptor)(),
new (0, _chunkX2CFRRWYjs.XMLHttpRequestInterceptor)()
new (0, _chunkT6USXRLLjs.ClientRequestInterceptor)(),
new (0, _chunk7F5S3MDKjs.XMLHttpRequestInterceptor)()
]

@@ -126,4 +126,4 @@ });

});
const controller = new (0, _chunkVCUEA4PLjs.RequestController)(request);
await _chunkVCUEA4PLjs.handleRequest.call(void 0, {
const controller = new (0, _chunkW46RNDIEjs.RequestController)(request);
await _chunkW46RNDIEjs.handleRequest.call(void 0, {
request,

@@ -130,0 +130,0 @@ requestId: requestJson.id,

{
"name": "@mswjs/interceptors",
"description": "Low-level HTTP/HTTPS/XHR/fetch request interception library.",
"version": "0.36.9",
"version": "0.36.10",
"main": "./lib/node/index.js",

@@ -126,2 +126,3 @@ "module": "./lib/node/index.mjs",

"@types/node-fetch": "2.5.12",
"@types/superagent": "^8.1.9",
"@types/supertest": "^2.0.11",

@@ -149,3 +150,3 @@ "@types/ws": "^8.5.10",

"socket.io-parser": "^4.2.4",
"superagent": "^6.1.0",
"superagent": "^10.1.1",
"supertest": "^6.1.6",

@@ -152,0 +153,0 @@ "ts-jest": "^27.1.1",

@@ -425,5 +425,9 @@ import net from 'node:net'

private flushWriteBuffer(): void {
let args: NormalizedSocketWriteArgs | undefined
while ((args = this.writeBuffer.shift())) {
args?.[2]?.()
for (const [, , callback] of this.writeBuffer) {
/**
* @note If the write callbacks are ever called twice,
* we need to mark them with a symbol so they aren't called
* again in the `passthrough` method.
*/
callback?.()
}

@@ -430,0 +434,0 @@ }

@@ -101,9 +101,13 @@ import type { Emitter } from 'strict-event-emitter'

if (options.request.signal) {
options.request.signal.addEventListener(
'abort',
() => {
requestAbortPromise.reject(options.request.signal.reason)
},
{ once: true }
)
if (options.request.signal.aborted) {
requestAbortPromise.reject(options.request.signal.reason)
} else {
options.request.signal.addEventListener(
'abort',
() => {
requestAbortPromise.reject(options.request.signal.reason)
},
{ once: true }
)
}
}

@@ -110,0 +114,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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