Skip to content

Commit

Permalink
Vendor whatwg-fetch using rollup+devDep
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanto committed Mar 19, 2020
1 parent 6497376 commit c82140d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
5 changes: 0 additions & 5 deletions iife-wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@ var Pretender = (function(self) {
? getModuleDefault(require('fake-xml-http-request'))
: self.FakeXMLHttpRequest;

// fetch related ponyfills
var FakeFetch = appearsBrowserified
? getModuleDefault(require('whatwg-fetch'))
: self.WHATWGFetch;

/*==ROLLUP_CONTENT==*/

if (typeof module === 'object') {
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
"devDependencies": {
"@rollup/plugin-commonjs": "^11.0.2",
"@rollup/plugin-node-resolve": "^7.1.1",
"rollup-plugin-typescript": "^1.0.0",
"abortcontroller-polyfill": "^1.1.9",
"coveralls": "^3.0.9",
"dedent": "^0.7.0",
"es6-promise": "^4.0.5",
"eslint": "^5.12.0",
"jshint": "^2.8.0",
Expand All @@ -45,16 +45,17 @@
"release-it": "^12.4.3",
"release-it-lerna-changelog": "^1.0.3",
"rollup": "^1.1.2",
"rollup-plugin-typescript": "^1.0.0",
"sinon": "^9.0.0",
"tslib": "^1.9.3",
"typescript": "~3.1.1",
"typescript-eslint-parser": "^21.0.2",
"url-parse": "^1.4.7"
"url-parse": "^1.4.7",
"whatwg-fetch": "^3.0.0"
},
"dependencies": {
"fake-xml-http-request": "^2.1.1",
"route-recognizer": "^0.3.3",
"whatwg-fetch": "^3.0.0"
"route-recognizer": "^0.3.3"
},
"files": [
"dist",
Expand All @@ -65,8 +66,7 @@
"pretender": {
"deps": [
"route-recognizer",
"fake-xml-http-request",
"whatwg-fetch"
"fake-xml-http-request"
],
"exports": "Pretender"
}
Expand Down
1 change: 0 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const typescript = require('rollup-plugin-typescript');
const pkg = require('./package.json');
const fs = require('fs');
const globals = {
'whatwg-fetch': 'FakeFetch',
'fake-xml-http-request': 'FakeXMLHttpRequest',
'route-recognizer': 'RouteRecognizer',
'url-parse': 'urlParse'
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1351,6 +1351,11 @@ decompress-response@^3.3.0:
dependencies:
mimic-response "^1.0.0"

dedent@^0.7.0:
version "0.7.0"
resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c"
integrity sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=

deep-extend@^0.6.0:
version "0.6.0"
resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac"
Expand Down

0 comments on commit c82140d

Please sign in to comment.