@js-bits/fetch
Advanced tools
Comparing version 3.1.3 to 3.1.4
{ | ||
"name": "@js-bits/fetch", | ||
"version": "3.1.3", | ||
"version": "3.1.4", | ||
"description": "Cross-environment (nodejs/web) fetch API", | ||
@@ -15,2 +15,3 @@ "keywords": [ | ||
"type": "module", | ||
"main": "./dist/index.cjs", | ||
"module": "./index.js", | ||
@@ -20,2 +21,3 @@ "types": "./dist/index.d.ts", | ||
".": { | ||
"require": "./dist/index.cjs", | ||
"default": "./index.js" | ||
@@ -25,4 +27,3 @@ } | ||
"browser": { | ||
"node-fetch": false, | ||
"abort-controller": false | ||
"node-fetch": false | ||
}, | ||
@@ -40,3 +41,3 @@ "repository": { | ||
"test": "node --experimental-vm-modules --no-experimental-fetch node_modules/jest/bin/jest.js --verbose", | ||
"build": "rimraf ./dist && yarn build:dts", | ||
"build": "rimraf ./dist && rollup --config && yarn build:dts", | ||
"build:dts": "tsc ./index.js --allowJs --emitDeclarationOnly --declaration --outDir dist && yarn prepare:dts", | ||
@@ -56,2 +57,3 @@ "prepare:dts": "node ./node_modules/@js-bits/typedef-utils/scripts/prepare-dts.js ./dist/index.d.ts", | ||
"@js-bits/typedef-utils": "^1.0.7", | ||
"@rollup/plugin-replace": "^5.0.2", | ||
"@types/jest": "29.4.3", | ||
@@ -62,2 +64,3 @@ "husky": "^8.0.3", | ||
"rimraf": "^5.0.1", | ||
"rollup": "^3.24.0", | ||
"typescript": "^4.8.4" | ||
@@ -64,0 +67,0 @@ }, |
@@ -25,2 +25,8 @@ # Cross-environment (nodejs/web) fetch APi | ||
or require for CommonJS: | ||
```javascript | ||
const fetch = require('@js-bits/fetch'); | ||
``` | ||
## How to use | ||
@@ -37,4 +43,3 @@ | ||
- The package versions are aligned with [node-fetch](https://www.npmjs.com/package/node-fetch) versions. | ||
- CommonJS module export removed since version 3 | ||
- [version 2](https://www.npmjs.com/package/@js-bits/fetch/v/2.0.0) of this package supports [version 2](https://github.com/node-fetch/node-fetch/tree/2.x#readme) of [node-fetch](https://www.npmjs.com/package/node-fetch). | ||
- Minimal size (bytes) in a browser since [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) is natively supported. Does not include any polyfills. |
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
6235
13
78
44
10
6