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

@whatwg-node/fetch

Package Overview
Dependencies
Maintainers
1
Versions
454
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@whatwg-node/fetch - npm Package Compare versions

Comparing version 0.9.14 to 0.9.15-rc-20240102120939-139c9f418911a6c38bdd03cbc0d51d51b13e7b9d

dist/shouldSkipPonyfill.js

6

CHANGELOG.md
# @whatwg-node/fetch
## 0.9.15-rc-20240102120939-139c9f418911a6c38bdd03cbc0d51d51b13e7b9d
### Patch Changes
- [`772552c`](https://github.com/ardatan/whatwg-node/commit/772552c0521b883c30d8f4d64c8ea093e75a95a0) Thanks [@ardatan](https://github.com/ardatan)! - Skip ponyfilling if NextJS
## 0.9.14

@@ -4,0 +10,0 @@

5

dist/create-node-ponyfill.js

@@ -0,1 +1,3 @@

const shouldSkipPonyfill = require('./shouldSkipPonyfill');
module.exports = function createNodePonyfill(opts = {}) {

@@ -10,4 +12,3 @@ const ponyfills = {};

// Bun and Deno already have a Fetch API
if (globalThis.Deno || process.versions.bun) {
if (shouldSkipPonyfill()) {
return globalThis;

@@ -14,0 +15,0 @@ }

10

dist/node-ponyfill.js
const createNodePonyfill = require('./create-node-ponyfill');
const shouldSkipPonyfill = require('./shouldSkipPonyfill');
const ponyfills = createNodePonyfill();
if (!globalThis.Deno && !process.versions.bun) {
try {
if (!shouldSkipPonyfill()) {
try {
const nodelibcurlName = 'node-libcurl'
globalThis.libcurl = globalThis.libcurl || require(nodelibcurlName);
} catch(e) {}
}
} catch (e) { }
}

@@ -13,0 +13,0 @@ module.exports.fetch = ponyfills.fetch;

{
"name": "@whatwg-node/fetch",
"version": "0.9.14",
"version": "0.9.15-rc-20240102120939-139c9f418911a6c38bdd03cbc0d51d51b13e7b9d",
"description": "Cross Platform Smart Fetch Ponyfill",

@@ -5,0 +5,0 @@ "repository": {

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