@whatwg-node/fetch
Advanced tools
Comparing version 0.9.14 to 0.9.15-rc-20240102120939-139c9f418911a6c38bdd03cbc0d51d51b13e7b9d
# @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 @@ |
@@ -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 @@ } |
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": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
37099
9
224