@storybook/cli 11.0.0-beta.0 → 11.0.0-beta.1
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-55SCV5HS.js → block-create-react-app-LSAOSWEM.js} +8 -8
- package/dist/_node-chunks/{block-dependencies-versions-X3UXQKXS.js → block-dependencies-versions-E4B3YEAN.js} +12 -12
- package/dist/_node-chunks/{block-experimental-addon-test-ZCNN3AY5.js → block-experimental-addon-test-GERFI6TT.js} +9 -9
- package/dist/_node-chunks/{block-major-version-GL7Y4MJM.js → block-major-version-45JDFPXA.js} +9 -9
- package/dist/_node-chunks/{block-node-version-GQKR7KYD.js → block-node-version-B533R3SG.js} +8 -8
- package/dist/_node-chunks/{block-react-legacy-root-api-L42GIMIJ.js → block-react-legacy-root-api-HGY34WGR.js} +8 -8
- package/dist/_node-chunks/{block-webpack5-frameworks-PPD62WAL.js → block-webpack5-frameworks-XPD4BIYO.js} +11 -11
- package/dist/_node-chunks/{chunk-ZDYT6VJJ.js → chunk-NIATDCBD.js} +7 -7
- package/dist/_node-chunks/{chunk-32EZTKOD.js → chunk-R4Q3DROI.js} +6 -6
- package/dist/_node-chunks/{chunk-LK3ZGBEB.js → chunk-R6HMSGZI.js} +17 -17
- package/dist/_node-chunks/{chunk-LUBSYZGT.js → chunk-VGARET5X.js} +7 -7
- package/dist/_node-chunks/chunk-ZGCPET5Z.js +11 -0
- package/dist/_node-chunks/{globby-UPXDPS6W.js → globby-WS6JLEVK.js} +8 -8
- package/dist/_node-chunks/{p-limit-TGWAHTUF.js → p-limit-26GLRE5V.js} +7 -7
- package/dist/_node-chunks/{run-6MV3DMOK.js → run-GZ5OBPUT.js} +141 -111
- package/dist/bin/index.js +7 -7
- package/package.json +4 -4
- package/dist/_node-chunks/chunk-265TYWHA.js +0 -11
package/dist/_node-chunks/{block-create-react-app-55SCV5HS.js → block-create-react-app-LSAOSWEM.js}
RENAMED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_4tp3msw2nul from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_4tp3msw2nul from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_4tp3msw2nul from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_4tp3msw2nul.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_4tp3msw2nul.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_4tp3msw2nul.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-ZGCPET5Z.js";
|
|
13
|
+
import "./chunk-R4Q3DROI.js";
|
|
14
14
|
|
|
15
15
|
// src/autoblock/block-create-react-app.ts
|
|
16
16
|
import { dedent } from "ts-dedent";
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_4tp3msw2nul from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_4tp3msw2nul from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_4tp3msw2nul from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_4tp3msw2nul.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_4tp3msw2nul.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_4tp3msw2nul.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-R6HMSGZI.js";
|
|
15
|
+
import "./chunk-NIATDCBD.js";
|
|
16
|
+
import "./chunk-VGARET5X.js";
|
|
17
|
+
import "./chunk-ZGCPET5Z.js";
|
|
18
|
+
import "./chunk-R4Q3DROI.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
24
|
next: "15.0.0",
|
|
25
|
-
preact: "10.
|
|
25
|
+
preact: "10.9.0",
|
|
26
26
|
react: "18.0.0",
|
|
27
27
|
"react-dom": "18.0.0",
|
|
28
28
|
svelte: "5.0.0",
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_4tp3msw2nul from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_4tp3msw2nul from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_4tp3msw2nul from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_4tp3msw2nul.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_4tp3msw2nul.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_4tp3msw2nul.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-VGARET5X.js";
|
|
15
|
+
import "./chunk-ZGCPET5Z.js";
|
|
16
16
|
import {
|
|
17
17
|
__toESM
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-R4Q3DROI.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-GL7Y4MJM.js → block-major-version-45JDFPXA.js}
RENAMED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_4tp3msw2nul from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_4tp3msw2nul from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_4tp3msw2nul from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_4tp3msw2nul.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_4tp3msw2nul.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_4tp3msw2nul.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-VGARET5X.js";
|
|
15
|
+
import "./chunk-ZGCPET5Z.js";
|
|
16
16
|
import {
|
|
17
17
|
__toESM
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-R4Q3DROI.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_4tp3msw2nul from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_4tp3msw2nul from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_4tp3msw2nul from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_4tp3msw2nul.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_4tp3msw2nul.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_4tp3msw2nul.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-ZGCPET5Z.js";
|
|
13
|
+
import "./chunk-R4Q3DROI.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_4tp3msw2nul from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_4tp3msw2nul from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_4tp3msw2nul from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_4tp3msw2nul.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_4tp3msw2nul.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_4tp3msw2nul.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-ZGCPET5Z.js";
|
|
13
|
+
import "./chunk-R4Q3DROI.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_4tp3msw2nul from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_4tp3msw2nul from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_4tp3msw2nul from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_4tp3msw2nul.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_4tp3msw2nul.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_4tp3msw2nul.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-R6HMSGZI.js";
|
|
15
|
+
import "./chunk-NIATDCBD.js";
|
|
16
|
+
import "./chunk-VGARET5X.js";
|
|
17
|
+
import "./chunk-ZGCPET5Z.js";
|
|
18
|
+
import "./chunk-R4Q3DROI.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_4tp3msw2nul from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_4tp3msw2nul from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_4tp3msw2nul from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_4tp3msw2nul.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_4tp3msw2nul.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_4tp3msw2nul.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-R4Q3DROI.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_4tp3msw2nul from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_4tp3msw2nul from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_4tp3msw2nul from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_4tp3msw2nul.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_4tp3msw2nul.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_4tp3msw2nul.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_4tp3msw2nul from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_4tp3msw2nul from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_4tp3msw2nul from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_4tp3msw2nul.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_4tp3msw2nul.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_4tp3msw2nul.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_jfk48wh4278.createRequire(import.meta.url);
|
|
|
12
12
|
import {
|
|
13
13
|
globby,
|
|
14
14
|
globbySync
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-NIATDCBD.js";
|
|
16
16
|
import {
|
|
17
17
|
require_semver
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-VGARET5X.js";
|
|
19
19
|
import {
|
|
20
20
|
__commonJS,
|
|
21
21
|
__toESM
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-R4Q3DROI.js";
|
|
23
23
|
|
|
24
24
|
// ../../../node_modules/picocolors/picocolors.js
|
|
25
25
|
var require_picocolors = __commonJS({
|
|
@@ -134,13 +134,13 @@ var import_picocolors = __toESM(require_picocolors(), 1), import_semver = __toES
|
|
|
134
134
|
// src/autoblock/index.ts
|
|
135
135
|
var blockers = () => [
|
|
136
136
|
// add/remove blockers here
|
|
137
|
-
import("./block-dependencies-versions-
|
|
138
|
-
import("./block-create-react-app-
|
|
139
|
-
import("./block-node-version-
|
|
140
|
-
import("./block-webpack5-frameworks-
|
|
141
|
-
import("./block-major-version-
|
|
142
|
-
import("./block-experimental-addon-test-
|
|
143
|
-
import("./block-react-legacy-root-api-
|
|
137
|
+
import("./block-dependencies-versions-E4B3YEAN.js"),
|
|
138
|
+
import("./block-create-react-app-LSAOSWEM.js"),
|
|
139
|
+
import("./block-node-version-B533R3SG.js"),
|
|
140
|
+
import("./block-webpack5-frameworks-XPD4BIYO.js"),
|
|
141
|
+
import("./block-major-version-45JDFPXA.js"),
|
|
142
|
+
import("./block-experimental-addon-test-GERFI6TT.js"),
|
|
143
|
+
import("./block-react-legacy-root-api-HGY34WGR.js")
|
|
144
144
|
], autoblock = async (options, list = blockers()) => list.length === 0 ? null : await Promise.all(
|
|
145
145
|
list.map(async (i) => {
|
|
146
146
|
let blocker = (await i).blocker;
|
|
@@ -267,7 +267,7 @@ var processProject = async ({
|
|
|
267
267
|
};
|
|
268
268
|
}
|
|
269
269
|
}, collectProjects = async (options, configDirs, onProjectScanStart) => {
|
|
270
|
-
let { default: pLimit } = await import("./p-limit-
|
|
270
|
+
let { default: pLimit } = await import("./p-limit-26GLRE5V.js"), currentCLIVersion = versions.storybook, limit = pLimit(5), projectPromises = configDirs.map(
|
|
271
271
|
(configDir) => limit(
|
|
272
272
|
() => processProject({
|
|
273
273
|
configDir,
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_4tp3msw2nul from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_4tp3msw2nul from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_4tp3msw2nul from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_4tp3msw2nul.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_4tp3msw2nul.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_4tp3msw2nul.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-R4Q3DROI.js";
|
|
15
15
|
|
|
16
16
|
// ../../../node_modules/semver/internal/constants.js
|
|
17
17
|
var require_constants = __commonJS({
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_4tp3msw2nul from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_4tp3msw2nul from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_4tp3msw2nul from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_4tp3msw2nul.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_4tp3msw2nul.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_4tp3msw2nul.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_4tp3msw2nul from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_4tp3msw2nul from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_4tp3msw2nul from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_4tp3msw2nul.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_4tp3msw2nul.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_4tp3msw2nul.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-NIATDCBD.js";
|
|
25
|
+
import "./chunk-R4Q3DROI.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_4tp3msw2nul from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_4tp3msw2nul from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_4tp3msw2nul from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_4tp3msw2nul.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_4tp3msw2nul.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_4tp3msw2nul.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-R4Q3DROI.js";
|
|
13
13
|
|
|
14
14
|
// ../../../node_modules/yocto-queue/index.js
|
|
15
15
|
var Node = class {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_4tp3msw2nul from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_4tp3msw2nul from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_4tp3msw2nul from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_4tp3msw2nul.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_4tp3msw2nul.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_4tp3msw2nul.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -20,18 +20,18 @@ import {
|
|
|
20
20
|
shortenPath,
|
|
21
21
|
up,
|
|
22
22
|
upgradeStorybookDependencies
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-R6HMSGZI.js";
|
|
24
24
|
import {
|
|
25
25
|
slash
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-NIATDCBD.js";
|
|
27
27
|
import {
|
|
28
28
|
require_semver
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-VGARET5X.js";
|
|
30
30
|
import {
|
|
31
31
|
__commonJS,
|
|
32
32
|
__require,
|
|
33
33
|
__toESM
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-R4Q3DROI.js";
|
|
35
35
|
|
|
36
36
|
// ../../../node_modules/envinfo/dist/envinfo.js
|
|
37
37
|
var require_envinfo = __commonJS({
|
|
@@ -4752,13 +4752,13 @@ function leven(first, second, options) {
|
|
|
4752
4752
|
}
|
|
4753
4753
|
|
|
4754
4754
|
// src/bin/run.ts
|
|
4755
|
-
var
|
|
4755
|
+
var import_picocolors24 = __toESM(require_picocolors(), 1);
|
|
4756
4756
|
|
|
4757
4757
|
// package.json
|
|
4758
|
-
var version = "11.0.0-beta.
|
|
4758
|
+
var version = "11.0.0-beta.1";
|
|
4759
4759
|
|
|
4760
4760
|
// src/add.ts
|
|
4761
|
-
var
|
|
4761
|
+
var import_semver = __toESM(require_semver(), 1);
|
|
4762
4762
|
import { relative as relative2 } from "node:path";
|
|
4763
4763
|
import { setupAddonInConfig, versions } from "storybook/internal/common";
|
|
4764
4764
|
import { readConfig } from "storybook/internal/csf-tools";
|
|
@@ -4900,9 +4900,6 @@ var hasOwnProperty = {}.hasOwnProperty;
|
|
|
4900
4900
|
var RegExpPrototypeSymbolReplace = RegExp.prototype[Symbol.replace], own = {}.hasOwnProperty;
|
|
4901
4901
|
var isWindows = process.platform === "win32", globalCache = globalThis.__EXSOLVE_CACHE__ ||= /* @__PURE__ */ new Map();
|
|
4902
4902
|
|
|
4903
|
-
// ../../core/src/shared/utils/module.ts
|
|
4904
|
-
var import_semver = __toESM(require_semver(), 1);
|
|
4905
|
-
|
|
4906
4903
|
// ../../core/node_modules/pathe/dist/shared/pathe.ff20891b.mjs
|
|
4907
4904
|
var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
4908
4905
|
function normalizeWindowsPath(input = "") {
|
|
@@ -5002,10 +4999,10 @@ var storybookConfigExtensions = [
|
|
|
5002
4999
|
var importMetaResolve = (...args) => typeof import.meta.resolve != "function" && process.env.VITEST === "true" ? (console.warn(
|
|
5003
5000
|
"importMetaResolve from within Storybook is being used in a Vitest test, but it shouldn't be. Please report this at https://github.com/storybookjs/storybook/issues/new?template=bug_report.yml"
|
|
5004
5001
|
), pathToFileURL(args[0]).href) : import.meta.resolve(...args);
|
|
5005
|
-
var typescriptLoaderRegistration = null, typescriptLoaderRegistrationError = null;
|
|
5002
|
+
var usesRegisterHooks = (nodeVersion) => Number(nodeVersion.split(".")[0]) >= 26, typescriptLoaderRegistration = null, typescriptLoaderRegistrationError = null;
|
|
5006
5003
|
function registerTypescriptLoader() {
|
|
5007
5004
|
return typescriptLoaderRegistration ??= (async () => {
|
|
5008
|
-
if (
|
|
5005
|
+
if (usesRegisterHooks(process.versions.node))
|
|
5009
5006
|
try {
|
|
5010
5007
|
let { load } = await import("storybook/internal/bin/loader");
|
|
5011
5008
|
nodeModule.registerHooks({ load });
|
|
@@ -5162,11 +5159,11 @@ async function add(addon, {
|
|
|
5162
5159
|
});
|
|
5163
5160
|
}
|
|
5164
5161
|
function isValidVersion(version2) {
|
|
5165
|
-
return
|
|
5162
|
+
return import_semver.default.valid(version2) || version2.match(/^\d+$/);
|
|
5166
5163
|
}
|
|
5167
5164
|
|
|
5168
5165
|
// src/automigrate/index.ts
|
|
5169
|
-
var
|
|
5166
|
+
var import_picocolors21 = __toESM(require_picocolors(), 1);
|
|
5170
5167
|
import { versions as versions2 } from "storybook/internal/common";
|
|
5171
5168
|
import { logTracker as logTracker2, logger as logger19, prompt as prompt5 } from "storybook/internal/node-logger";
|
|
5172
5169
|
import { AutomigrateError } from "storybook/internal/server-errors";
|
|
@@ -5196,19 +5193,19 @@ var import_picocolors = __toESM(require_picocolors(), 1);
|
|
|
5196
5193
|
import { frameworkPackages, rendererPackages } from "storybook/internal/common";
|
|
5197
5194
|
|
|
5198
5195
|
// src/doctor/hasMultipleVersions.ts
|
|
5199
|
-
var
|
|
5196
|
+
var import_semver2 = __toESM(require_semver(), 1);
|
|
5200
5197
|
function hasMultipleVersions(versions5) {
|
|
5201
5198
|
return versions5.find((v) => {
|
|
5202
|
-
let major =
|
|
5199
|
+
let major = import_semver2.default.major(v);
|
|
5203
5200
|
if (major === 0) {
|
|
5204
|
-
let minor =
|
|
5201
|
+
let minor = import_semver2.default.minor(v);
|
|
5205
5202
|
if (minor === 0) {
|
|
5206
|
-
let patch =
|
|
5207
|
-
return versions5.some((v2) =>
|
|
5203
|
+
let patch = import_semver2.default.patch(v);
|
|
5204
|
+
return versions5.some((v2) => import_semver2.default.patch(v2) !== patch);
|
|
5208
5205
|
}
|
|
5209
|
-
return versions5.some((v2) =>
|
|
5206
|
+
return versions5.some((v2) => import_semver2.default.minor(v2) !== minor);
|
|
5210
5207
|
}
|
|
5211
|
-
return versions5.some((v2) =>
|
|
5208
|
+
return versions5.some((v2) => import_semver2.default.major(v2) !== major);
|
|
5212
5209
|
});
|
|
5213
5210
|
}
|
|
5214
5211
|
|
|
@@ -5287,7 +5284,7 @@ ${packageVersions.join(", ")}`), acc;
|
|
|
5287
5284
|
}
|
|
5288
5285
|
|
|
5289
5286
|
// src/doctor/getIncompatibleStorybookPackages.ts
|
|
5290
|
-
var import_picocolors2 = __toESM(require_picocolors(), 1),
|
|
5287
|
+
var import_picocolors2 = __toESM(require_picocolors(), 1), import_semver3 = __toESM(require_semver(), 1);
|
|
5291
5288
|
import { versions as storybookCorePackages } from "storybook/internal/common";
|
|
5292
5289
|
import { logger } from "storybook/internal/node-logger";
|
|
5293
5290
|
|
|
@@ -5337,8 +5334,8 @@ var checkPackageCompatibility = async (dependency, context) => {
|
|
|
5337
5334
|
}).filter(
|
|
5338
5335
|
([dep]) => storybookCorePackages[dep] || consolidatedPackages[dep]
|
|
5339
5336
|
).map(([_, versionRange]) => versionRange).find((versionRange) => versionRange && // We can't check compatibility for 0.x packages, so we skip them
|
|
5340
|
-
!/^[~^]?0\./.test(versionRange) &&
|
|
5341
|
-
return isCorePackage3 && packageVersion &&
|
|
5337
|
+
!/^[~^]?0\./.test(versionRange) && import_semver3.default.validRange(versionRange) && !import_semver3.default.satisfies(currentStorybookVersion, versionRange)), isCorePackage3 = storybookCorePackages[name], availableUpdate, availableCoreUpdate;
|
|
5338
|
+
return isCorePackage3 && packageVersion && import_semver3.default.gt(currentStorybookVersion, packageVersion) && (availableUpdate = currentStorybookVersion), isCorePackage3 && packageVersion && import_semver3.default.gt(packageVersion, currentStorybookVersion) && (availableCoreUpdate = packageVersion), {
|
|
5342
5339
|
packageName: name,
|
|
5343
5340
|
packageVersion,
|
|
5344
5341
|
homepage,
|
|
@@ -5406,7 +5403,7 @@ For more details on compatibility guidance, see:`,
|
|
|
5406
5403
|
};
|
|
5407
5404
|
|
|
5408
5405
|
// src/doctor/getMismatchingVersionsWarning.ts
|
|
5409
|
-
var import_picocolors3 = __toESM(require_picocolors(), 1),
|
|
5406
|
+
var import_picocolors3 = __toESM(require_picocolors(), 1), import_semver4 = __toESM(require_semver(), 1);
|
|
5410
5407
|
import { frameworkPackages as frameworkPackages2, versions as storybookCorePackages2 } from "storybook/internal/common";
|
|
5411
5408
|
function getPrimaryVersion(name, installationMetadata) {
|
|
5412
5409
|
if (!name)
|
|
@@ -5423,7 +5420,7 @@ function getMismatchingVersionsWarnings(installationMetadata) {
|
|
|
5423
5420
|
let frameworkPackageName = Object.keys(installationMetadata?.dependencies || []).find(
|
|
5424
5421
|
(packageName) => Object.keys(frameworkPackages2).includes(packageName)
|
|
5425
5422
|
), cliVersion = getPrimaryVersion("storybook", installationMetadata), frameworkVersion = getPrimaryVersion(frameworkPackageName, installationMetadata);
|
|
5426
|
-
if (!cliVersion || !frameworkVersion ||
|
|
5423
|
+
if (!cliVersion || !frameworkVersion || import_semver4.default.eq(cliVersion, frameworkVersion))
|
|
5427
5424
|
return;
|
|
5428
5425
|
messages2.push(
|
|
5429
5426
|
`${import_picocolors3.default.bold(
|
|
@@ -5431,7 +5428,7 @@ function getMismatchingVersionsWarnings(installationMetadata) {
|
|
|
5431
5428
|
)} There seems to be a mismatch between your Storybook package versions. This can result in a broken Storybook installation.`
|
|
5432
5429
|
);
|
|
5433
5430
|
let versionToCompare, packageToDisplay;
|
|
5434
|
-
|
|
5431
|
+
import_semver4.default.lt(cliVersion, frameworkVersion) ? (versionToCompare = frameworkVersion, packageToDisplay = frameworkPackageName) : (versionToCompare = cliVersion, packageToDisplay = "storybook"), messages2.push(
|
|
5435
5432
|
`The version of your storybook core packages should align with ${import_picocolors3.default.yellow(
|
|
5436
5433
|
versionToCompare
|
|
5437
5434
|
)} (from the ${import_picocolors3.default.cyan(packageToDisplay)} package) or higher.`
|
|
@@ -5859,7 +5856,7 @@ var KIND_ORDER = ["main", "preview", "manager", "config", "story"], parse2 = (co
|
|
|
5859
5856
|
project.mainConfigPath && claim(project.mainConfigPath, "main"), project.previewConfigPath && claim(project.previewConfigPath, "preview");
|
|
5860
5857
|
let managerConfigPath = project.configDir && findConfigFile("manager", project.configDir);
|
|
5861
5858
|
if (managerConfigPath && claim(managerConfigPath, "manager"), project.storiesPaths.forEach((id) => claim(id, "story")), kinds.has("config")) {
|
|
5862
|
-
let { globby } = await import("./globby-
|
|
5859
|
+
let { globby } = await import("./globby-WS6JLEVK.js");
|
|
5863
5860
|
(await globby("**/*.{js,jsx,ts,tsx,mjs,cjs,mts,cts}", {
|
|
5864
5861
|
cwd: project.configDir,
|
|
5865
5862
|
absolute: !0,
|
|
@@ -6074,7 +6071,7 @@ import { logger as logger4 } from "storybook/internal/node-logger";
|
|
|
6074
6071
|
import { promises as fs } from "fs";
|
|
6075
6072
|
var maxConcurrentTasks = Math.max(1, os.cpus().length - 1);
|
|
6076
6073
|
async function runCodemod(globPattern = "**/*.{stories,story}.{js,jsx,ts,tsx,mjs,mjsx,mts,mtsx}", transform, { dryRun = !1, skipFormatting = !1 } = {}) {
|
|
6077
|
-
let modifiedCount = 0, unmodifiedCount = 0, errorCount = 0, { globby } = await import("./globby-
|
|
6074
|
+
let modifiedCount = 0, unmodifiedCount = 0, errorCount = 0, { globby } = await import("./globby-WS6JLEVK.js"), files = await globby(slash(globPattern), {
|
|
6078
6075
|
followSymbolicLinks: !0,
|
|
6079
6076
|
ignore: ["**/node_modules/**", "**/dist/**", "**/storybook-static/**", "**/build/**"]
|
|
6080
6077
|
});
|
|
@@ -6085,7 +6082,7 @@ Please try a different pattern.
|
|
|
6085
6082
|
`
|
|
6086
6083
|
), new Error("No files matched");
|
|
6087
6084
|
try {
|
|
6088
|
-
let pLimit = (await import("./p-limit-
|
|
6085
|
+
let pLimit = (await import("./p-limit-26GLRE5V.js")).default, limit = pLimit(maxConcurrentTasks);
|
|
6089
6086
|
await Promise.all(
|
|
6090
6087
|
files.map(
|
|
6091
6088
|
(file) => limit(async () => {
|
|
@@ -6286,8 +6283,8 @@ ${import_picocolors7.default.green(output)}`), info.source) : skipFormatting ? o
|
|
|
6286
6283
|
}
|
|
6287
6284
|
|
|
6288
6285
|
// src/codemod/helpers/story-to-csf-factory.ts
|
|
6286
|
+
import { isValidPreviewPath } from "storybook/internal/csf/csf-utils";
|
|
6289
6287
|
import {
|
|
6290
|
-
isValidPreviewPath,
|
|
6291
6288
|
loadCsf as loadCsf2,
|
|
6292
6289
|
printCsf as printCsf2,
|
|
6293
6290
|
printString as printString3,
|
|
@@ -7197,7 +7194,7 @@ function any(names, options) {
|
|
|
7197
7194
|
}
|
|
7198
7195
|
|
|
7199
7196
|
// src/automigrate/fixes/angular-to-angular-vite.ts
|
|
7200
|
-
var
|
|
7197
|
+
var import_semver5 = __toESM(require_semver(), 1);
|
|
7201
7198
|
import { dedent as dedent6 } from "ts-dedent";
|
|
7202
7199
|
|
|
7203
7200
|
// src/automigrate/helpers/automigration-logger.ts
|
|
@@ -7226,7 +7223,7 @@ var readJsonFile = async (files, path4) => {
|
|
|
7226
7223
|
return null;
|
|
7227
7224
|
}
|
|
7228
7225
|
}, findWorkspaceFiles = async (basename5) => {
|
|
7229
|
-
let { globby } = await import("./globby-
|
|
7226
|
+
let { globby } = await import("./globby-WS6JLEVK.js");
|
|
7230
7227
|
return globby([`**/${basename5}`], {
|
|
7231
7228
|
cwd: getProjectRoot2(),
|
|
7232
7229
|
ignore: ["**/node_modules/**", "**/dist/**", "**/storybook-static/**"],
|
|
@@ -7570,7 +7567,7 @@ export default defineConfig({
|
|
|
7570
7567
|
) || (preview.setImport(null, "zone.js"), logger11.debug(`Added a \`zone.js\` import to ${id}`));
|
|
7571
7568
|
}
|
|
7572
7569
|
}, getGuaranteedAngularMajor = (specifier) => {
|
|
7573
|
-
let range = specifier ?
|
|
7570
|
+
let range = specifier ? import_semver5.default.validRange(specifier) : null, major = range ? import_semver5.default.minVersion(range)?.major ?? null : null;
|
|
7574
7571
|
return major === 0 ? null : major;
|
|
7575
7572
|
}, inspectMigration = async (packageManager, mainConfig) => {
|
|
7576
7573
|
let allDeps = packageManager.getAllDependencies();
|
|
@@ -7926,12 +7923,12 @@ var SETTER_NAMES = ["setCustomElementsManifest", "setCustomElements"], WEB_COMPO
|
|
|
7926
7923
|
};
|
|
7927
7924
|
|
|
7928
7925
|
// src/automigrate/helpers/versionBoundary.ts
|
|
7929
|
-
var
|
|
7930
|
-
let before =
|
|
7931
|
-
return !before || !target ? !1 :
|
|
7926
|
+
var import_semver6 = __toESM(require_semver(), 1), crossesVersionBoundary = (beforeVersion, targetVersion, introducedIn4) => {
|
|
7927
|
+
let before = import_semver6.default.coerce(beforeVersion), target = import_semver6.default.coerce(targetVersion);
|
|
7928
|
+
return !before || !target ? !1 : import_semver6.default.lt(before, introducedIn4) && import_semver6.default.gte(target, introducedIn4);
|
|
7932
7929
|
}, isAtOrPastVersion = (version2, introducedIn4) => {
|
|
7933
|
-
let coerced =
|
|
7934
|
-
return coerced !== null &&
|
|
7930
|
+
let coerced = import_semver6.default.coerce(version2);
|
|
7931
|
+
return coerced !== null && import_semver6.default.gte(coerced, introducedIn4);
|
|
7935
7932
|
};
|
|
7936
7933
|
|
|
7937
7934
|
// src/automigrate/fixes/csf-next-mocked-args.ts
|
|
@@ -8928,14 +8925,18 @@ var tagOptionRenames = {
|
|
|
8928
8925
|
};
|
|
8929
8926
|
|
|
8930
8927
|
// src/automigrate/fixes/typescript-dependency.ts
|
|
8931
|
-
var import_picocolors17 = __toESM(require_picocolors(), 1),
|
|
8928
|
+
var import_picocolors17 = __toESM(require_picocolors(), 1), import_semver7 = __toESM(require_semver(), 1);
|
|
8932
8929
|
import {
|
|
8933
8930
|
RENDERERS_WITH_TYPESCRIPT_DOCGEN,
|
|
8934
8931
|
TYPESCRIPT_FOR_DOCGEN_PACKAGE,
|
|
8935
8932
|
hasTypeScriptCompilerApi
|
|
8936
8933
|
} from "storybook/internal/common";
|
|
8937
8934
|
import { SupportedRenderer as SupportedRenderer2 } from "storybook/internal/types";
|
|
8938
|
-
var introducedIn3 = "11.0.0", upgradesAcrossPeerChange = ({
|
|
8935
|
+
var introducedIn3 = "11.0.0", upgradesAcrossPeerChange = ({
|
|
8936
|
+
beforeVersion,
|
|
8937
|
+
storybookVersion,
|
|
8938
|
+
requested
|
|
8939
|
+
}) => requested || !!beforeVersion && crossesVersionBoundary(beforeVersion, storybookVersion, introducedIn3), typescriptDependency = {
|
|
8939
8940
|
id: "typescript-dependency",
|
|
8940
8941
|
link: "https://storybook.js.org/docs/configure/integration/typescript",
|
|
8941
8942
|
async check(options) {
|
|
@@ -8964,7 +8965,7 @@ var introducedIn3 = "11.0.0", upgradesAcrossPeerChange = ({ beforeVersion, story
|
|
|
8964
8965
|
let renderer = getRendererName(mainConfig);
|
|
8965
8966
|
if (!renderer || ![...RENDERERS_WITH_TYPESCRIPT_DOCGEN, SupportedRenderer2.ANGULAR].includes(renderer))
|
|
8966
8967
|
return null;
|
|
8967
|
-
let version2 = (0,
|
|
8968
|
+
let version2 = (0, import_semver7.coerce)(await packageManager.getDeclaredVersionSpecifier("typescript"))?.version;
|
|
8968
8969
|
return version2 && !hasTypeScriptCompilerApi(version2) ? { version: version2 } : null;
|
|
8969
8970
|
},
|
|
8970
8971
|
// The upgrade prints the full prompt only when it differs from the one-line hint without a result.
|
|
@@ -8976,6 +8977,31 @@ var introducedIn3 = "11.0.0", upgradesAcrossPeerChange = ({ beforeVersion, story
|
|
|
8976
8977
|
}
|
|
8977
8978
|
};
|
|
8978
8979
|
|
|
8980
|
+
// src/automigrate/fixes/typescript-7-react-docgen.ts
|
|
8981
|
+
var import_picocolors18 = __toESM(require_picocolors(), 1), import_semver8 = __toESM(require_semver(), 1);
|
|
8982
|
+
import { addReactDocgenFallback, hasTypeScriptCompilerApi as hasTypeScriptCompilerApi2 } from "storybook/internal/common";
|
|
8983
|
+
import { SupportedRenderer as SupportedRenderer3 } from "storybook/internal/types";
|
|
8984
|
+
var typescript7ReactDocgen = {
|
|
8985
|
+
id: "typescript-7-react-docgen",
|
|
8986
|
+
link: "https://storybook.js.org/docs/configure/integration/typescript#typescript-7",
|
|
8987
|
+
async check(options) {
|
|
8988
|
+
let { mainConfig, packageManager } = options;
|
|
8989
|
+
if (!upgradesAcrossPeerChange(options) || getRendererName(mainConfig) !== SupportedRenderer3.REACT)
|
|
8990
|
+
return null;
|
|
8991
|
+
let features = mainConfig.features, reactDocgen = mainConfig.typescript?.reactDocgen;
|
|
8992
|
+
if ((features?.docgenServer ?? features?.experimentalDocgenServer) !== void 0 || reactDocgen === !1 || !packageManager.isDependencyInstalled("typescript") || packageManager.isDependencyInstalled("react-docgen"))
|
|
8993
|
+
return null;
|
|
8994
|
+
let version2 = (0, import_semver8.coerce)(await packageManager.getDeclaredVersionSpecifier("typescript"))?.version;
|
|
8995
|
+
return version2 && !hasTypeScriptCompilerApi2(version2) ? !0 : null;
|
|
8996
|
+
},
|
|
8997
|
+
prompt() {
|
|
8998
|
+
return `Until Storybook supports TypeScript 7.1, server-side docgen cannot read your component types on TypeScript 7.0 (see the ${import_picocolors18.default.cyan("typescript-compiler-api")} notice). Storybook then falls back to the deprecated builder docgen with ${import_picocolors18.default.cyan("react-docgen")}, which it no longer installs. Add ${import_picocolors18.default.cyan("react-docgen")} for now, so Controls and the Docs args table keep working? Once Storybook supports TypeScript 7.1, it offers to remove it again.`;
|
|
8999
|
+
},
|
|
9000
|
+
async run({ packageManager }) {
|
|
9001
|
+
addReactDocgenFallback(packageManager);
|
|
9002
|
+
}
|
|
9003
|
+
};
|
|
9004
|
+
|
|
8979
9005
|
// src/automigrate/fixes/upgrade-storybook-related-dependencies.ts
|
|
8980
9006
|
var import_semver9 = __toESM(require_semver(), 1);
|
|
8981
9007
|
import { dirname as dirname4 } from "node:path";
|
|
@@ -9031,7 +9057,7 @@ var NON_REGISTRY_SPECIFIER = /^(patch|file|link|portal|git|http|https|workspace)
|
|
|
9031
9057
|
};
|
|
9032
9058
|
|
|
9033
9059
|
// src/automigrate/fixes/vitest-setup-file.ts
|
|
9034
|
-
var
|
|
9060
|
+
var import_picocolors19 = __toESM(require_picocolors(), 1), import_semver10 = __toESM(require_semver(), 1);
|
|
9035
9061
|
import { existsSync as existsSync5 } from "fs";
|
|
9036
9062
|
import {
|
|
9037
9063
|
formatExistingFile as formatExistingFile2,
|
|
@@ -9141,14 +9167,14 @@ var VITEST_ADDON_NAME = "@storybook/addon-vitest", VITEST_PLUGIN_MODULE = "@stor
|
|
|
9141
9167
|
(setupFile) => setupFile.transform.kind === "empty" ? [setupFile.path] : []
|
|
9142
9168
|
)
|
|
9143
9169
|
), rewritesAny = setupFiles.some((setupFile) => setupFile.transform.kind === "rewritten"), problems = setupFiles.flatMap(
|
|
9144
|
-
(setupFile) => setupFile.transform.kind === "manual" ? [`${
|
|
9170
|
+
(setupFile) => setupFile.transform.kind === "manual" ? [`${import_picocolors19.default.cyan(setupFile.path)}: ${setupFile.transform.reason}`] : []
|
|
9145
9171
|
);
|
|
9146
9172
|
for (let entry of unresolvedEntries) {
|
|
9147
|
-
let location = `${
|
|
9173
|
+
let location = `${import_picocolors19.default.cyan(entry.configFile)}: ${import_picocolors19.default.gray(entry.expression)} is computed at runtime`;
|
|
9148
9174
|
deletedPaths.size > 0 ? problems.push(
|
|
9149
|
-
`${location}, so the ${
|
|
9175
|
+
`${location}, so the ${import_picocolors19.default.cyan("setupFiles")} it selects can't be matched without executing your config`
|
|
9150
9176
|
) : rewritesAny && entry.project !== "storybook" && configFiles.includes(entry.configFile) && problems.push(
|
|
9151
|
-
`${location} in a Vitest project without the Storybook plugin, so it may select a setup file whose ${
|
|
9177
|
+
`${location} in a Vitest project without the Storybook plugin, so it may select a setup file whose ${import_picocolors19.default.cyan("setProjectAnnotations")} call is still needed there`
|
|
9152
9178
|
);
|
|
9153
9179
|
}
|
|
9154
9180
|
if (problems.length > 0)
|
|
@@ -9160,12 +9186,12 @@ var VITEST_ADDON_NAME = "@storybook/addon-vitest", VITEST_PLUGIN_MODULE = "@stor
|
|
|
9160
9186
|
|
|
9161
9187
|
`)}
|
|
9162
9188
|
|
|
9163
|
-
${
|
|
9164
|
-
1. If the call only passes your ${
|
|
9165
|
-
2. If it passes an addon's annotations, register that addon in the ${
|
|
9166
|
-
3. If it passes custom annotations, move them into ${
|
|
9167
|
-
4. If nothing else remains in the file, delete it and remove its entry from ${
|
|
9168
|
-
5. If the file is shared with a Vitest project that uses portable stories directly, list it only in that project's ${
|
|
9189
|
+
${import_picocolors19.default.cyan(VITEST_ADDON_NAME)} applies your project annotations itself: your ${import_picocolors19.default.cyan(".storybook/preview")} file and the previews of the addons registered in ${import_picocolors19.default.cyan(".storybook/main")}. ${import_picocolors19.default.cyan("setProjectAnnotations")} replaces those annotations, so it must not be called from a Vitest setup file. For each file listed above:
|
|
9190
|
+
1. If the call only passes your ${import_picocolors19.default.cyan(".storybook/preview")} annotations, delete the call.
|
|
9191
|
+
2. If it passes an addon's annotations, register that addon in the ${import_picocolors19.default.cyan("addons")} field of ${import_picocolors19.default.cyan(".storybook/main")} and delete the call.
|
|
9192
|
+
3. If it passes custom annotations, move them into ${import_picocolors19.default.cyan(".storybook/preview")} and delete the call.
|
|
9193
|
+
4. If nothing else remains in the file, delete it and remove its entry from ${import_picocolors19.default.cyan("setupFiles")} in your Vitest config.
|
|
9194
|
+
5. If the file is shared with a Vitest project that uses portable stories directly, list it only in that project's ${import_picocolors19.default.cyan("setupFiles")}.
|
|
9169
9195
|
|
|
9170
9196
|
Read more: ${this.link}
|
|
9171
9197
|
`
|
|
@@ -9541,11 +9567,13 @@ var allFixes = [
|
|
|
9541
9567
|
skills,
|
|
9542
9568
|
docgenServer,
|
|
9543
9569
|
typescriptDependency,
|
|
9544
|
-
typescriptCompilerApi
|
|
9570
|
+
typescriptCompilerApi,
|
|
9571
|
+
// TEMPORARY(ts-7.1): see `typescript-7-react-docgen.ts`.
|
|
9572
|
+
typescript7ReactDocgen
|
|
9545
9573
|
], commandFixes = [csfFactories];
|
|
9546
9574
|
|
|
9547
9575
|
// src/automigrate/helpers/logMigrationSummary.ts
|
|
9548
|
-
var
|
|
9576
|
+
var import_picocolors20 = __toESM(require_picocolors(), 1);
|
|
9549
9577
|
import { CLI_COLORS as CLI_COLORS2, logger as logger18 } from "storybook/internal/node-logger";
|
|
9550
9578
|
import { dedent as dedent13 } from "ts-dedent";
|
|
9551
9579
|
var messageDivider2 = `
|
|
@@ -9557,19 +9585,19 @@ var messageDivider2 = `
|
|
|
9557
9585
|
`;
|
|
9558
9586
|
function getGlossaryMessages(fixSummary, fixResults, dryRun) {
|
|
9559
9587
|
let messages2 = [];
|
|
9560
|
-
return fixSummary.succeeded.length > 0 && (messages2.push(
|
|
9561
|
-
Object.entries(fixSummary.failed).map(([id, error]) => `${
|
|
9588
|
+
return fixSummary.succeeded.length > 0 && (messages2.push(import_picocolors20.default.bold("Successful migrations:")), messages2.push(fixSummary.succeeded.map((m) => import_picocolors20.default.green(m)).join(", "))), Object.keys(fixSummary.failed).length > 0 && (messages2.push(import_picocolors20.default.bold("Failed migrations:")), messages2.push(
|
|
9589
|
+
Object.entries(fixSummary.failed).map(([id, error]) => `${import_picocolors20.default.bold(import_picocolors20.default.red(id))}:
|
|
9562
9590
|
${error}`).join(`
|
|
9563
9591
|
`)
|
|
9564
|
-
)), fixSummary.manual.length > 0 && (messages2.push(
|
|
9592
|
+
)), fixSummary.manual.length > 0 && (messages2.push(import_picocolors20.default.bold("Manual migrations:")), messages2.push(
|
|
9565
9593
|
fixSummary.manual.map(
|
|
9566
|
-
(m) => fixResults[m] === "manual_succeeded" /* MANUAL_SUCCEEDED */ ?
|
|
9594
|
+
(m) => fixResults[m] === "manual_succeeded" /* MANUAL_SUCCEEDED */ ? import_picocolors20.default.green(m) : import_picocolors20.default.blue(m)
|
|
9567
9595
|
).join(", ")
|
|
9568
9596
|
)), fixSummary.skipped.length > 0 && (messages2.push(
|
|
9569
|
-
|
|
9597
|
+
import_picocolors20.default.bold(
|
|
9570
9598
|
dryRun ? "Migrations that a run would apply (dry run, no files changed):" : "Skipped migrations:"
|
|
9571
9599
|
)
|
|
9572
|
-
), messages2.push(fixSummary.skipped.map((m) =>
|
|
9600
|
+
), messages2.push(fixSummary.skipped.map((m) => import_picocolors20.default.cyan(m)).join(", "))), messages2;
|
|
9573
9601
|
}
|
|
9574
9602
|
function logMigrationSummary({
|
|
9575
9603
|
fixResults,
|
|
@@ -9579,7 +9607,7 @@ function logMigrationSummary({
|
|
|
9579
9607
|
}) {
|
|
9580
9608
|
let messages2 = [];
|
|
9581
9609
|
messages2.push(getGlossaryMessages(fixSummary, fixResults, dryRun).join(messageDivider2)), messages2.push(dedent13`If you'd like to run the migrations again, you can do so by running
|
|
9582
|
-
${
|
|
9610
|
+
${import_picocolors20.default.cyan("npx storybook automigrate")}
|
|
9583
9611
|
|
|
9584
9612
|
The automigrations try to migrate common patterns in your project, but might not contain everything needed to migrate to the latest version of Storybook.
|
|
9585
9613
|
|
|
@@ -9597,7 +9625,7 @@ function logMigrationSummary({
|
|
|
9597
9625
|
|
|
9598
9626
|
// src/automigrate/index.ts
|
|
9599
9627
|
var logAvailableMigrations = () => {
|
|
9600
|
-
let availableFixes = [...allFixes, ...commandFixes].map((f) =>
|
|
9628
|
+
let availableFixes = [...allFixes, ...commandFixes].map((f) => import_picocolors21.default.yellow(f.id)).map((x) => `- ${x}`).join(`
|
|
9601
9629
|
`);
|
|
9602
9630
|
logger19.log(dedent14`
|
|
9603
9631
|
The following migrations are available:
|
|
@@ -9644,8 +9672,8 @@ var logAvailableMigrations = () => {
|
|
|
9644
9672
|
})), outcome && !options.skipDoctor && await doctor({ configDir, packageManager: options.packageManager });
|
|
9645
9673
|
let failedMigrations = Object.entries(outcome?.fixResults ?? {}).filter(([, status]) => status === "failed" /* FAILED */ || status === "check_failed" /* CHECK_FAILED */).map(([id, status]) => {
|
|
9646
9674
|
let statusLabel = status === "check_failed" /* CHECK_FAILED */ ? "check failed" : "failed";
|
|
9647
|
-
return `${
|
|
9648
|
-
}), skippedFiles = [...Map.groupBy(outcome?.fileFailures ?? [], ({ fixId }) => fixId)].filter(([id]) => outcome?.fixResults[id] === "succeeded" /* SUCCEEDED */).map(([id, failures]) => `${
|
|
9675
|
+
return `${import_picocolors21.default.cyan(id)} (${statusLabel})`;
|
|
9676
|
+
}), skippedFiles = [...Map.groupBy(outcome?.fileFailures ?? [], ({ fixId }) => fixId)].filter(([id]) => outcome?.fixResults[id] === "succeeded" /* SUCCEEDED */).map(([id, failures]) => `${import_picocolors21.default.cyan(id)} (${pluralFiles(failures.length)} skipped)`);
|
|
9649
9677
|
if (failedMigrations.length > 0 || skippedFiles.length > 0)
|
|
9650
9678
|
throw new AutomigrateError({ errors: [...failedMigrations, ...skippedFiles] });
|
|
9651
9679
|
}, automigrate = async ({
|
|
@@ -9671,7 +9699,7 @@ var logAvailableMigrations = () => {
|
|
|
9671
9699
|
return logAvailableMigrations(), null;
|
|
9672
9700
|
let commandFix = commandFixes.find((f) => f.id === fixId);
|
|
9673
9701
|
if (commandFix)
|
|
9674
|
-
return logger19.step(`Running migration ${
|
|
9702
|
+
return logger19.step(`Running migration ${import_picocolors21.default.magenta(fixId)}..`), await commandFix.run({
|
|
9675
9703
|
mainConfigPath,
|
|
9676
9704
|
previewConfigPath,
|
|
9677
9705
|
packageManager,
|
|
@@ -9686,7 +9714,7 @@ var logAvailableMigrations = () => {
|
|
|
9686
9714
|
}), null;
|
|
9687
9715
|
let selectedFixes = inputFixes || allFixes.filter((fix) => !(fix.id === upgradeStorybookRelatedDependencies.id && isLatest === !1 && fixId !== upgradeStorybookRelatedDependencies.id)), fixes = fixId ? selectedFixes.filter((f) => f.id === fixId) : selectedFixes;
|
|
9688
9716
|
if (fixId && fixes.length === 0)
|
|
9689
|
-
return logger19.log(`\u{1F4ED} No migrations found for ${
|
|
9717
|
+
return logger19.log(`\u{1F4ED} No migrations found for ${import_picocolors21.default.magenta(fixId)}.`), logAvailableMigrations(), null;
|
|
9690
9718
|
logger19.step("Checking possible migrations..");
|
|
9691
9719
|
let { fixResults, fixSummary, preCheckFailure, addonsToPostinstall, fileFailures, verified } = await runFixes({
|
|
9692
9720
|
fixes,
|
|
@@ -9740,7 +9768,7 @@ async function runFixes({
|
|
|
9740
9768
|
for (let f of fixes) {
|
|
9741
9769
|
let check;
|
|
9742
9770
|
try {
|
|
9743
|
-
logger19.debug(`Running ${
|
|
9771
|
+
logger19.debug(`Running ${import_picocolors21.default.cyan(f.id)} migration checks`), check = await runCheck(f, {
|
|
9744
9772
|
packageManager,
|
|
9745
9773
|
configDir,
|
|
9746
9774
|
mainConfig,
|
|
@@ -9749,9 +9777,9 @@ async function runFixes({
|
|
|
9749
9777
|
mainConfigPath,
|
|
9750
9778
|
storiesPaths,
|
|
9751
9779
|
requested: fixId === f.id
|
|
9752
|
-
}), logger19.debug(`End of ${
|
|
9780
|
+
}), logger19.debug(`End of ${import_picocolors21.default.cyan(f.id)} migration checks`);
|
|
9753
9781
|
} catch (error) {
|
|
9754
|
-
logger19.warn(`\u26A0\uFE0F failed to check fix ${
|
|
9782
|
+
logger19.warn(`\u26A0\uFE0F failed to check fix ${import_picocolors21.default.bold(f.id)}`), error instanceof Error && (logger19.error(`
|
|
9755
9783
|
${error.stack}`), fixSummary.failed[f.id] = error.message), fixResults[f.id] = "check_failed" /* CHECK_FAILED */;
|
|
9756
9784
|
}
|
|
9757
9785
|
check?.result ? checked.push(check) : fixResults[f.id] = fixResults[f.id] || "unnecessary" /* UNNECESSARY */;
|
|
@@ -9762,7 +9790,7 @@ ${error.stack}`), fixSummary.failed[f.id] = error.message), fixResults[f.id] = "
|
|
|
9762
9790
|
let selected = [];
|
|
9763
9791
|
for (let check of applicable) {
|
|
9764
9792
|
let { fix: f, result } = check, promptType = typeof f.promptType == "function" ? await f.promptType(result) : f.promptType ?? "auto";
|
|
9765
|
-
logger19.log(`\u{1F50E} found a '${
|
|
9793
|
+
logger19.log(`\u{1F50E} found a '${import_picocolors21.default.cyan(f.id)}' migration:`);
|
|
9766
9794
|
let getTitle = () => {
|
|
9767
9795
|
switch (promptType) {
|
|
9768
9796
|
case "auto":
|
|
@@ -9773,7 +9801,7 @@ ${error.stack}`), fixSummary.failed[f.id] = error.message), fixResults[f.id] = "
|
|
|
9773
9801
|
return "Migration notification";
|
|
9774
9802
|
}
|
|
9775
9803
|
};
|
|
9776
|
-
logger19.step(`${getTitle()}: ${
|
|
9804
|
+
logger19.step(`${getTitle()}: ${import_picocolors21.default.cyan(f.id)}`), logger19.logBox(f.prompt(result));
|
|
9777
9805
|
let runAnswer;
|
|
9778
9806
|
try {
|
|
9779
9807
|
if (dryRun)
|
|
@@ -9801,7 +9829,7 @@ ${error.stack}`), fixSummary.failed[f.id] = error.message), fixResults[f.id] = "
|
|
|
9801
9829
|
}
|
|
9802
9830
|
} else promptType === "auto" ? runAnswer = { fix: yes ? !0 : await prompt5.confirm(
|
|
9803
9831
|
{
|
|
9804
|
-
message: `Do you want to run the '${
|
|
9832
|
+
message: `Do you want to run the '${import_picocolors21.default.cyan(f.id)}' migration on your project?`,
|
|
9805
9833
|
initialValue: f.defaultSelected ?? !0
|
|
9806
9834
|
},
|
|
9807
9835
|
{
|
|
@@ -9822,33 +9850,33 @@ ${error.stack}`), fixSummary.failed[f.id] = error.message), fixResults[f.id] = "
|
|
|
9822
9850
|
} catch {
|
|
9823
9851
|
break;
|
|
9824
9852
|
}
|
|
9825
|
-
promptType === "auto" && (invariant(runAnswer, "runAnswer must be defined if not promptOnly"), runAnswer.fix ? selected.push(check) : (fixResults[f.id] = "skipped" /* SKIPPED */, fixSummary.skipped.push(f.id), logger19.log(`Skipped ${
|
|
9853
|
+
promptType === "auto" && (invariant(runAnswer, "runAnswer must be defined if not promptOnly"), runAnswer.fix ? selected.push(check) : (fixResults[f.id] = "skipped" /* SKIPPED */, fixSummary.skipped.push(f.id), logger19.log(`Skipped ${import_picocolors21.default.cyan(f.id)} migration`)));
|
|
9826
9854
|
}
|
|
9827
9855
|
if (selected.length === 0)
|
|
9828
9856
|
return { fixResults, fixSummary, addonsToPostinstall, fileFailures, verified };
|
|
9829
9857
|
let taskLog = prompt5.taskLog({
|
|
9830
9858
|
id: "automigrate-run",
|
|
9831
|
-
title: selected.length === 1 ? `Running ${
|
|
9859
|
+
title: selected.length === 1 ? `Running ${import_picocolors21.default.cyan(selected[0].fix.id)} migration` : "Running automigrations"
|
|
9832
9860
|
}), outcomes = await applyFixes(
|
|
9833
9861
|
{ ...project, skipInstall, yes, addonsToPostinstall },
|
|
9834
9862
|
selected
|
|
9835
9863
|
);
|
|
9836
9864
|
for (let [fixId2, outcome] of outcomes) {
|
|
9837
9865
|
if (outcome.status === "skipped") {
|
|
9838
|
-
fixResults[fixId2] = "skipped" /* SKIPPED */, fixSummary.skipped.push(fixId2), taskLog.message(`Skipped ${
|
|
9866
|
+
fixResults[fixId2] = "skipped" /* SKIPPED */, fixSummary.skipped.push(fixId2), taskLog.message(`Skipped ${import_picocolors21.default.cyan(fixId2)} migration`);
|
|
9839
9867
|
continue;
|
|
9840
9868
|
}
|
|
9841
9869
|
if (fileFailures.push(...outcome.fileFailures.map((failure) => ({ ...failure, fixId: fixId2 }))), outcome.status === "failed")
|
|
9842
|
-
fixResults[fixId2] = "failed" /* FAILED */, fixSummary.failed[fixId2] = outcome.error instanceof Error ? outcome.error.message : "Failed to run migration", taskLog.message(`${logger19.SYMBOLS.error} ${
|
|
9870
|
+
fixResults[fixId2] = "failed" /* FAILED */, fixSummary.failed[fixId2] = outcome.error instanceof Error ? outcome.error.message : "Failed to run migration", taskLog.message(`${logger19.SYMBOLS.error} ${import_picocolors21.default.cyan(fixId2)}`);
|
|
9843
9871
|
else {
|
|
9844
9872
|
fixResults[fixId2] = "succeeded" /* SUCCEEDED */, fixSummary.succeeded.push(fixId2);
|
|
9845
9873
|
let skipped = outcome.fileFailures.length;
|
|
9846
9874
|
taskLog.message(
|
|
9847
|
-
`${logger19.SYMBOLS.success} ${
|
|
9875
|
+
`${logger19.SYMBOLS.success} ${import_picocolors21.default.cyan(fixId2)}${skipped > 0 ? ` (${pluralFiles(skipped)} skipped)` : ""}`
|
|
9848
9876
|
);
|
|
9849
9877
|
}
|
|
9850
9878
|
}
|
|
9851
|
-
let ran = selected.length === 1 ? `${
|
|
9879
|
+
let ran = selected.length === 1 ? `${import_picocolors21.default.cyan(selected[0].fix.id)} migration` : "automigrations";
|
|
9852
9880
|
return Object.values(fixResults).includes("failed" /* FAILED */) ? taskLog.error(selected.length === 1 ? `Could not run ${ran}` : "Some automigrations failed") : taskLog.success(`Ran ${ran}`), { fixResults, fixSummary, addonsToPostinstall, fileFailures, verified };
|
|
9853
9881
|
}
|
|
9854
9882
|
|
|
@@ -9951,7 +9979,7 @@ import {
|
|
|
9951
9979
|
versions as versions3
|
|
9952
9980
|
} from "storybook/internal/common";
|
|
9953
9981
|
import { logger as logger22, prompt as prompt6 } from "storybook/internal/node-logger";
|
|
9954
|
-
var
|
|
9982
|
+
var import_picocolors22 = __toESM(require_picocolors(), 1), import_semver11 = __toESM(require_semver(), 1);
|
|
9955
9983
|
import { dedent as dedent15 } from "ts-dedent";
|
|
9956
9984
|
|
|
9957
9985
|
// src/sandbox-templates.ts
|
|
@@ -10258,6 +10286,8 @@ var baseTemplates = {
|
|
|
10258
10286
|
"astro-vite/default-ts": {
|
|
10259
10287
|
name: "Astro Latest (Vite | TypeScript)",
|
|
10260
10288
|
script: "npx create-astro@latest {{beforeDir}} --template minimal --no-install --no-git --no-ai --skip-houston --yes",
|
|
10289
|
+
// `init` installs the framework's `next` dist-tag during a Storybook prerelease.
|
|
10290
|
+
minAgeGateExemptions: ["@storybook-astro/*"],
|
|
10261
10291
|
expected: {
|
|
10262
10292
|
framework: "@storybook-astro/framework",
|
|
10263
10293
|
renderer: "@storybook-astro/renderer",
|
|
@@ -10842,18 +10872,18 @@ var toChoices = (c) => ({ label: allTemplates[c].name, value: c }), sandbox = as
|
|
|
10842
10872
|
let selectedConfig = allTemplates[filterValue], templateId = selectedConfig ? filterValue : null, packageManager = JsPackageManagerFactory.getPackageManager({
|
|
10843
10873
|
force: PackageManagerName.NPM
|
|
10844
10874
|
}), latestVersion = await packageManager.latestVersion("storybook"), nextVersion = await packageManager.latestVersion("storybook@next") ?? "0.0.0", currentVersion = versions3.storybook, isPrerelease = (0, import_semver11.prerelease)(currentVersion), isOutdated = (0, import_semver11.lt)(currentVersion, isPrerelease ? nextVersion : latestVersion), downloadType = !isOutdated && init ? "after-storybook" : "before-storybook", branch = isPrerelease ? "next" : "main", messages2 = {
|
|
10845
|
-
welcome: `Creating a Storybook ${
|
|
10846
|
-
notLatest:
|
|
10847
|
-
This version is behind the latest release, which is: ${
|
|
10875
|
+
welcome: `Creating a Storybook ${import_picocolors22.default.bold(currentVersion)} sandbox..`,
|
|
10876
|
+
notLatest: import_picocolors22.default.red(dedent15`
|
|
10877
|
+
This version is behind the latest release, which is: ${import_picocolors22.default.bold(latestVersion)}!
|
|
10848
10878
|
You likely ran the init command through npx, which can use a locally cached version, to get the latest please run:
|
|
10849
|
-
${
|
|
10879
|
+
${import_picocolors22.default.bold("npx storybook@latest sandbox")}
|
|
10850
10880
|
|
|
10851
10881
|
You may want to CTRL+C to stop, and run with the latest version instead.
|
|
10852
10882
|
`),
|
|
10853
|
-
longInitTime:
|
|
10883
|
+
longInitTime: import_picocolors22.default.yellow(
|
|
10854
10884
|
"The creation of the sandbox will take longer, because we will need to run init."
|
|
10855
10885
|
),
|
|
10856
|
-
prerelease:
|
|
10886
|
+
prerelease: import_picocolors22.default.yellow("This is a pre-release version.")
|
|
10857
10887
|
};
|
|
10858
10888
|
if (logger22.logBox(
|
|
10859
10889
|
[messages2.welcome].concat(isOutdated && !isPrerelease ? [messages2.notLatest] : []).concat(init && (isOutdated || isPrerelease) ? [messages2.longInitTime] : []).concat(isPrerelease ? [messages2.prerelease] : []).join(`
|
|
@@ -10870,20 +10900,20 @@ var toChoices = (c) => ({ label: allTemplates[c].name, value: c }), sandbox = as
|
|
|
10870
10900
|
dedent15`
|
|
10871
10901
|
🔎 You filtered out all templates. 🔍
|
|
10872
10902
|
|
|
10873
|
-
After filtering all the templates with "${
|
|
10903
|
+
After filtering all the templates with "${import_picocolors22.default.yellow(
|
|
10874
10904
|
filterValue
|
|
10875
10905
|
)}", we found no results. Please try again with a different filter.
|
|
10876
10906
|
|
|
10877
10907
|
Available templates:
|
|
10878
|
-
${keys.map((key) =>
|
|
10908
|
+
${keys.map((key) => import_picocolors22.default.blue(`- ${key}`)).join(`
|
|
10879
10909
|
`)}
|
|
10880
10910
|
`.trim(),
|
|
10881
10911
|
{ borderStyle: "round", padding: 1, borderColor: "#F1618C" }
|
|
10882
10912
|
), process.exit(1)), choices.length === 1 ? [templateId] = choices : (logger22.logBox(
|
|
10883
10913
|
dedent15`
|
|
10884
|
-
🤗 Welcome to ${
|
|
10914
|
+
🤗 Welcome to ${import_picocolors22.default.yellow("sb sandbox")}! 🤗
|
|
10885
10915
|
|
|
10886
|
-
Create a ${
|
|
10916
|
+
Create a ${import_picocolors22.default.green("new project")} to minimally reproduce Storybook issues.
|
|
10887
10917
|
|
|
10888
10918
|
1. select an environment that most closely matches your project setup.
|
|
10889
10919
|
2. select a location for the reproduction, outside of your project.
|
|
@@ -10913,15 +10943,15 @@ var toChoices = (c) => ({ label: allTemplates[c].name, value: c }), sandbox = as
|
|
|
10913
10943
|
)), invariant(selectedDirectory);
|
|
10914
10944
|
try {
|
|
10915
10945
|
let templateDestination = isAbsolute3(selectedDirectory) ? selectedDirectory : join4(process.cwd(), selectedDirectory);
|
|
10916
|
-
logger22.log(`\u{1F3C3} Adding ${selectedConfig.name} into ${templateDestination}`), logger22.log(`\u{1F4E6} Downloading sandbox template (${
|
|
10946
|
+
logger22.log(`\u{1F3C3} Adding ${selectedConfig.name} into ${templateDestination}`), logger22.log(`\u{1F4E6} Downloading sandbox template (${import_picocolors22.default.bold(downloadType)})...`);
|
|
10917
10947
|
try {
|
|
10918
10948
|
let gitPath = `storybookjs/sandboxes/tree/${branch}/${templateId}/${downloadType}`;
|
|
10919
10949
|
if (await mkdir2(templateDestination, { recursive: !0 }), (0, import_cross_spawn2.sync)("npx", ["gitpick@4.12.4", gitPath, templateDestination, "-o"], {
|
|
10920
10950
|
stdio: "inherit"
|
|
10921
10951
|
}), (await readdir(templateDestination)).length === 0) {
|
|
10922
|
-
let selected =
|
|
10952
|
+
let selected = import_picocolors22.default.yellow(templateId);
|
|
10923
10953
|
throw new Error(dedent15`
|
|
10924
|
-
Template downloaded from ${
|
|
10954
|
+
Template downloaded from ${import_picocolors22.default.blue(gitPath)} is empty.
|
|
10925
10955
|
Are you use it exists? Or did you want to set ${selected} to inDevelopment first?
|
|
10926
10956
|
`);
|
|
10927
10957
|
}
|
|
@@ -10939,20 +10969,20 @@ var toChoices = (c) => ({ label: allTemplates[c].name, value: c }), sandbox = as
|
|
|
10939
10969
|
} catch (err) {
|
|
10940
10970
|
throw logger22.error(`\u{1F6A8} Failed to download sandbox template: ${String(err)}`), err;
|
|
10941
10971
|
}
|
|
10942
|
-
let initMessage = init ?
|
|
10972
|
+
let initMessage = init ? import_picocolors22.default.yellow(dedent15`
|
|
10943
10973
|
yarn install
|
|
10944
10974
|
yarn storybook
|
|
10945
|
-
`) : `Recreate your setup, then ${
|
|
10975
|
+
`) : `Recreate your setup, then ${import_picocolors22.default.yellow("npx storybook@latest init")}`;
|
|
10946
10976
|
logger22.logBox(
|
|
10947
10977
|
dedent15`
|
|
10948
10978
|
🎉 Your Storybook reproduction project is ready to use! 🎉
|
|
10949
10979
|
|
|
10950
|
-
${
|
|
10980
|
+
${import_picocolors22.default.yellow(`cd ${selectedDirectory}`)}
|
|
10951
10981
|
${initMessage}
|
|
10952
10982
|
|
|
10953
10983
|
Once you've recreated the problem you're experiencing, please:
|
|
10954
10984
|
|
|
10955
|
-
1. Document any additional steps in ${
|
|
10985
|
+
1. Document any additional steps in ${import_picocolors22.default.cyan("README.md")}
|
|
10956
10986
|
2. Publish the repository to github
|
|
10957
10987
|
3. Link to the repro repository in your issue
|
|
10958
10988
|
|
|
@@ -10972,7 +11002,7 @@ async function promptSelectedTemplate(choices) {
|
|
|
10972
11002
|
}
|
|
10973
11003
|
|
|
10974
11004
|
// src/upgrade.ts
|
|
10975
|
-
var import_cross_spawn3 = __toESM(require_cross_spawn(), 1),
|
|
11005
|
+
var import_cross_spawn3 = __toESM(require_cross_spawn(), 1), import_picocolors23 = __toESM(require_picocolors(), 1), import_semver12 = __toESM(require_semver(), 1);
|
|
10976
11006
|
import {
|
|
10977
11007
|
hasStorybookSkills as hasStorybookSkills2,
|
|
10978
11008
|
installSkills as installSkills2,
|
|
@@ -11340,7 +11370,7 @@ ${projectList}`);
|
|
|
11340
11370
|
}
|
|
11341
11371
|
} else
|
|
11342
11372
|
Object.values(doctorResults).every((result) => result.status === "healthy") ? logger24.step(`${CLI_COLORS4.success("Your project(s) have been upgraded successfully! \u{1F389}")}`) : logger24.step(
|
|
11343
|
-
`${
|
|
11373
|
+
`${import_picocolors23.default.yellow("Your project(s) have been upgraded successfully, but some issues were found which need your attention, please check Storybook doctor logs above.")}`
|
|
11344
11374
|
);
|
|
11345
11375
|
let automigrationLinks = detectedAutomigrations.filter(
|
|
11346
11376
|
(am) => Object.entries(projectResults).some(
|
|
@@ -11400,9 +11430,9 @@ async function upgrade(options) {
|
|
|
11400
11430
|
return;
|
|
11401
11431
|
let { allProjects, selectedProjects: storybookProjects } = projectsResult;
|
|
11402
11432
|
storybookProjects.length > 1 ? logger24.info(`Upgrading the following projects:
|
|
11403
|
-
${storybookProjects.map((p) => `${
|
|
11433
|
+
${storybookProjects.map((p) => `${import_picocolors23.default.cyan(shortenPath(p.configDir))}: ${import_picocolors23.default.bold(p.beforeVersion)} -> ${import_picocolors23.default.bold(p.currentCLIVersion)}`).join(`
|
|
11404
11434
|
`)}`) : logger24.info(
|
|
11405
|
-
`Upgrading from ${
|
|
11435
|
+
`Upgrading from ${import_picocolors23.default.bold(storybookProjects[0].beforeVersion)} to ${import_picocolors23.default.bold(storybookProjects[0].currentCLIVersion)}`
|
|
11406
11436
|
);
|
|
11407
11437
|
let automigrationResults = {}, doctorResults = {}, handleInterruption = async () => {
|
|
11408
11438
|
throw logger24.log(`
|
|
@@ -11672,7 +11702,7 @@ command("upgrade").description(`Upgrade your Storybook packages to v${versions4.
|
|
|
11672
11702
|
).catch(handleCommandFailure(options.logfile));
|
|
11673
11703
|
});
|
|
11674
11704
|
command("info").description("Prints debugging information about the local environment").action(async () => {
|
|
11675
|
-
logger25.log(
|
|
11705
|
+
logger25.log(import_picocolors24.default.bold(`
|
|
11676
11706
|
Storybook Environment Info:`));
|
|
11677
11707
|
let activePackageManager = JsPackageManagerFactory3.getPackageManager().type.replace(/\d/, ""), output = await import_envinfo.default.run({
|
|
11678
11708
|
System: ["OS", "CPU", "Shell"],
|
|
@@ -11684,7 +11714,7 @@ Storybook Environment Info:`));
|
|
|
11684
11714
|
logger25.log(
|
|
11685
11715
|
output.replace(
|
|
11686
11716
|
activePackageManagerLine,
|
|
11687
|
-
|
|
11717
|
+
import_picocolors24.default.bold(`${activePackageManagerLine} <----- active`)
|
|
11688
11718
|
)
|
|
11689
11719
|
);
|
|
11690
11720
|
});
|
|
@@ -11724,10 +11754,10 @@ command("doctor").description("Check Storybook for known problems and provide su
|
|
|
11724
11754
|
}).catch(handleCommandFailure(options.logfile));
|
|
11725
11755
|
});
|
|
11726
11756
|
program.on("command:*", ([invalidCmd]) => {
|
|
11727
|
-
let errorMessage = ` Invalid command: ${
|
|
11757
|
+
let errorMessage = ` Invalid command: ${import_picocolors24.default.bold(invalidCmd)}.
|
|
11728
11758
|
See --help for a list of available commands.`, suggestion = program.commands.map((cmd) => cmd.name()).find((cmd) => leven(cmd, invalidCmd) < 3);
|
|
11729
11759
|
suggestion && (errorMessage += `
|
|
11730
|
-
Did you mean ${
|
|
11760
|
+
Did you mean ${import_picocolors24.default.yellow(suggestion)}?`), logger25.error(errorMessage), process.exit(1);
|
|
11731
11761
|
});
|
|
11732
11762
|
program.usage("<command> [options]").version(String(version));
|
|
11733
11763
|
var run = (argv = process.argv) => program.parseAsync(argv);
|
package/dist/bin/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
2
|
+
import CJS_COMPAT_NODE_URL_4tp3msw2nul from 'node:url';
|
|
3
|
+
import CJS_COMPAT_NODE_PATH_4tp3msw2nul from 'node:path';
|
|
4
|
+
import CJS_COMPAT_NODE_MODULE_4tp3msw2nul from "node:module";
|
|
5
5
|
|
|
6
|
-
var __filename =
|
|
7
|
-
var __dirname =
|
|
8
|
-
var require =
|
|
6
|
+
var __filename = CJS_COMPAT_NODE_URL_4tp3msw2nul.fileURLToPath(import.meta.url);
|
|
7
|
+
var __dirname = CJS_COMPAT_NODE_PATH_4tp3msw2nul.dirname(__filename);
|
|
8
|
+
var require = CJS_COMPAT_NODE_MODULE_4tp3msw2nul.createRequire(import.meta.url);
|
|
9
9
|
|
|
10
10
|
// ------------------------------------------------------------
|
|
11
11
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -19,4 +19,4 @@ isNodeVersionSupported(process.versions.node) || (logger.error(
|
|
|
19
19
|
dedent`To run Storybook, you need Node.js version ${MIN_SUPPORTED_NODE_DESCRIPTION}.
|
|
20
20
|
You are currently running Node.js ${process.version}. Please upgrade your Node.js installation.`
|
|
21
21
|
), process.exit(1));
|
|
22
|
-
import("../_node-chunks/run-
|
|
22
|
+
import("../_node-chunks/run-GZ5OBPUT.js").then(({ run }) => run());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/cli",
|
|
3
|
-
"version": "11.0.0-beta.
|
|
3
|
+
"version": "11.0.0-beta.1",
|
|
4
4
|
"description": "Storybook CLI: Develop, document, and test UI components in isolation",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
"!src/**/*"
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@storybook/codemod": "11.0.0-beta.
|
|
40
|
+
"@storybook/codemod": "11.0.0-beta.1",
|
|
41
41
|
"@types/semver": "^7.7.1",
|
|
42
42
|
"commander": "^14.0.2",
|
|
43
|
-
"create-storybook": "11.0.0-beta.
|
|
43
|
+
"create-storybook": "11.0.0-beta.1",
|
|
44
44
|
"jscodeshift": "^17.4.0",
|
|
45
|
-
"storybook": "11.0.0-beta.
|
|
45
|
+
"storybook": "11.0.0-beta.1",
|
|
46
46
|
"ts-dedent": "^2.2.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_jfk48wh4278 from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_jfk48wh4278 from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_jfk48wh4278 from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_jfk48wh4278.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_jfk48wh4278.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_jfk48wh4278.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|