Skip to content

Commit 8922d44

Browse files
committed
Add node-fetch
1 parent eda31ba commit 8922d44

File tree

3 files changed

+33
-5
lines changed

3 files changed

+33
-5
lines changed

packages/mdx/package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,19 @@
2222
"react": "^17.0.2"
2323
},
2424
"dependencies": {
25-
"@codesandbox/sandpack-client": "^0.1.20",
2625
"@code-hike/highlighter": "^0.3.0-next.0",
27-
"@code-hike/smooth-code": "^0.3.0-next.0",
28-
"@code-hike/mini-editor": "^0.3.0-next.0",
2926
"@code-hike/mini-browser": "^0.3.0-next.0",
27+
"@code-hike/mini-editor": "^0.3.0-next.0",
3028
"@code-hike/scroller": "^0.3.0-next.0",
29+
"@code-hike/smooth-code": "^0.3.0-next.0",
3130
"@code-hike/utils": "^0.3.0-next.0",
31+
"@codesandbox/sandpack-client": "^0.1.20",
3232
"estree-util-value-to-estree": "^1.3.0",
33-
"unist-util-visit": "^2.0.0",
3433
"hast-util-to-estree": "^1.4.0",
34+
"node-fetch": "^2.0.0",
3535
"remark-rehype": "^8.1.0",
36-
"unified": "^9.2.2"
36+
"unified": "^9.2.2",
37+
"unist-util-visit": "^2.0.0"
3738
},
3839
"peerDependencies": {
3940
"react": "^16.8.3 || ^17 || ^18"

packages/mdx/src/plugin/preview.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import fetch from "node-fetch"
2+
13
export async function getPresetConfig(
24
attributes?: {
35
name: string

yarn.lock

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13657,6 +13657,13 @@ [email protected], node-fetch@^2.6.0, node-fetch@^2.6.1:
1365713657
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052"
1365813658
integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==
1365913659

13660+
node-fetch@^2.0.0:
13661+
version "2.6.6"
13662+
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.6.tgz#1751a7c01834e8e1697758732e9efb6eeadfaf89"
13663+
integrity sha512-Z8/6vRlTUChSdIgMa51jxQ4lrw/Jy5SOW10ObaA47/RElsAN2c5Pn8bTgFGWn/ibwzXTE8qwr1Yzx28vsecXEA==
13664+
dependencies:
13665+
whatwg-url "^5.0.0"
13666+
1366013667
node-gyp@^3.8.0:
1366113668
version "3.8.0"
1366213669
resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-3.8.0.tgz#540304261c330e80d0d5edce253a68cb3964218c"
@@ -18097,6 +18104,11 @@ tr46@^2.0.2:
1809718104
dependencies:
1809818105
punycode "^2.1.1"
1809918106

18107+
tr46@~0.0.3:
18108+
version "0.0.3"
18109+
resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a"
18110+
integrity sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=
18111+
1810018112
tree-kill@^1.2.2:
1810118113
version "1.2.2"
1810218114
resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.2.tgz#4ca09a9092c88b73a7cdc5e8a01b507b0790a0cc"
@@ -18990,6 +19002,11 @@ web-namespaces@^1.0.0:
1899019002
resolved "https://registry.yarnpkg.com/web-namespaces/-/web-namespaces-1.1.4.tgz#bc98a3de60dadd7faefc403d1076d529f5e030ec"
1899119003
integrity sha512-wYxSGajtmoP4WxfejAPIr4l0fVh+jeMXZb08wNc0tMg6xsfZXj3cECqIK0G7ZAqUq0PP8WlMDtaOGVBTAWztNw==
1899219004

19005+
webidl-conversions@^3.0.0:
19006+
version "3.0.1"
19007+
resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871"
19008+
integrity sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=
19009+
1899319010
webidl-conversions@^4.0.2:
1899419011
version "4.0.2"
1899519012
resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad"
@@ -19095,6 +19112,14 @@ whatwg-mimetype@^2.3.0:
1909519112
resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf"
1909619113
integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==
1909719114

19115+
whatwg-url@^5.0.0:
19116+
version "5.0.0"
19117+
resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d"
19118+
integrity sha1-lmRU6HZUYuN2RNNib2dCzotwll0=
19119+
dependencies:
19120+
tr46 "~0.0.3"
19121+
webidl-conversions "^3.0.0"
19122+
1909819123
whatwg-url@^7.0.0:
1909919124
version "7.1.0"
1910019125
resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.1.0.tgz#c2c492f1eca612988efd3d2266be1b9fc6170d06"

0 commit comments

Comments
 (0)