Socket
Socket
Sign inDemoInstall

node-fetch-native

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-fetch-native - npm Package Compare versions

Comparing version 1.0.2 to 1.1.0

dist/node.cjs

26

package.json
{
"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

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