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
509
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.3.4 to 0.3.5-alpha-20230417094550-b36ed97

3

cjs/fetch.js

@@ -75,3 +75,4 @@ "use strict";

: null);
const nodeHeaders = (0, utils_js_1.getHeadersObj)(fetchRequest.headers);
const headersSerializer = fetchRequest.headersSerializer || utils_js_1.getHeadersObj;
const nodeHeaders = headersSerializer(fetchRequest.headers);
const abortListener = function abortListener(event) {

@@ -78,0 +79,0 @@ nodeRequest.destroy();

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

const Headers_js_1 = require("./Headers.js");
const utils_js_1 = require("./utils.js");
function isRequest(input) {

@@ -46,2 +47,3 @@ return input[Symbol.toStringTag] === 'Request';

this.signal = (requestInit === null || requestInit === void 0 ? void 0 : requestInit.signal) || new AbortController_js_1.PonyfillAbortController().signal;
this.headersSerializer = (requestInit === null || requestInit === void 0 ? void 0 : requestInit.headersSerializer) || utils_js_1.getHeadersObj;
this.url = url || '';

@@ -48,0 +50,0 @@ const contentTypeInHeaders = this.headers.get('content-type');

@@ -72,3 +72,4 @@ import { createReadStream } from 'fs';

: null);
const nodeHeaders = getHeadersObj(fetchRequest.headers);
const headersSerializer = fetchRequest.headersSerializer || getHeadersObj;
const nodeHeaders = headersSerializer(fetchRequest.headers);
const abortListener = function abortListener(event) {

@@ -75,0 +76,0 @@ nodeRequest.destroy();

import { PonyfillAbortController } from './AbortController.js';
import { PonyfillBody } from './Body.js';
import { PonyfillHeaders } from './Headers.js';
import { getHeadersObj } from './utils.js';
function isRequest(input) {

@@ -42,2 +43,3 @@ return input[Symbol.toStringTag] === 'Request';

this.signal = (requestInit === null || requestInit === void 0 ? void 0 : requestInit.signal) || new PonyfillAbortController().signal;
this.headersSerializer = (requestInit === null || requestInit === void 0 ? void 0 : requestInit.headersSerializer) || getHeadersObj;
this.url = url || '';

@@ -44,0 +46,0 @@ const contentTypeInHeaders = this.headers.get('content-type');

{
"name": "@whatwg-node/node-fetch",
"version": "0.3.4",
"version": "0.3.5-alpha-20230417094550-b36ed97",
"description": "Fetch API implementation for Node",

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

@@ -6,5 +6,8 @@ import { BodyPonyfillInit, PonyfillBody, PonyfillBodyOptions } from './Body.js';

headers?: PonyfillHeadersInit;
headersSerializer?: HeadersSerializer;
};
type HeadersSerializer = (headers: Headers) => Record<string, string>;
export declare class PonyfillRequest<TJSON = any> extends PonyfillBody<TJSON> implements Request {
constructor(input: RequestInfo | URL, options?: RequestPonyfillInit);
headersSerializer: HeadersSerializer;
cache: RequestCache;

@@ -26,1 +29,2 @@ credentials: RequestCredentials;

}
export {};

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