node-fetch-native
Advanced tools
Comparing version 1.0.2 to 1.1.0
{ | ||
"name": "node-fetch-native", | ||
"version": "1.0.2", | ||
"version": "1.1.0", | ||
"description": "A better redistribution of `node-fetch`", | ||
@@ -25,2 +25,6 @@ "repository": "unjs/node-fetch-native", | ||
}, | ||
"./node": { | ||
"require": "./dist/node.cjs", | ||
"import": "./dist/node.mjs" | ||
}, | ||
"./src/index.js": { | ||
@@ -47,14 +51,14 @@ "import": "./dist/index.mjs", | ||
"devDependencies": { | ||
"@vitest/coverage-c8": "^0.28.5", | ||
"@vitest/coverage-c8": "^0.29.8", | ||
"abort-controller": "^3.0.0", | ||
"changelogen": "^0.4.1", | ||
"eslint": "^8.34.0", | ||
"changelogen": "^0.5.2", | ||
"eslint": "^8.37.0", | ||
"eslint-config-unjs": "^0.1.0", | ||
"node-fetch": "^3.3.0", | ||
"prettier": "^2.8.4", | ||
"typescript": "^4.9.5", | ||
"unbuild": "^1.1.1", | ||
"vitest": "^0.28.5" | ||
"node-fetch": "^3.3.1", | ||
"prettier": "^2.8.7", | ||
"typescript": "^5.0.3", | ||
"unbuild": "^1.2.0", | ||
"vitest": "^0.29.8" | ||
}, | ||
"packageManager": "pnpm@7.27.0" | ||
} | ||
"packageManager": "pnpm@8.1.1" | ||
} |
@@ -18,3 +18,3 @@ # node-fetch-native | ||
✅ Prefer to **native globals** when available (See Node.js [experimental fetch](https://nodejs.org/dist/latest-v17.x/docs/api/cli.html#--experimental-fetch)) | ||
✅ Prefer to **native globals** when available (See Node.js [experimental fetch](https://nodejs.org/dist/latest-v17.x/docs/api/cli.html#--experimental-fetch)). | ||
@@ -64,2 +64,11 @@ ✅ Compact build and less install size with **zero dependencies** [![][packagephobia-s-src]][packagephobia-s-href] <sup>vs</sup> [![][packagephobia-s-alt-src]][packagephobia-s-alt-href] | ||
## Force using non-native version | ||
Sometimes you want to explicitly use none native (`node-fetch`) implementation of `fetch` in case of issues with native/polyfill version of `globalThis.fetch` with Node.js or runtime environment. | ||
You have two ways to do this: | ||
- Set `FORCE_NODE_FETCH` environment variable before starting application. | ||
- Import from `node-fetch-native/node` | ||
## Polyfill support | ||
@@ -66,0 +75,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances 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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
633220
20
15484
157
5
12