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
631
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.8-alpha-20250122135352-8725fae5bc92fc13604dae0e2038a3c5bb034384 to 0.7.8-alpha-20250122135701-d1a6e1b2227c25bd4b427747363078b8b9d744ad

22

cjs/fetchUndici.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createFetchUndici = createFetchUndici;
const stream_1 = require("stream");
const types_1 = require("util/types");
const zlib_1 = require("zlib");
const node_stream_1 = require("node:stream");
const types_1 = require("node:util/types");
const node_zlib_1 = require("node:zlib");
const fetchNodeHttp_js_1 = require("./fetchNodeHttp.js");

@@ -28,3 +28,3 @@ const Request_js_1 = require("./Request.js");

(0, types_1.isUint8Array)(bodyInit) ||
bodyInit instanceof stream_1.Readable) {
bodyInit instanceof node_stream_1.Readable) {
body = bodyInit;

@@ -37,3 +37,3 @@ }

else {
body = stream_1.Readable.from(fetchRequest.body);
body = node_stream_1.Readable.from(fetchRequest.body);
}

@@ -46,17 +46,17 @@ }

case 'gzip':
passthrough = (0, zlib_1.createGunzip)();
passthrough = (0, node_zlib_1.createGunzip)();
break;
case 'x-deflate':
case 'deflate':
passthrough = (0, zlib_1.createInflate)();
passthrough = (0, node_zlib_1.createInflate)();
break;
case 'x-deflate-raw':
case 'deflate-raw':
passthrough = (0, zlib_1.createInflateRaw)();
passthrough = (0, node_zlib_1.createInflateRaw)();
break;
case 'br':
passthrough = (0, zlib_1.createBrotliDecompress)();
passthrough = (0, node_zlib_1.createBrotliDecompress)();
break;
default:
passthrough = new stream_1.PassThrough();
passthrough = new node_stream_1.PassThrough();
}

@@ -164,3 +164,3 @@ return passthrough;

});
passthrough ||= new stream_1.PassThrough();
passthrough ||= new node_stream_1.PassThrough();
resolve(new Response_js_1.PonyfillResponse(passthrough, {

@@ -167,0 +167,0 @@ status: statusCode,

@@ -1,4 +0,4 @@

import { PassThrough, Readable } from 'stream';
import { isUint8Array } from 'util/types';
import { createBrotliDecompress, createGunzip, createInflate, createInflateRaw } from 'zlib';
import { PassThrough, Readable } from 'node:stream';
import { isUint8Array } from 'node:util/types';
import { createBrotliDecompress, createGunzip, createInflate, createInflateRaw } from 'node:zlib';
import { fetchNodeHttp } from './fetchNodeHttp.js';

@@ -5,0 +5,0 @@ import { PonyfillRequest } from './Request.js';

{
"name": "@whatwg-node/node-fetch",
"version": "0.7.8-alpha-20250122135352-8725fae5bc92fc13604dae0e2038a3c5bb034384",
"version": "0.7.8-alpha-20250122135701-d1a6e1b2227c25bd4b427747363078b8b9d744ad",
"description": "Fetch API implementation for Node",

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

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