fetch-mock
Advanced tools
Comparing version 9.11.0 to 10.0.0-alpha.1
{ | ||
"name": "fetch-mock", | ||
"version": "9.11.0", | ||
"version": "10.0.0-alpha.1", | ||
"description": "Mock http requests made using fetch (or isomorphic-fetch)", | ||
@@ -9,2 +9,3 @@ "main": "./cjs/server.js", | ||
"types": "./types/index.d.ts", | ||
"type": "module", | ||
"scripts": { | ||
@@ -20,3 +21,3 @@ "test": "make lint test", | ||
"type": "git", | ||
"url": "https://github.com/wheresrhys/fetch-mock.git" | ||
"url": "git+https://github.com/wheresrhys/fetch-mock.git" | ||
}, | ||
@@ -39,5 +40,2 @@ "keywords": [ | ||
"dependencies": { | ||
"@babel/runtime": "^7.0.0", | ||
"@babel/core": "^7.0.0", | ||
"core-js": "^3.0.0", | ||
"debug": "^4.1.1", | ||
@@ -48,8 +46,4 @@ "glob-to-regexp": "^0.4.0", | ||
"path-to-regexp": "^2.2.1", | ||
"querystring": "^0.2.0", | ||
"whatwg-url": "^6.5.0" | ||
"querystring": "^0.2.1" | ||
}, | ||
"peerDependencies": { | ||
"node-fetch": "*" | ||
}, | ||
"peerDependenciesMeta": { | ||
@@ -64,39 +58,23 @@ "node-fetch": { | ||
"devDependencies": { | ||
"@babel/cli": "^7.0.0", | ||
"@babel/plugin-transform-async-to-generator": "^7.12.1", | ||
"@babel/plugin-transform-runtime": "^7.0.0", | ||
"@babel/preset-env": "^7.0.0", | ||
"abort-controller": "^3.0.0", | ||
"babel-loader": "^8.0.0", | ||
"bluebird": "^3.4.6", | ||
"chai": "^4.1.2", | ||
"chai-as-promised": "^7.1.1", | ||
"coveralls": "^3.0.0", | ||
"@rollup/plugin-commonjs": "^25.0.7", | ||
"@rollup/plugin-node-resolve": "^15.2.3", | ||
"@vitest/browser": "^1.1.0", | ||
"@vitest/coverage-istanbul": "^1.1.0", | ||
"dtslint": "^1.0.2", | ||
"eslint": "^4.14.0", | ||
"eslint-config-origami-component": "1.0.0", | ||
"eslint-config-prettier": "^2.9.0", | ||
"eslint-plugin-prettier": "^2.6.1", | ||
"karma": "^3.1.4", | ||
"karma-chai": "^0.1.0", | ||
"karma-chrome-launcher": "^2.2.0", | ||
"karma-mocha": "^1.3.0", | ||
"karma-mocha-reporter": "^2.2.5", | ||
"karma-webpack": "^3.0.0", | ||
"mocha": "^7.1.2", | ||
"node-fetch": "^2.6.0", | ||
"nyc": "^11.7.3", | ||
"prettier": "^2.0.4", | ||
"rollup": "^1.25.2", | ||
"rollup-plugin-commonjs": "^10.1.0", | ||
"rollup-plugin-json": "^4.0.0", | ||
"rollup-plugin-node-builtins": "^2.1.2", | ||
"rollup-plugin-node-globals": "^1.4.0", | ||
"rollup-plugin-node-resolve": "^5.2.0", | ||
"rollup-plugin-sourcemaps": "^0.6.2", | ||
"sinon": "^4.5.0", | ||
"sinon-chai": "^2.14.0", | ||
"eslint": "^8.56.0", | ||
"eslint-config-airbnb-base": "^15.0.0", | ||
"eslint-config-origami-component": "^2.2.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-plugin-import": "^2.29.1", | ||
"eslint-plugin-prettier": "^5.1.2", | ||
"jsdom": "^23.0.1", | ||
"prettier": "^3.1.1", | ||
"rollup": "^4.9.1", | ||
"typescript": "^3.6.4", | ||
"webpack": "^4.41.2" | ||
"vitest": "^1.1.0", | ||
"webdriverio": "^8.27.0" | ||
}, | ||
"volta": { | ||
"node": "18.19.0" | ||
} | ||
} |
@@ -200,3 +200,2 @@ import fetchMock = require('..'); | ||
fetchMock.config.warnOnFallback = true; | ||
fetchMock.config.Promise = Promise; | ||
fetchMock.config.fetch = (): Promise<Response> => new Promise(() => { }); | ||
@@ -203,0 +202,0 @@ fetchMock.config.Headers = Headers; |
@@ -643,12 +643,2 @@ // Project: https://github.com/wheresrhys/fetch-mock, http://www.wheresrhys.co.uk/fetch-mock | ||
/** | ||
* Reference to the Promise constructor of a custom Promise | ||
* implementation. | ||
*/ | ||
Promise?: new (executor: ( | ||
// Should be (value?: T | PromiseLike<T>) => void | ||
// But not sure if that's compatible with older typescript | ||
resolve: (value?: any) => void, | ||
reject: (value?: any) => void, | ||
) => void) => Promise<any>; | ||
@@ -655,0 +645,0 @@ /** |
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
6
17
2
Yes
179902
11
5410
1
- Removed@babel/core@^7.0.0
- Removed@babel/runtime@^7.0.0
- Removedcore-js@^3.0.0
- Removedwhatwg-url@^6.5.0
- Removed@ampproject/remapping@2.3.0(transitive)
- Removed@babel/code-frame@7.24.7(transitive)
- Removed@babel/compat-data@7.25.4(transitive)
- Removed@babel/core@7.25.2(transitive)
- Removed@babel/generator@7.25.6(transitive)
- Removed@babel/helper-compilation-targets@7.25.2(transitive)
- Removed@babel/helper-module-imports@7.24.7(transitive)
- Removed@babel/helper-module-transforms@7.25.2(transitive)
- Removed@babel/helper-simple-access@7.24.7(transitive)
- Removed@babel/helper-string-parser@7.24.8(transitive)
- Removed@babel/helper-validator-identifier@7.24.7(transitive)
- Removed@babel/helper-validator-option@7.24.8(transitive)
- Removed@babel/helpers@7.25.6(transitive)
- Removed@babel/highlight@7.24.7(transitive)
- Removed@babel/parser@7.25.6(transitive)
- Removed@babel/runtime@7.25.6(transitive)
- Removed@babel/template@7.25.0(transitive)
- Removed@babel/traverse@7.25.6(transitive)
- Removed@babel/types@7.25.6(transitive)
- Removed@jridgewell/gen-mapping@0.3.5(transitive)
- Removed@jridgewell/resolve-uri@3.1.2(transitive)
- Removed@jridgewell/set-array@1.2.1(transitive)
- Removed@jridgewell/sourcemap-codec@1.5.0(transitive)
- Removed@jridgewell/trace-mapping@0.3.25(transitive)
- Removedansi-styles@3.2.1(transitive)
- Removedbrowserslist@4.24.0(transitive)
- Removedcaniuse-lite@1.0.30001664(transitive)
- Removedchalk@2.4.2(transitive)
- Removedcolor-convert@1.9.3(transitive)
- Removedcolor-name@1.1.3(transitive)
- Removedconvert-source-map@2.0.0(transitive)
- Removedcore-js@3.38.1(transitive)
- Removeddata-uri-to-buffer@4.0.1(transitive)
- Removedelectron-to-chromium@1.5.29(transitive)
- Removedescalade@3.2.0(transitive)
- Removedescape-string-regexp@1.0.5(transitive)
- Removedfetch-blob@3.2.0(transitive)
- Removedformdata-polyfill@4.0.10(transitive)
- Removedgensync@1.0.0-beta.2(transitive)
- Removedglobals@11.12.0(transitive)
- Removedhas-flag@3.0.0(transitive)
- Removedjs-tokens@4.0.0(transitive)
- Removedjsesc@2.5.2(transitive)
- Removedjson5@2.2.3(transitive)
- Removedlodash.sortby@4.7.0(transitive)
- Removedlru-cache@5.1.1(transitive)
- Removednode-domexception@1.0.0(transitive)
- Removednode-fetch@3.3.2(transitive)
- Removednode-releases@2.0.18(transitive)
- Removedpicocolors@1.1.0(transitive)
- Removedpunycode@2.3.1(transitive)
- Removedregenerator-runtime@0.14.1(transitive)
- Removedsemver@6.3.1(transitive)
- Removedsupports-color@5.5.0(transitive)
- Removedto-fast-properties@2.0.0(transitive)
- Removedtr46@1.0.1(transitive)
- Removedupdate-browserslist-db@1.1.1(transitive)
- Removedweb-streams-polyfill@3.3.3(transitive)
- Removedwebidl-conversions@4.0.2(transitive)
- Removedwhatwg-url@6.5.0(transitive)
- Removedyallist@3.1.1(transitive)
Updatedquerystring@^0.2.1