Socket
Socket
Sign inDemoInstall

fetch-mock

Package Overview
Dependencies
Maintainers
3
Versions
226
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fetch-mock - npm Package Compare versions

Comparing version 9.11.0 to 10.0.0-alpha.1

dist/commonjs.js

66

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

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