Skip to content

Commit

Permalink
security(gatsby-admin): switch isomorphic-fetch to cross-fetch
Browse files Browse the repository at this point in the history
* Remove unused isomorphic-fetch package

* fix(gatsby-recipes): switch from isomorphic-fetch to cross-fetch

Original commit: 694f9e6

* Upgrade cross-fetch to 3.0.6

Co-authored-by: Adam Schay <adamschay@gmail.com>
  • Loading branch information
karlhorky and hoobdeebla authored Sep 14, 2020
1 parent 0bc63fe commit fd15a92
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion packages/gatsby-admin/src/components/recipes-gui/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { createUrqlClient } from "../../urql-client"
import { useMutation, useSubscription } from "urql"

import lodash from "lodash"
import fetch from "isomorphic-fetch"
import fetch from "cross-fetch"

import { Button, Heading } from "gatsby-interface"
import { StepRenderer } from "gatsby-recipes/components"
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-recipes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"concurrently": "^5.0.0",
"contentful-management": "^5.26.3",
"cors": "^2.8.5",
"cross-fetch": "^3.0.6",
"debug": "^4.1.1",
"detect-port": "^1.3.0",
"dotenv": "^8.2.0",
Expand All @@ -55,7 +56,6 @@
"ink-box": "^1.0.0",
"is-binary-path": "^2.1.0",
"is-url": "^1.2.4",
"isomorphic-fetch": "^2.1.0",
"jest-diff": "^25.5.0",
"lock": "^1.0.0",
"lodash": "^4.17.20",
Expand Down
25 changes: 15 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7666,6 +7666,13 @@ cross-fetch@3.0.5:
dependencies:
node-fetch "2.6.0"

cross-fetch@^3.0.6:
version "3.0.6"
resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.0.6.tgz#3a4040bc8941e653e0e9cf17f29ebcd177d3365c"
integrity sha512-KBPUbqgFjzWlVcURG+Svp9TlhA5uliYtiNx/0r8nv0pdypeQCRJ9IaSIc3q/x3q8t3F75cHuwxVql1HFGHCNJQ==
dependencies:
node-fetch "2.6.1"

cross-spawn@5.1.0, cross-spawn@^5.0.1, cross-spawn@^5.1.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449"
Expand Down Expand Up @@ -13582,14 +13589,6 @@ isobject@^4.0.0:
resolved "https://registry.yarnpkg.com/isobject/-/isobject-4.0.0.tgz#3f1c9155e73b192022a80819bacd0343711697b0"
integrity sha512-S/2fF5wH8SJA/kmwr6HYhK/RI/OkhD84k8ntalo0iJjZikgq1XFvR5M8NPT1x5F7fBwCG3qHfnzeP/Vh/ZxCUA==

isomorphic-fetch@^2.1.0:
version "2.2.1"
resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9"
integrity sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk=
dependencies:
node-fetch "^1.0.1"
whatwg-fetch ">=0.10.0"

isstream@~0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
Expand Down Expand Up @@ -16857,9 +16856,15 @@ node-fetch@2.6.0, node-fetch@^2.3.0, node-fetch@^2.5.0, node-fetch@^2.6.0:
version "2.6.0"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.0.tgz#e633456386d4aa55863f676a7ab0daa8fdecb0fd"

node-fetch@^1.0.1, node-fetch@^1.7.3:
node-fetch@2.6.1:
version "2.6.1"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052"
integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==

node-fetch@^1.7.3:
version "1.7.3"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef"
integrity sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==
dependencies:
encoding "^0.1.11"
is-stream "^1.0.1"
Expand Down Expand Up @@ -25341,7 +25346,7 @@ whatwg-fetch@2.0.4:
version "2.0.4"
resolved "http://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz#dde6a5df315f9d39991aa17621853d720b85566f"

whatwg-fetch@>=0.10.0, whatwg-fetch@^3.4.0:
whatwg-fetch@^3.4.0:
version "3.4.0"
resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.4.0.tgz#e11de14f4878f773fbebcde8871b2c0699af8b30"
integrity sha512-rsum2ulz2iuZH08mJkT0Yi6JnKhwdw4oeyMjokgxd+mmqYSd9cPpOQf01TIWgjxG/U4+QR+AwKq6lSbXVxkyoQ==
Expand Down

0 comments on commit fd15a92

Please sign in to comment.