Skip to content

Commit

Permalink
Chore: Use whatwg-fetch instead of isomorphic-fetch (#155)
Browse files Browse the repository at this point in the history
isomorphic-fetch is a wrapper around whatwg-fetch and we don't need its isomorphic nature
  • Loading branch information
tonyjin authored May 30, 2017
1 parent c91e9f9 commit 5a8f4f2
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 8 deletions.
3 changes: 1 addition & 2 deletions build/webpack.karma.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ const config = merge(baseConfig, {
devtool: 'inline-source-map',
resolve: {
alias: {
sinon: 'sinon/pkg/sinon',
'isomorphic-fetch': 'fetch-mock-forwarder'
sinon: 'sinon/pkg/sinon'
}
}
});
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"fetch-mock-forwarder": "^1.0.0",
"file-loader": "^0.10.1",
"i18n-webpack-plugin": "^0.3.0",
"isomorphic-fetch": "^2.2.1",
"karma": "^1.5.0",
"karma-chai": "^0.1.0",
"karma-chai-as-promised": "^0.1.2",
Expand Down Expand Up @@ -92,7 +91,8 @@
"stylelint-config-standard": "^16.0.0",
"stylelint-order": "^0.4.1",
"url-loader": "^0.5.8",
"webpack": "^2.2.1"
"webpack": "^2.2.1",
"whatwg-fetch": "^2.0.3"
},
"scripts": {
"build": "yarn run clean && yarn run build-rb && yarn run lint && yarn run dev",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/__tests__/util-test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable no-unused-expressions */
import 'isomorphic-fetch';
import 'whatwg-fetch';
import fetchMock from 'fetch-mock';
import * as util from '../util';

Expand Down
2 changes: 1 addition & 1 deletion src/lib/annotations/AnnotationService.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'whatwg-fetch';
import EventEmitter from 'events';
import fetch from 'isomorphic-fetch';
import autobind from 'autobind-decorator';
import Annotation from './Annotation';
import { getHeaders } from '../util';
Expand Down
2 changes: 1 addition & 1 deletion src/lib/util.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import fetch from 'isomorphic-fetch';
import 'whatwg-fetch';

const HEADER_CLIENT_NAME = 'X-Box-Client-Name';
const HEADER_CLIENT_VERSION = 'X-Box-Client-Version';
Expand Down
6 changes: 5 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3332,7 +3332,7 @@ isobject@^2.0.0:
dependencies:
isarray "1.0.0"

isomorphic-fetch@^2.1.1, isomorphic-fetch@^2.2.1:
isomorphic-fetch@^2.1.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9"
dependencies:
Expand Down Expand Up @@ -6507,6 +6507,10 @@ whatwg-fetch@>=0.10.0, whatwg-fetch@^0.10.1:
version "0.10.1"
resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-0.10.1.tgz#365125d40b36823feac8ab41b71c4d56e84a531f"

whatwg-fetch@^2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz#9c84ec2dcf68187ff00bc64e1274b442176e1c84"

whet.extend@~0.9.9:
version "0.9.9"
resolved "https://registry.yarnpkg.com/whet.extend/-/whet.extend-0.9.9.tgz#f877d5bf648c97e5aa542fadc16d6a259b9c11a1"
Expand Down

0 comments on commit 5a8f4f2

Please sign in to comment.