Skip to content

Commit

Permalink
Replace whatwg-fetch with fetch-ponyfill
Browse files Browse the repository at this point in the history
  • Loading branch information
curtisy1 committed Feb 22, 2020
1 parent acaa9e5 commit eddbb76
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
"umd": "dist/index.umd.js",
"module": "dist/index.m.js",
"scripts": {
"release": "changelog && git push --follow-tags && yarn publish --access public --non-interactive",
"release": "changelog && git push --follow-tags && yarpm publish --access public --non-interactive",
"build": "sh ./build.sh",
"bundle": "rollup -c",
"prepublishOnly": "yarn build",
"prepublishOnly": "yarpm run build",
"lint": "tslint -p tsconfig.json",
"test": "jest"
},
"dependencies": {
"whatwg-fetch": "^3.0.0"
"fetch-ponyfill": "^6.1.0"
},
"devDependencies": {
"@babel/core": "^7.8.4",
Expand All @@ -39,7 +39,8 @@
"rollup-plugin-terser": "^5.2.0",
"rollup-plugin-typescript2": "^0.21.0",
"tslint": "^5.16.0",
"typescript": "^3.4.5"
"typescript": "^3.4.5",
"yarpm": "^0.2.1"
},
"publishConfig": {
"access": "public",
Expand All @@ -61,7 +62,7 @@
}
},
"lint-staged": {
"*.ts": "yarn run lint"
"*.ts": "yarpm run lint"
},
"jest": {
"automock": false,
Expand All @@ -70,4 +71,4 @@
"./setupTests.js"
]
}
}
}
3 changes: 2 additions & 1 deletion src/Request.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'whatwg-fetch';
import fetchPonyfill from 'fetch-ponyfill';
const { fetch } = fetchPonyfill();

interface FetchOptions {
method: 'GET' | 'POST' | 'PUT' | 'DELETE';
Expand Down

0 comments on commit eddbb76

Please sign in to comment.