Skip to content

Commit 4a90134

Browse files
author
Martin Krulis
committed
Switching from isomporphic-fetch to cross-fetch polyfill.
1 parent de94162 commit 4a90134

File tree

5 files changed

+12
-19
lines changed

5 files changed

+12
-19
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
"classnames": "^2.2.5",
4646
"codemirror": "^5.58.2",
4747
"cookie-parser": "^1.4.1",
48+
"cross-fetch": "^3.1.4",
4849
"css-loader": "^5.2.6",
4950
"deep-equal": "^2.0.1",
5051
"ejs": "^2.6.1",
@@ -58,7 +59,6 @@
5859
"global": "^4.3.1",
5960
"highlight.js": "^10.4.1",
6061
"immutable": "^3.8.2",
61-
"isomorphic-fetch": "^3.0.0",
6262
"jwt-decode": "^2.2.0",
6363
"markdown-it": "^8.4.1",
6464
"moment": "^2.24.0",
@@ -132,7 +132,6 @@
132132
"file-loader": "^6.2.0",
133133
"git-revision-webpack-plugin": "^5.0.0",
134134
"image-webpack-loader": "^7.0.1",
135-
"isomorphic-fetch": "^3.0.0",
136135
"isomorphic-style-loader": "^5.1.0",
137136
"jsdom": "^16.6.0",
138137
"json-loader": "^0.5.4",

src/client.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import 'isomorphic-fetch';
1+
import 'cross-fetch/polyfill';
22

33
import React from 'react';
44
import { render } from 'react-dom';

src/server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// necessary polyfill for both browser and server
2-
import 'isomorphic-fetch';
2+
import 'cross-fetch/polyfill';
33

44
// server setup
55
import React from 'react';

test/setup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { JSDOM } from 'jsdom';
22
import 'mock-local-storage';
3-
import 'isomorphic-fetch';
3+
import 'cross-fetch/polyfill';
44

55
global.document = new JSDOM('<!doctype html><html><body></body></html>');
66
global.window = global.document.window;

yarn.lock

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3862,6 +3862,13 @@ cosmiconfig@^7.0.0:
38623862
path-type "^4.0.0"
38633863
yaml "^1.10.0"
38643864

3865+
cross-fetch@^3.1.4:
3866+
version "3.1.4"
3867+
resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.4.tgz#9723f3a3a247bf8b89039f3a380a9244e8fa2f39"
3868+
integrity sha512-1eAtFWdIubi6T4XPy6ei9iUFoKpUkIF971QLN8lIvvvwueI65+Nw5haMNKUwfJxabqlIIDODJKGrQ66gxC0PbQ==
3869+
dependencies:
3870+
node-fetch "2.6.1"
3871+
38653872
cross-spawn@^5.0.1:
38663873
version "5.1.0"
38673874
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449"
@@ -7263,14 +7270,6 @@ isobject@^3.0.0, isobject@^3.0.1:
72637270
resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df"
72647271
integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8=
72657272

7266-
isomorphic-fetch@^3.0.0:
7267-
version "3.0.0"
7268-
resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-3.0.0.tgz#0267b005049046d2421207215d45d6a262b8b8b4"
7269-
integrity sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA==
7270-
dependencies:
7271-
node-fetch "^2.6.1"
7272-
whatwg-fetch "^3.4.1"
7273-
72747273
isomorphic-style-loader@^5.1.0:
72757274
version "5.1.0"
72767275
resolved "https://registry.yarnpkg.com/isomorphic-style-loader/-/isomorphic-style-loader-5.1.0.tgz#4845f90bb9828f3dfecc82d0574c9ed01bbaba2d"
@@ -8423,7 +8422,7 @@ node-environment-flags@^1.0.5:
84238422
object.getownpropertydescriptors "^2.0.3"
84248423
semver "^5.7.0"
84258424

8426-
node-fetch@^2.6.1:
8425+
84278426
version "2.6.1"
84288427
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052"
84298428
integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==
@@ -12045,11 +12044,6 @@ whatwg-encoding@^1.0.5:
1204512044
dependencies:
1204612045
iconv-lite "0.4.24"
1204712046

12048-
whatwg-fetch@^3.4.1:
12049-
version "3.6.2"
12050-
resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.6.2.tgz#dced24f37f2624ed0281725d51d0e2e3fe677f8c"
12051-
integrity sha512-bJlen0FcuU/0EMLrdbJ7zOnW6ITZLrZMIarMUVmdKtsGvZna8vxKYaexICWPfZ8qwf9fzNq+UEIZrnSaApt6RA==
12052-
1205312047
whatwg-mimetype@^2.3.0:
1205412048
version "2.3.0"
1205512049
resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf"

0 commit comments

Comments
 (0)