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
1
Versions
554
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.4 to 0.7.5-alpha-20241210190244-f8654a00cd5b6a4eda10e114502523848eaec29f

2

cjs/Blob.js

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

if (this._buffer) {
// @ts-expect-error - `Buffer` and `ArrayBuffer` are compatible
return (0, utils_js_1.fakePromise)(this._buffer);

@@ -139,2 +140,3 @@ }

}
// @ts-expect-error - `Buffer` and `ArrayBuffer` are compatible
return this.buffer();

@@ -141,0 +143,0 @@ }

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

arrayBuffer() {
// @ts-expect-error - `Buffer` and `ArrayBuffer` are compatible
return this.buffer();

@@ -274,0 +275,0 @@ }

4

cjs/Headers.js

@@ -5,3 +5,3 @@ "use strict";

exports.isHeadersLike = isHeadersLike;
const util_1 = require("util");
const node_util_1 = require("node:util");
const IteratorObject_js_1 = require("./IteratorObject.js");

@@ -254,5 +254,5 @@ function isHeadersLike(headers) {

});
return `Headers ${(0, util_1.inspect)(record)}`;
return `Headers ${(0, node_util_1.inspect)(record)}`;
}
}
exports.PonyfillHeaders = PonyfillHeaders;

@@ -20,2 +20,5 @@ "use strict";

this.parse(url, false);
if (url.startsWith('http://[') || url.startsWith('https://[')) {
this.hostname = `[${this.hostname}]`;
}
if (base) {

@@ -52,2 +55,5 @@ const baseParsed = typeof base === 'string' ? new PonyfillURL(base) : base;

toString() {
if (this._searchParams) {
this.search = this._searchParams.toString();
}
return this.format();

@@ -54,0 +60,0 @@ }

@@ -117,2 +117,3 @@ /* eslint-disable @typescript-eslint/no-unsafe-declaration-merging */

if (this._buffer) {
// @ts-expect-error - `Buffer` and `ArrayBuffer` are compatible
return fakePromise(this._buffer);

@@ -128,2 +129,3 @@ }

}
// @ts-expect-error - `Buffer` and `ArrayBuffer` are compatible
return this.buffer();

@@ -130,0 +132,0 @@ }

@@ -268,2 +268,3 @@ import { Readable } from 'stream';

arrayBuffer() {
// @ts-expect-error - `Buffer` and `ArrayBuffer` are compatible
return this.buffer();

@@ -270,0 +271,0 @@ }

@@ -1,2 +0,2 @@

import { inspect } from 'util';
import { inspect } from 'node:util';
import { PonyfillIteratorObject } from './IteratorObject.js';

@@ -3,0 +3,0 @@ export function isHeadersLike(headers) {

@@ -16,2 +16,5 @@ import { resolveObjectURL } from 'buffer';

this.parse(url, false);
if (url.startsWith('http://[') || url.startsWith('https://[')) {
this.hostname = `[${this.hostname}]`;
}
if (base) {

@@ -48,2 +51,5 @@ const baseParsed = typeof base === 'string' ? new PonyfillURL(base) : base;

toString() {
if (this._searchParams) {
this.search = this._searchParams.toString();
}
return this.format();

@@ -50,0 +56,0 @@ }

{
"name": "@whatwg-node/node-fetch",
"version": "0.7.4",
"version": "0.7.5-alpha-20241210190244-f8654a00cd5b6a4eda10e114502523848eaec29f",
"description": "Fetch API implementation for Node",

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

@@ -22,2 +22,3 @@ interface BlobOptions {

arrayBuffer(): Promise<ArrayBuffer>;
size?: number;
};

@@ -45,3 +46,3 @@ export declare function hasBytesMethod(obj: any): obj is {

_buffer: Buffer | null;
buffer(): Promise<Buffer>;
buffer(): Promise<Buffer<ArrayBufferLike>>;
arrayBuffer(): Promise<ArrayBuffer>;

@@ -48,0 +49,0 @@ bytes(): Promise<Uint8Array>;

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

_chunks: Uint8Array[] | null;
_collectChunksFromReadable(): Promise<Uint8Array[]>;
_collectChunksFromReadable(): Promise<Uint8Array<ArrayBufferLike>[]>;
_blob: PonyfillBlob | null;

@@ -38,0 +38,0 @@ blob(): Promise<PonyfillBlob>;

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