diff --git a/code/lib/core-common/package.json b/code/lib/core-common/package.json index fef194f73978..1a02c576d3a4 100644 --- a/code/lib/core-common/package.json +++ b/code/lib/core-common/package.json @@ -47,6 +47,7 @@ "@storybook/types": "7.1.0-alpha.34", "@types/find-cache-dir": "^3.2.1", "@types/node": "^16.0.0", + "@types/node-fetch": "^2.6.4", "@types/pretty-hrtime": "^1.0.0", "chalk": "^4.1.0", "esbuild": "^0.18.0", @@ -58,6 +59,7 @@ "glob": "^10.0.0", "handlebars": "^4.7.7", "lazy-universal-dotenv": "^4.0.0", + "node-fetch": "^2.0.0", "picomatch": "^2.3.0", "pkg-dir": "^5.0.0", "pretty-hrtime": "^1.0.3", diff --git a/code/lib/core-common/src/utils/get-storybook-refs.ts b/code/lib/core-common/src/utils/get-storybook-refs.ts index eb956201668d..c0f530531b7e 100644 --- a/code/lib/core-common/src/utils/get-storybook-refs.ts +++ b/code/lib/core-common/src/utils/get-storybook-refs.ts @@ -1,6 +1,7 @@ import { readJSON } from 'fs-extra'; import { dirname, join } from 'path'; import findUp from 'find-up'; +import fetch from 'node-fetch'; import resolveFrom from 'resolve-from'; import { logger } from '@storybook/node-logger'; diff --git a/code/yarn.lock b/code/yarn.lock index b01fc728f35e..5dc559c831b1 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -6169,6 +6169,7 @@ __metadata: "@types/find-cache-dir": ^3.2.1 "@types/mock-fs": ^4.13.1 "@types/node": ^16.0.0 + "@types/node-fetch": ^2.6.4 "@types/picomatch": ^2.3.0 "@types/pretty-hrtime": ^1.0.0 chalk: ^4.1.0 @@ -6182,6 +6183,7 @@ __metadata: handlebars: ^4.7.7 lazy-universal-dotenv: ^4.0.0 mock-fs: ^5.2.0 + node-fetch: ^2.0.0 picomatch: ^2.3.0 pkg-dir: ^5.0.0 pretty-hrtime: ^1.0.3 @@ -8626,7 +8628,7 @@ __metadata: languageName: node linkType: hard -"@types/node-fetch@npm:^2.5.7": +"@types/node-fetch@npm:^2.5.7, @types/node-fetch@npm:^2.6.4": version: 2.6.4 resolution: "@types/node-fetch@npm:2.6.4" dependencies: @@ -22778,7 +22780,7 @@ __metadata: languageName: node linkType: hard -"node-fetch@npm:^2.6.1, node-fetch@npm:^2.6.7": +"node-fetch@npm:^2.0.0, node-fetch@npm:^2.6.1, node-fetch@npm:^2.6.7": version: 2.6.11 resolution: "node-fetch@npm:2.6.11" dependencies: