New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@whatwg-node/node-fetch

Package Overview
Dependencies
Maintainers
1
Versions
640
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@whatwg-node/node-fetch - npm Package Compare versions

Comparing version 0.4.0-alpha-20230515131253-e1eec20 to 0.4.0-alpha-20230515132257-4514d91

15

cjs/fetch.js

@@ -58,2 +58,3 @@ "use strict";

return new Promise((resolve, reject) => {
var _a;
try {

@@ -84,2 +85,12 @@ const url = new URL_js_1.PonyfillURL(fetchRequest.url, 'http://localhost');

});
// TODO: will be removed after v16 reaches EOL
(_a = fetchRequest.signal) === null || _a === void 0 ? void 0 : _a.addEventListener('abort', () => {
if (!nodeRequest.aborted) {
nodeRequest.abort();
}
});
// TODO: will be removed after v16 reaches EOL
nodeRequest.once('abort', (reason) => {
reject(new AbortError_js_1.PonyfillAbortError(reason));
});
nodeRequest.once('response', nodeResponse => {

@@ -128,6 +139,2 @@ let responseBody = nodeResponse;

});
// TODO: will be removed after v16 reaches EOL
nodeRequest.once('abort', (reason) => {
reject(new AbortError_js_1.PonyfillAbortError(reason));
});
nodeRequest.once('error', reject);

@@ -134,0 +141,0 @@ if (nodeReadable) {

@@ -55,2 +55,3 @@ import { createReadStream } from 'fs';

return new Promise((resolve, reject) => {
var _a;
try {

@@ -81,2 +82,12 @@ const url = new PonyfillURL(fetchRequest.url, 'http://localhost');

});
// TODO: will be removed after v16 reaches EOL
(_a = fetchRequest.signal) === null || _a === void 0 ? void 0 : _a.addEventListener('abort', () => {
if (!nodeRequest.aborted) {
nodeRequest.abort();
}
});
// TODO: will be removed after v16 reaches EOL
nodeRequest.once('abort', (reason) => {
reject(new PonyfillAbortError(reason));
});
nodeRequest.once('response', nodeResponse => {

@@ -125,6 +136,2 @@ let responseBody = nodeResponse;

});
// TODO: will be removed after v16 reaches EOL
nodeRequest.once('abort', (reason) => {
reject(new PonyfillAbortError(reason));
});
nodeRequest.once('error', reject);

@@ -131,0 +138,0 @@ if (nodeReadable) {

{
"name": "@whatwg-node/node-fetch",
"version": "0.4.0-alpha-20230515131253-e1eec20",
"version": "0.4.0-alpha-20230515132257-4514d91",
"description": "Fetch API implementation for Node",
"sideEffects": false,
"dependencies": {
"@whatwg-node/events": "0.1.0-alpha-20230515131253-e1eec20",
"@whatwg-node/events": "0.1.0-alpha-20230515132257-4514d91",
"busboy": "^1.6.0",

@@ -9,0 +9,0 @@ "fast-querystring": "^1.1.1",

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