Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cross-fetch

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cross-fetch - npm Package Compare versions

Comparing version 2.2.2 to 2.2.3

2

dist/browser-ponyfill.js

@@ -480,2 +480,4 @@ var __root__ = (function (root) {

module.exports = fetch;
// Needed for TypeScript consumers without esModuleInterop.
module.exports.default = fetch;
}

15

dist/node-polyfill.js

@@ -1,12 +0,11 @@

var fetchNode = require('./node-ponyfill');
var fetch = fetchNode.fetch.bind({});
var fetchNode = require('./node-ponyfill')
var fetch = fetchNode.fetch.bind({})
fetch.polyfill = true;
fetch.polyfill = true
if (!global.fetch) {
global.fetch = fetch;
global.Response = fetchNode.Response;
global.Headers = fetchNode.Headers;
global.Request = fetchNode.Request;
global.fetch = fetch
global.Response = fetchNode.Response
global.Headers = fetchNode.Headers
global.Request = fetchNode.Request
}

@@ -1,3 +0,3 @@

var nodeFetch = require('node-fetch');
var realFetch = nodeFetch.default || nodeFetch;
var nodeFetch = require('node-fetch')
var realFetch = nodeFetch.default || nodeFetch

@@ -8,16 +8,16 @@ var fetch = function (url, options) {

if (/^\/\//.test(url)) {
url = 'https:' + url;
url = 'https:' + url
}
return realFetch.call(this, url, options);
};
return realFetch.call(this, url, options)
}
fetch.polyfill = false;
fetch.polyfill = false
module.exports = exports = fetch;
exports.fetch = fetch;
exports.Headers = nodeFetch.Headers;
exports.Request = nodeFetch.Request;
exports.Response = nodeFetch.Response;
module.exports = exports = fetch
exports.fetch = fetch
exports.Headers = nodeFetch.Headers
exports.Request = nodeFetch.Request
exports.Response = nodeFetch.Response
// Needed for TypeScript.
exports.default = fetch;
// Needed for TypeScript consumers without esModuleInterop.
exports.default = fetch
{
"name": "cross-fetch",
"version": "2.2.2",
"version": "2.2.3",
"description": "Universal WHATWG Fetch API for Node, Browsers and React Native",

@@ -10,4 +10,3 @@ "homepage": "https://github.com/lquixada/cross-fetch",

"scripts": {
"pretest:node:bundle": "webpack-cli --config test/webpack-node/webpack.config.js",
"precommit": "npm run -s build && lint-staged",
"pretest:node:bundle": "webpack-cli --progress --config test/node-bundle/webpack.config.js",
"build": "rollup -c",

@@ -18,17 +17,40 @@ "codecov": "nyc report --reporter=text-lcov > coverage.lcov && codecov",

"deploy:patch": "npm version patch && git push --follow-tags",
"lint": "eslint .",
"lint": "standard",
"sauce": "./tasks/sauce",
"security": "snyk test",
"test": "npm run -s test:headless && npm run -s test:node && npm run -s test:node:bundle && npm run -s lint",
"test:browser": "opn test/browser/index.html",
"test:headless": "mocha-headless-chrome -f test/browser/index.html -a no-sandbox -a disable-setuid-sandbox",
"test:node:bundle": "nyc mocha test/webpack-node/bundle.js",
"test:node": "nyc mocha test/node/index.js"
"test": "npm run -s test:browser:headless && npm run -s test:node:plain && npm run -s test:node:bundle && npm run -s lint",
"test:browser:headless": "mocha-headless-chrome -f test/browser-headless/index.html -a no-sandbox -a disable-setuid-sandbox",
"test:browser:plain": "opn test/browser/index.html",
"test:node:bundle": "nyc mocha test/node-bundle/index.js",
"test:node:plain": "nyc mocha test/node-plain/index.js"
},
"lint-staged": {
"*.js": [
"eslint --fix",
"standard --fix",
"git add"
]
},
"husky": {
"hooks": {
"pre-commit": "npm run -s build && lint-staged"
}
},
"standard": {
"env": [
"mocha",
"browser"
],
"globals": [
"expect",
"chai",
"sinon"
],
"ignore": [
"/dist/",
"test/node-bundle/index.js"
]
},
"nyc": {
"temp-dir": ".reports/.coverage"
},
"repository": {

@@ -48,20 +70,20 @@ "type": "git",

"devDependencies": {
"chai": "4.1.2",
"codecov": "3.0.2",
"eslint": "4.19.1",
"husky": "0.14.3",
"lint-staged": "7.2.0",
"chai": "4.2.0",
"codecov": "3.1.0",
"husky": "1.1.2",
"lint-staged": "7.3.0",
"mocha": "5.2.0",
"mocha-headless-chrome": "2.0.0",
"nock": "9.3.3",
"nyc": "12.0.2",
"mocha-headless-chrome": "2.0.1",
"nock": "10.0.1",
"nyc": "13.1.0",
"opn-cli": "3.1.0",
"ora": "2.1.0",
"rollup": "0.60.7",
"ora": "3.0.0",
"rollup": "0.66.6",
"rollup-plugin-copy": "0.2.3",
"rollup-plugin-uglify": "4.0.0",
"sinon": "6.0.0",
"snyk": "1.83.0",
"webpack": "4.12.0",
"webpack-cli": "3.0.7"
"rollup-plugin-uglify": "6.0.0",
"sinon": "7.0.0",
"snyk": "1.105.0",
"standard": "12.0.1",
"webpack": "4.23.0",
"webpack-cli": "3.1.2"
},

@@ -68,0 +90,0 @@ "files": [

@@ -16,3 +16,3 @@ cross-fetch<br>

- **WHATWG compliant**: it works the same way wherever your code runs
- **Updated**: lastest version of whatwg-fetch and node-fetch used
- **Updated**: latest version of whatwg-fetch and node-fetch used

@@ -32,3 +32,2 @@

- [Author](#author)
- [Sponsors](#sponsors)

@@ -138,3 +137,3 @@ * * *

I did a lot of research in order to find a fetch library that could be simple, cross-platorm and provide polyfill as an option. There's a plethora of libs out there but none could match those requirements.
I did a lot of research in order to find a fetch library that could be simple, cross-platform and provide polyfill as an option. There's a plethora of libs out there but none could match those requirements.

@@ -144,3 +143,3 @@

My preferred library used to be [isomorphic-fetch](https://github.com/matthew-andrews/isomorphic-fetch) but it has this [bug](https://github.com/matthew-andrews/isomorphic-fetch/issues/125) that prevents it from running in a react native environment. It seems it will never be fixed since the author hasn't been commiting for more than a year. That means dependencies are outdated as well.
My preferred library used to be [isomorphic-fetch](https://github.com/matthew-andrews/isomorphic-fetch) but it has this [bug](https://github.com/matthew-andrews/isomorphic-fetch/issues/125) that prevents it from running in a react native environment. It seems it will never be fixed since the author hasn't been committing for more than a year. That means dependencies are outdated as well.

@@ -188,8 +187,1 @@

|[@lquixada](http://www.github.com/lquixada)|
## Sponsors
Manual cross-browser testing is provided by the following sponsor:
[![BrowserStack](./assets/browserstack-logo.png)](https://www.browserstack.com/)
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