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

@whatwg-node/node-fetch

Package Overview
Dependencies
Maintainers
0
Versions
576
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.7.6-alpha-20241227034944-ae3ab11b792acef83302670c6b44a630daf4f2f1 to 0.7.6-alpha-20241227115757-23fb6bdf701277c1ef33a7bffb0ea3502aca43da

17

cjs/ReadableStream.js

@@ -156,3 +156,18 @@ "use strict";

[Symbol.asyncIterator]() {
return this.readable[Symbol.asyncIterator]();
const iterator = this.readable[Symbol.asyncIterator]();
return {
next: () => iterator.next(),
return: () => {
if (!this.readable.destroyed) {
this.readable.destroy();
}
return iterator.return?.() || (0, utils_js_1.fakePromise)({ done: true, value: undefined });
},
throw: (err) => {
if (!this.readable.destroyed) {
this.readable.destroy(err);
}
return iterator.throw?.(err) || (0, utils_js_1.fakePromise)({ done: true, value: undefined });
},
};
}

@@ -159,0 +174,0 @@ tee() {

@@ -153,3 +153,18 @@ import { Readable } from 'stream';

[Symbol.asyncIterator]() {
return this.readable[Symbol.asyncIterator]();
const iterator = this.readable[Symbol.asyncIterator]();
return {
next: () => iterator.next(),
return: () => {
if (!this.readable.destroyed) {
this.readable.destroy();
}
return iterator.return?.() || fakePromise({ done: true, value: undefined });
},
throw: (err) => {
if (!this.readable.destroyed) {
this.readable.destroy(err);
}
return iterator.throw?.(err) || fakePromise({ done: true, value: undefined });
},
};
}

@@ -156,0 +171,0 @@ tee() {

2

package.json
{
"name": "@whatwg-node/node-fetch",
"version": "0.7.6-alpha-20241227034944-ae3ab11b792acef83302670c6b44a630daf4f2f1",
"version": "0.7.6-alpha-20241227115757-23fb6bdf701277c1ef33a7bffb0ea3502aca43da",
"description": "Fetch API implementation for Node",

@@ -5,0 +5,0 @@ "sideEffects": false,

@@ -11,3 +11,7 @@ import { Readable } from 'stream';

getReader(): ReadableStreamDefaultReader<T>;
[Symbol.asyncIterator](): NodeJS.AsyncIterator<any, any, any>;
[Symbol.asyncIterator](): {
next: () => Promise<IteratorResult<any, any>>;
return: () => Promise<IteratorResult<any, any>>;
throw: (err: Error) => Promise<IteratorResult<any, any>>;
};
tee(): [ReadableStream<T>, ReadableStream<T>];

@@ -14,0 +18,0 @@ private pipeToWriter;

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