@js-bits/fetch
Advanced tools
Comparing version 3.0.1 to 3.0.2
import { fetch, AbortController } from './index.js'; | ||
// const { fetch, AbortController } = require('./dist/index.cjs'); | ||
@@ -4,0 +3,0 @@ describe(`fetch`, () => { |
{ | ||
"name": "@js-bits/fetch", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"description": "Cross-environment (nodejs/web) fetch API", | ||
@@ -14,7 +14,5 @@ "keywords": [ | ||
"type": "module", | ||
"main": "./dist/index.cjs", | ||
"module": "./index.js", | ||
"exports": { | ||
".": { | ||
"require": "./dist/index.cjs", | ||
"default": "./index.js" | ||
@@ -37,9 +35,6 @@ } | ||
"scripts": { | ||
"build": "rollup ./index.js --format cjs --file dist/index.cjs --exports named", | ||
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js --verbose", | ||
"test-cjs": "jest --verbose", | ||
"test-coverage": "yarn test --coverage", | ||
"test-watch": "yarn test --watch", | ||
"lint": "eslint '**/*.{js,jsx}'", | ||
"husky:pre-commit": "npx husky add .husky/pre-commit \"yarn build\" && npx husky add .husky/pre-commit \"git add dist/**.*\" && git add .husky/pre-commit", | ||
"husky:pre-push": "npx husky add .husky/pre-push \"yarn lint\" && npx husky add .husky/pre-push \"yarn test\" && git add .husky/pre-push", | ||
@@ -56,4 +51,3 @@ "husky:init": "npx husky install && yarn husky:pre-commit && yarn husky:pre-push" | ||
"husky": "^7.0.1", | ||
"jest": "^27.5.1", | ||
"rollup": "^2.70.1" | ||
"jest": "^27.5.1" | ||
}, | ||
@@ -60,0 +54,0 @@ "jest": { |
@@ -27,8 +27,2 @@ # Cross-environment (nodejs/web) fetch APi | ||
or require for CommonJS: | ||
```javascript | ||
const { fetch, AbortController } = require('@js-bits/fetch'); | ||
``` | ||
## How to use | ||
@@ -45,3 +39,4 @@ | ||
- The package versions are aligned with [node-fetch](https://www.npmjs.com/package/node-fetch) versions. | ||
- [v2](https://www.npmjs.com/package/@js-bits/fetch/v/2.0.0) of this package supports [v2](https://github.com/node-fetch/node-fetch/tree/2.x#readme) of [node-fetch](https://www.npmjs.com/package/node-fetch). | ||
- 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, which means that Internet Explorer is not supported. |
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
4
4784
8
40
41