@storybook/cli 11.0.0-alpha.3 → 11.0.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_node-chunks/{block-create-react-app-NIM5OOA3.js → block-create-react-app-MUJEAJWZ.js} +8 -8
- package/dist/_node-chunks/{block-dependencies-versions-JPEPIUKB.js → block-dependencies-versions-NO7SGHPX.js} +22 -11
- package/dist/_node-chunks/{block-experimental-addon-test-WOWVN4IX.js → block-experimental-addon-test-P5AIPERY.js} +9 -9
- package/dist/_node-chunks/{block-major-version-K75BAQWK.js → block-major-version-WWI2WIS2.js} +9 -9
- package/dist/_node-chunks/{block-node-version-E4VDUXTX.js → block-node-version-43NYZKC4.js} +8 -8
- package/dist/_node-chunks/{block-react-legacy-root-api-XK44TU4N.js → block-react-legacy-root-api-4JKQEIN5.js} +8 -8
- package/dist/_node-chunks/{block-webpack5-frameworks-CQYV65P6.js → block-webpack5-frameworks-ELINHXW5.js} +11 -11
- package/dist/_node-chunks/{chunk-NJQOZHY3.js → chunk-2MUKNWW5.js} +30 -30
- package/dist/_node-chunks/chunk-4GUNVUYY.js +11 -0
- package/dist/_node-chunks/{chunk-FFWBHZJ6.js → chunk-7BUFIZL4.js} +7 -7
- package/dist/_node-chunks/{chunk-HOYDQ5IU.js → chunk-AGADK3RL.js} +7 -7
- package/dist/_node-chunks/{chunk-6WU77S4B.js → chunk-SJEUIQ46.js} +6 -6
- package/dist/_node-chunks/{globby-DYUJOAEX.js → globby-6YVPAXG5.js} +8 -8
- package/dist/_node-chunks/{p-limit-N6WTORTF.js → p-limit-GSIPL3UA.js} +7 -7
- package/dist/_node-chunks/{run-WECKVOPU.js → run-ZECBPVC4.js} +329 -313
- package/dist/bin/index.js +7 -7
- package/package.json +4 -4
- package/dist/_node-chunks/chunk-UALBUS5N.js +0 -11
package/dist/_node-chunks/{block-create-react-app-NIM5OOA3.js → block-create-react-app-MUJEAJWZ.js}
RENAMED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_p28xbsg3xzj from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_p28xbsg3xzj from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_p28xbsg3xzj from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_p28xbsg3xzj.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_p28xbsg3xzj.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_p28xbsg3xzj.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-4GUNVUYY.js";
|
|
13
|
+
import "./chunk-SJEUIQ46.js";
|
|
14
14
|
|
|
15
15
|
// src/autoblock/block-create-react-app.ts
|
|
16
16
|
import { dedent } from "ts-dedent";
|
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_p28xbsg3xzj from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_p28xbsg3xzj from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_p28xbsg3xzj from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_p28xbsg3xzj.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_p28xbsg3xzj.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_p28xbsg3xzj.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
findOutdatedPackage
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-2MUKNWW5.js";
|
|
15
|
+
import "./chunk-AGADK3RL.js";
|
|
16
|
+
import "./chunk-7BUFIZL4.js";
|
|
17
|
+
import "./chunk-4GUNVUYY.js";
|
|
18
|
+
import "./chunk-SJEUIQ46.js";
|
|
19
19
|
|
|
20
20
|
// src/autoblock/block-dependencies-versions.ts
|
|
21
21
|
import { dedent } from "ts-dedent";
|
|
22
22
|
var minimalVersionsMap = {
|
|
23
23
|
"@angular/core": "21.0.0",
|
|
24
|
+
"@sveltejs/kit": "3.0.0",
|
|
24
25
|
next: "15.0.0",
|
|
25
26
|
preact: "10.8.0",
|
|
26
27
|
react: "18.0.0",
|
|
@@ -71,6 +72,16 @@ var minimalVersionsMap = {
|
|
|
71
72
|
`,
|
|
72
73
|
link: "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#nextjs-require-v15-and-up"
|
|
73
74
|
};
|
|
75
|
+
case "@sveltejs/kit":
|
|
76
|
+
return {
|
|
77
|
+
title: "Require SvelteKit v3 and up",
|
|
78
|
+
message: dedent`
|
|
79
|
+
Support for SvelteKit < 3 has been removed.
|
|
80
|
+
Run \`npx sv migrate sveltekit-3\` to upgrade SvelteKit first, then upgrade Storybook.
|
|
81
|
+
Please see the migration guide for more information:
|
|
82
|
+
`,
|
|
83
|
+
link: "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#sveltekit-require-v3-and-up"
|
|
84
|
+
};
|
|
74
85
|
case "vitest":
|
|
75
86
|
return {
|
|
76
87
|
title: "Vitest 4 required by @storybook/addon-vitest",
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_p28xbsg3xzj from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_p28xbsg3xzj from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_p28xbsg3xzj from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_p28xbsg3xzj.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_p28xbsg3xzj.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_p28xbsg3xzj.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
require_semver
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-7BUFIZL4.js";
|
|
15
|
+
import "./chunk-4GUNVUYY.js";
|
|
16
16
|
import {
|
|
17
17
|
__toESM
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-SJEUIQ46.js";
|
|
19
19
|
|
|
20
20
|
// src/autoblock/block-experimental-addon-test.ts
|
|
21
21
|
var import_semver = __toESM(require_semver(), 1);
|
package/dist/_node-chunks/{block-major-version-K75BAQWK.js → block-major-version-WWI2WIS2.js}
RENAMED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_p28xbsg3xzj from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_p28xbsg3xzj from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_p28xbsg3xzj from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_p28xbsg3xzj.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_p28xbsg3xzj.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_p28xbsg3xzj.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
require_semver
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-7BUFIZL4.js";
|
|
15
|
+
import "./chunk-4GUNVUYY.js";
|
|
16
16
|
import {
|
|
17
17
|
__toESM
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-SJEUIQ46.js";
|
|
19
19
|
|
|
20
20
|
// src/autoblock/block-major-version.ts
|
|
21
21
|
var import_semver = __toESM(require_semver(), 1);
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_p28xbsg3xzj from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_p28xbsg3xzj from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_p28xbsg3xzj from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_p28xbsg3xzj.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_p28xbsg3xzj.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_p28xbsg3xzj.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-4GUNVUYY.js";
|
|
13
|
+
import "./chunk-SJEUIQ46.js";
|
|
14
14
|
|
|
15
15
|
// src/autoblock/block-node-version.ts
|
|
16
16
|
import { MIN_SUPPORTED_NODE_DESCRIPTION, isNodeVersionSupported } from "storybook/internal/common";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_p28xbsg3xzj from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_p28xbsg3xzj from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_p28xbsg3xzj from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_p28xbsg3xzj.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_p28xbsg3xzj.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_p28xbsg3xzj.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-4GUNVUYY.js";
|
|
13
|
+
import "./chunk-SJEUIQ46.js";
|
|
14
14
|
|
|
15
15
|
// src/autoblock/block-react-legacy-root-api.ts
|
|
16
16
|
import { dedent } from "ts-dedent";
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_p28xbsg3xzj from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_p28xbsg3xzj from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_p28xbsg3xzj from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_p28xbsg3xzj.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_p28xbsg3xzj.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_p28xbsg3xzj.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
findOutdatedPackage
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-2MUKNWW5.js";
|
|
15
|
+
import "./chunk-AGADK3RL.js";
|
|
16
|
+
import "./chunk-7BUFIZL4.js";
|
|
17
|
+
import "./chunk-4GUNVUYY.js";
|
|
18
|
+
import "./chunk-SJEUIQ46.js";
|
|
19
19
|
|
|
20
20
|
// src/autoblock/block-webpack5-frameworks.ts
|
|
21
21
|
var minimalVersionsMap = {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_p28xbsg3xzj from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_p28xbsg3xzj from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_p28xbsg3xzj from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_p28xbsg3xzj.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_p28xbsg3xzj.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_p28xbsg3xzj.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -12,14 +12,14 @@ var require = CJS_COMPAT_NODE_MODULE_ft71o55xt7f.createRequire(import.meta.url);
|
|
|
12
12
|
import {
|
|
13
13
|
globby,
|
|
14
14
|
globbySync
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-AGADK3RL.js";
|
|
16
16
|
import {
|
|
17
17
|
require_semver
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-7BUFIZL4.js";
|
|
19
19
|
import {
|
|
20
20
|
__commonJS,
|
|
21
21
|
__toESM
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-SJEUIQ46.js";
|
|
23
23
|
|
|
24
24
|
// ../../../node_modules/picocolors/picocolors.js
|
|
25
25
|
var require_picocolors = __commonJS({
|
|
@@ -106,6 +106,7 @@ import {
|
|
|
106
106
|
} from "storybook/internal/core-server";
|
|
107
107
|
import { logTracker, logger, prompt } from "storybook/internal/node-logger";
|
|
108
108
|
import {
|
|
109
|
+
UpgradeStorybookConfigDirNotFoundError,
|
|
109
110
|
UpgradeStorybookToLowerVersionError,
|
|
110
111
|
UpgradeStorybookUnknownCurrentVersionError
|
|
111
112
|
} from "storybook/internal/server-errors";
|
|
@@ -133,13 +134,13 @@ var import_picocolors = __toESM(require_picocolors(), 1), import_semver = __toES
|
|
|
133
134
|
// src/autoblock/index.ts
|
|
134
135
|
var blockers = () => [
|
|
135
136
|
// add/remove blockers here
|
|
136
|
-
import("./block-dependencies-versions-
|
|
137
|
-
import("./block-create-react-app-
|
|
138
|
-
import("./block-node-version-
|
|
139
|
-
import("./block-webpack5-frameworks-
|
|
140
|
-
import("./block-major-version-
|
|
141
|
-
import("./block-experimental-addon-test-
|
|
142
|
-
import("./block-react-legacy-root-api-
|
|
137
|
+
import("./block-dependencies-versions-NO7SGHPX.js"),
|
|
138
|
+
import("./block-create-react-app-MUJEAJWZ.js"),
|
|
139
|
+
import("./block-node-version-43NYZKC4.js"),
|
|
140
|
+
import("./block-webpack5-frameworks-ELINHXW5.js"),
|
|
141
|
+
import("./block-major-version-WWI2WIS2.js"),
|
|
142
|
+
import("./block-experimental-addon-test-P5AIPERY.js"),
|
|
143
|
+
import("./block-react-legacy-root-api-4JKQEIN5.js")
|
|
143
144
|
], autoblock = async (options, list = blockers()) => list.length === 0 ? null : await Promise.all(
|
|
144
145
|
list.map(async (i) => {
|
|
145
146
|
let blocker = (await i).blocker;
|
|
@@ -154,12 +155,6 @@ import { getStorybookData } from "storybook/internal/cli";
|
|
|
154
155
|
var getFrameworkPackageName = (mainConfig) => {
|
|
155
156
|
let packageNameOrPath = typeof mainConfig?.framework == "string" ? mainConfig.framework : mainConfig?.framework?.name;
|
|
156
157
|
return packageNameOrPath ? extractFrameworkPackageName(packageNameOrPath) : null;
|
|
157
|
-
}, getRendererName = (mainConfig) => {
|
|
158
|
-
let frameworkPackageName = getFrameworkPackageName(mainConfig);
|
|
159
|
-
if (!frameworkPackageName)
|
|
160
|
-
return null;
|
|
161
|
-
let frameworkName = frameworkPackages[frameworkPackageName];
|
|
162
|
-
return frameworkToRenderer[frameworkName];
|
|
163
158
|
};
|
|
164
159
|
|
|
165
160
|
// src/util.ts
|
|
@@ -199,9 +194,7 @@ var validateUpgradeCompatibility = (currentVersion, beforeVersion, isCanary) =>
|
|
|
199
194
|
onlyDirectories: !0,
|
|
200
195
|
followSymbolicLinks: !1
|
|
201
196
|
});
|
|
202
|
-
return logger.debug(`Found ${storybookDirs.length} Storybook projects`), storybookDirs
|
|
203
|
-
message: "No Storybook projects were found. Please enter the path to the .storybook directory for the project you want to upgrade."
|
|
204
|
-
})] : storybookDirs;
|
|
197
|
+
return logger.debug(`Found ${storybookDirs.length} Storybook projects`), storybookDirs;
|
|
205
198
|
} catch (error) {
|
|
206
199
|
throw logger.error("Failed to find Storybook projects"), error;
|
|
207
200
|
}
|
|
@@ -268,7 +261,7 @@ var processProject = async ({
|
|
|
268
261
|
};
|
|
269
262
|
}
|
|
270
263
|
}, collectProjects = async (options, configDirs, onProjectScanStart) => {
|
|
271
|
-
let { default: pLimit } = await import("./p-limit-
|
|
264
|
+
let { default: pLimit } = await import("./p-limit-GSIPL3UA.js"), currentCLIVersion = versions.storybook, limit = pLimit(5), projectPromises = configDirs.map(
|
|
272
265
|
(configDir) => limit(
|
|
273
266
|
() => processProject({
|
|
274
267
|
configDir,
|
|
@@ -307,7 +300,9 @@ var processProject = async ({
|
|
|
307
300
|
try {
|
|
308
301
|
let upgradePromises = satelliteDependencies.map(async (dependency) => {
|
|
309
302
|
try {
|
|
310
|
-
let
|
|
303
|
+
let tags = isCLIPrerelease ? [dependency, `${dependency}@next`] : [dependency], versions2 = await Promise.all(
|
|
304
|
+
tags.map((tag) => packageManager.latestVersion(tag))
|
|
305
|
+
), [mostRecentVersion] = (0, import_semver.rsort)(versions2.filter((version) => version !== null));
|
|
311
306
|
if (!mostRecentVersion)
|
|
312
307
|
return null;
|
|
313
308
|
let { modifier } = getVersionModifier(dependencies[dependency] ?? "");
|
|
@@ -391,7 +386,13 @@ ${formatProjectDirectories(errorProjects, logger.SYMBOLS.error)}`,
|
|
|
391
386
|
let task = prompt.spinner({ id: "detect-projects" });
|
|
392
387
|
task.start("Detecting projects...");
|
|
393
388
|
let detectedConfigDirs = options.configDir ?? [];
|
|
394
|
-
(!options.configDir || options.configDir.length === 0) && (detectedConfigDirs = await findStorybookProjects())
|
|
389
|
+
if ((!options.configDir || options.configDir.length === 0) && (detectedConfigDirs = await findStorybookProjects()), detectedConfigDirs.length === 0) {
|
|
390
|
+
if (task.stop("No .storybook directory found"), options.yes)
|
|
391
|
+
throw new UpgradeStorybookConfigDirNotFoundError();
|
|
392
|
+
detectedConfigDirs = [await prompt.text({
|
|
393
|
+
message: "No Storybook projects were found. Please enter the path to the .storybook directory for the project you want to upgrade."
|
|
394
|
+
})], task.start("Detecting projects...");
|
|
395
|
+
}
|
|
395
396
|
let count = 0, projects = await collectProjects(
|
|
396
397
|
options,
|
|
397
398
|
detectedConfigDirs,
|
|
@@ -421,7 +422,7 @@ Please fix the errors and run the upgrade command again.`
|
|
|
421
422
|
);
|
|
422
423
|
return selectedProjects ? { allProjects: validProjects, selectedProjects } : void 0;
|
|
423
424
|
} catch (error) {
|
|
424
|
-
throw error instanceof HandledError || logger.error("Failed to get projects"), error;
|
|
425
|
+
throw error instanceof HandledError || error instanceof UpgradeStorybookConfigDirNotFoundError || logger.error("Failed to get projects"), error;
|
|
425
426
|
}
|
|
426
427
|
}, findFilesUp = (matchers, cwd) => {
|
|
427
428
|
let matchingFiles = [];
|
|
@@ -502,7 +503,6 @@ After addressing this, you can try running the upgrade command again. You can al
|
|
|
502
503
|
export {
|
|
503
504
|
require_picocolors,
|
|
504
505
|
getFrameworkPackageName,
|
|
505
|
-
getRendererName,
|
|
506
506
|
getStorybookData,
|
|
507
507
|
up,
|
|
508
508
|
findOutdatedPackage,
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_p28xbsg3xzj from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_p28xbsg3xzj from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_p28xbsg3xzj from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_p28xbsg3xzj.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_p28xbsg3xzj.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_p28xbsg3xzj.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_p28xbsg3xzj from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_p28xbsg3xzj from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_p28xbsg3xzj from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_p28xbsg3xzj.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_p28xbsg3xzj.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_p28xbsg3xzj.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
__commonJS
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-SJEUIQ46.js";
|
|
15
15
|
|
|
16
16
|
// ../../../node_modules/semver/internal/constants.js
|
|
17
17
|
var require_constants = __commonJS({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_p28xbsg3xzj from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_p28xbsg3xzj from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_p28xbsg3xzj from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_p28xbsg3xzj.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_p28xbsg3xzj.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_p28xbsg3xzj.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
__commonJS,
|
|
14
14
|
__require,
|
|
15
15
|
__toESM
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-SJEUIQ46.js";
|
|
17
17
|
|
|
18
18
|
// ../../../node_modules/fast-glob/out/utils/array.js
|
|
19
19
|
var require_array = __commonJS({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_p28xbsg3xzj from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_p28xbsg3xzj from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_p28xbsg3xzj from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_p28xbsg3xzj.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_p28xbsg3xzj.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_p28xbsg3xzj.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_p28xbsg3xzj from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_p28xbsg3xzj from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_p28xbsg3xzj from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_p28xbsg3xzj.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_p28xbsg3xzj.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_p28xbsg3xzj.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -21,8 +21,8 @@ import {
|
|
|
21
21
|
isGitIgnoredSync,
|
|
22
22
|
isIgnoredByIgnoreFiles,
|
|
23
23
|
isIgnoredByIgnoreFilesSync
|
|
24
|
-
} from "./chunk-
|
|
25
|
-
import "./chunk-
|
|
24
|
+
} from "./chunk-AGADK3RL.js";
|
|
25
|
+
import "./chunk-SJEUIQ46.js";
|
|
26
26
|
export {
|
|
27
27
|
convertPathToPattern,
|
|
28
28
|
generateGlobTasks,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_p28xbsg3xzj from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_p28xbsg3xzj from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_p28xbsg3xzj from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_p28xbsg3xzj.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_p28xbsg3xzj.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_p28xbsg3xzj.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-SJEUIQ46.js";
|
|
13
13
|
|
|
14
14
|
// ../../../node_modules/yocto-queue/index.js
|
|
15
15
|
var Node = class {
|