@whatwg-node/node-fetch
Advanced tools
Comparing version 0.5.18-alpha-20240726152827-c87fd0a93730000f4a985ec06650f158718e0c70 to 0.5.18-alpha-20240726153005-ce5d304c2d2f79f6b44b7fc5a6ac4ec231b76090
@@ -23,21 +23,22 @@ "use strict"; | ||
} | ||
if (typeof jest === 'object' && | ||
typeof beforeEach === 'function' && | ||
typeof afterEach === 'function' && | ||
originalReadableFromWeb.name !== 'ReadableFromWebPatchedByWhatWgNode') { | ||
// To relax jest, we should remove the patch after each test | ||
beforeEach(() => { | ||
if (stream_1.Readable.fromWeb.name !== 'ReadableFromWebPatchedByWhatWgNode') { | ||
stream_1.Readable.fromWeb = ReadableFromWebPatchedByWhatWgNode; | ||
} | ||
}); | ||
afterEach(() => { | ||
if (stream_1.Readable.fromWeb.name === 'ReadableFromWebPatchedByWhatWgNode') { | ||
stream_1.Readable.fromWeb = originalReadableFromWeb; | ||
} | ||
}); | ||
if (originalReadableFromWeb.name !== 'ReadableFromWebPatchedByWhatWgNode') { | ||
if (typeof jest === 'object' && | ||
typeof beforeEach === 'function' && | ||
typeof afterEach === 'function') { | ||
// To relax jest, we should remove the patch after each test | ||
beforeEach(() => { | ||
if (stream_1.Readable.fromWeb.name !== 'ReadableFromWebPatchedByWhatWgNode') { | ||
stream_1.Readable.fromWeb = ReadableFromWebPatchedByWhatWgNode; | ||
} | ||
}); | ||
afterEach(() => { | ||
if (stream_1.Readable.fromWeb.name === 'ReadableFromWebPatchedByWhatWgNode') { | ||
stream_1.Readable.fromWeb = originalReadableFromWeb; | ||
} | ||
}); | ||
} | ||
else { | ||
stream_1.Readable.fromWeb = ReadableFromWebPatchedByWhatWgNode; | ||
} | ||
} | ||
else if (originalReadableFromWeb.name !== 'ReadableFromWebPatchedByWhatWgNode') { | ||
stream_1.Readable.fromWeb = ReadableFromWebPatchedByWhatWgNode; | ||
} | ||
} | ||
@@ -44,0 +45,0 @@ catch (e) { |
@@ -15,21 +15,22 @@ import { Readable } from 'stream'; | ||
} | ||
if (typeof jest === 'object' && | ||
typeof beforeEach === 'function' && | ||
typeof afterEach === 'function' && | ||
originalReadableFromWeb.name !== 'ReadableFromWebPatchedByWhatWgNode') { | ||
// To relax jest, we should remove the patch after each test | ||
beforeEach(() => { | ||
if (Readable.fromWeb.name !== 'ReadableFromWebPatchedByWhatWgNode') { | ||
Readable.fromWeb = ReadableFromWebPatchedByWhatWgNode; | ||
} | ||
}); | ||
afterEach(() => { | ||
if (Readable.fromWeb.name === 'ReadableFromWebPatchedByWhatWgNode') { | ||
Readable.fromWeb = originalReadableFromWeb; | ||
} | ||
}); | ||
if (originalReadableFromWeb.name !== 'ReadableFromWebPatchedByWhatWgNode') { | ||
if (typeof jest === 'object' && | ||
typeof beforeEach === 'function' && | ||
typeof afterEach === 'function') { | ||
// To relax jest, we should remove the patch after each test | ||
beforeEach(() => { | ||
if (Readable.fromWeb.name !== 'ReadableFromWebPatchedByWhatWgNode') { | ||
Readable.fromWeb = ReadableFromWebPatchedByWhatWgNode; | ||
} | ||
}); | ||
afterEach(() => { | ||
if (Readable.fromWeb.name === 'ReadableFromWebPatchedByWhatWgNode') { | ||
Readable.fromWeb = originalReadableFromWeb; | ||
} | ||
}); | ||
} | ||
else { | ||
Readable.fromWeb = ReadableFromWebPatchedByWhatWgNode; | ||
} | ||
} | ||
else if (originalReadableFromWeb.name !== 'ReadableFromWebPatchedByWhatWgNode') { | ||
Readable.fromWeb = ReadableFromWebPatchedByWhatWgNode; | ||
} | ||
} | ||
@@ -36,0 +37,0 @@ catch (e) { |
{ | ||
"name": "@whatwg-node/node-fetch", | ||
"version": "0.5.18-alpha-20240726152827-c87fd0a93730000f4a985ec06650f158718e0c70", | ||
"version": "0.5.18-alpha-20240726153005-ce5d304c2d2f79f6b44b7fc5a6ac4ec231b76090", | ||
"description": "Fetch API implementation for Node", | ||
@@ -5,0 +5,0 @@ "sideEffects": false, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
201367
5135