@storybook/cli 10.5.0-beta.1 → 10.5.0
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-dependencies-versions-KP2OSQTJ.js → block-dependencies-versions-OBAIBYDN.js} +11 -11
- package/dist/_node-chunks/{block-experimental-addon-test-7FZKA42S.js → block-experimental-addon-test-QYR3MRDX.js} +9 -9
- package/dist/_node-chunks/{block-major-version-FCT4SHIY.js → block-major-version-WNUMYHSK.js} +9 -9
- package/dist/_node-chunks/{block-node-version-PBGNH6L2.js → block-node-version-J3XXJZ2C.js} +9 -9
- package/dist/_node-chunks/{block-webpack5-frameworks-Z5Q7YMTD.js → block-webpack5-frameworks-JL3TBLP2.js} +11 -11
- package/dist/_node-chunks/{chunk-USVDEBRQ.js → chunk-3Y7SR7U7.js} +15 -15
- package/dist/_node-chunks/chunk-HPD6N3NV.js +11 -0
- package/dist/_node-chunks/{chunk-4K3OSZNA.js → chunk-KZMUQRLC.js} +7 -7
- package/dist/_node-chunks/{chunk-2YYKVFQP.js → chunk-RQMIYONJ.js} +6 -6
- package/dist/_node-chunks/{chunk-I2C6WRRP.js → chunk-Z7PVZEPZ.js} +7 -7
- package/dist/_node-chunks/{globby-4KNQLMLC.js → globby-RO5T24NW.js} +8 -8
- package/dist/_node-chunks/{p-limit-PLWCEDOW.js → p-limit-XVCIN2BU.js} +7 -7
- package/dist/_node-chunks/{run-MMLLYALV.js → run-UOXW6XFP.js} +214 -104
- package/dist/bin/index.js +7 -7
- package/package.json +4 -4
- package/dist/_node-chunks/chunk-E4Y6JUCN.js +0 -11
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_vp9iaavr9ps from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_vp9iaavr9ps from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_vp9iaavr9ps from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_vp9iaavr9ps.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_vp9iaavr9ps.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_vp9iaavr9ps.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-3Y7SR7U7.js";
|
|
15
|
+
import "./chunk-Z7PVZEPZ.js";
|
|
16
|
+
import "./chunk-HPD6N3NV.js";
|
|
17
|
+
import "./chunk-KZMUQRLC.js";
|
|
18
|
+
import "./chunk-RQMIYONJ.js";
|
|
19
19
|
|
|
20
20
|
// src/autoblock/block-dependencies-versions.ts
|
|
21
21
|
import { dedent } from "ts-dedent";
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_vp9iaavr9ps from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_vp9iaavr9ps from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_vp9iaavr9ps from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_vp9iaavr9ps.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_vp9iaavr9ps.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_vp9iaavr9ps.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-HPD6N3NV.js";
|
|
13
13
|
import {
|
|
14
14
|
require_semver
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-KZMUQRLC.js";
|
|
16
16
|
import {
|
|
17
17
|
__toESM
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-RQMIYONJ.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-FCT4SHIY.js → block-major-version-WNUMYHSK.js}
RENAMED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_vp9iaavr9ps from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_vp9iaavr9ps from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_vp9iaavr9ps from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_vp9iaavr9ps.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_vp9iaavr9ps.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_vp9iaavr9ps.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-HPD6N3NV.js";
|
|
13
13
|
import {
|
|
14
14
|
require_semver
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-KZMUQRLC.js";
|
|
16
16
|
import {
|
|
17
17
|
__toESM
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-RQMIYONJ.js";
|
|
19
19
|
|
|
20
20
|
// src/autoblock/block-major-version.ts
|
|
21
21
|
var import_semver = __toESM(require_semver(), 1);
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_vp9iaavr9ps from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_vp9iaavr9ps from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_vp9iaavr9ps from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_vp9iaavr9ps.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_vp9iaavr9ps.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_vp9iaavr9ps.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-HPD6N3NV.js";
|
|
13
13
|
import {
|
|
14
14
|
require_semver
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-KZMUQRLC.js";
|
|
16
16
|
import {
|
|
17
17
|
__toESM
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-RQMIYONJ.js";
|
|
19
19
|
|
|
20
20
|
// src/autoblock/block-node-version.ts
|
|
21
21
|
var import_semver = __toESM(require_semver(), 1);
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_vp9iaavr9ps from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_vp9iaavr9ps from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_vp9iaavr9ps from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_vp9iaavr9ps.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_vp9iaavr9ps.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_vp9iaavr9ps.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-3Y7SR7U7.js";
|
|
15
|
+
import "./chunk-Z7PVZEPZ.js";
|
|
16
|
+
import "./chunk-HPD6N3NV.js";
|
|
17
|
+
import "./chunk-KZMUQRLC.js";
|
|
18
|
+
import "./chunk-RQMIYONJ.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_vp9iaavr9ps from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_vp9iaavr9ps from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_vp9iaavr9ps from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_vp9iaavr9ps.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_vp9iaavr9ps.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_vp9iaavr9ps.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_wig314a5l1.createRequire(import.meta.url);
|
|
|
12
12
|
import {
|
|
13
13
|
globby,
|
|
14
14
|
globbySync
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-Z7PVZEPZ.js";
|
|
16
16
|
import {
|
|
17
17
|
require_semver
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-KZMUQRLC.js";
|
|
19
19
|
import {
|
|
20
20
|
__commonJS,
|
|
21
21
|
__toESM
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-RQMIYONJ.js";
|
|
23
23
|
|
|
24
24
|
// ../../../node_modules/picocolors/picocolors.js
|
|
25
25
|
var require_picocolors = __commonJS({
|
|
@@ -126,11 +126,11 @@ var import_picocolors2 = __toESM(require_picocolors(), 1), import_semver = __toE
|
|
|
126
126
|
// src/autoblock/index.ts
|
|
127
127
|
var blockers = () => [
|
|
128
128
|
// add/remove blockers here
|
|
129
|
-
import("./block-dependencies-versions-
|
|
130
|
-
import("./block-node-version-
|
|
131
|
-
import("./block-webpack5-frameworks-
|
|
132
|
-
import("./block-major-version-
|
|
133
|
-
import("./block-experimental-addon-test-
|
|
129
|
+
import("./block-dependencies-versions-OBAIBYDN.js"),
|
|
130
|
+
import("./block-node-version-J3XXJZ2C.js"),
|
|
131
|
+
import("./block-webpack5-frameworks-JL3TBLP2.js"),
|
|
132
|
+
import("./block-major-version-WNUMYHSK.js"),
|
|
133
|
+
import("./block-experimental-addon-test-QYR3MRDX.js")
|
|
134
134
|
], autoblock = async (options, list = blockers()) => list.length === 0 ? null : await Promise.all(
|
|
135
135
|
list.map(async (i) => {
|
|
136
136
|
let blocker = (await i).blocker;
|
|
@@ -296,7 +296,7 @@ var processProject = async ({
|
|
|
296
296
|
};
|
|
297
297
|
}
|
|
298
298
|
}, collectProjects = async (options, configDirs, onProjectScanStart) => {
|
|
299
|
-
let { default: pLimit } = await import("./p-limit-
|
|
299
|
+
let { default: pLimit } = await import("./p-limit-XVCIN2BU.js"), currentCLIVersion = versions.storybook, limit = pLimit(5), projectPromises = configDirs.map(
|
|
300
300
|
(configDir) => limit(
|
|
301
301
|
() => processProject({
|
|
302
302
|
configDir,
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_vp9iaavr9ps from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_vp9iaavr9ps from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_vp9iaavr9ps from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_vp9iaavr9ps.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_vp9iaavr9ps.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_vp9iaavr9ps.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_vp9iaavr9ps from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_vp9iaavr9ps from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_vp9iaavr9ps from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_vp9iaavr9ps.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_vp9iaavr9ps.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_vp9iaavr9ps.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-RQMIYONJ.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_vp9iaavr9ps from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_vp9iaavr9ps from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_vp9iaavr9ps from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_vp9iaavr9ps.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_vp9iaavr9ps.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_vp9iaavr9ps.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_vp9iaavr9ps from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_vp9iaavr9ps from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_vp9iaavr9ps from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_vp9iaavr9ps.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_vp9iaavr9ps.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_vp9iaavr9ps.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-RQMIYONJ.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_vp9iaavr9ps from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_vp9iaavr9ps from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_vp9iaavr9ps from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_vp9iaavr9ps.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_vp9iaavr9ps.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_vp9iaavr9ps.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-Z7PVZEPZ.js";
|
|
25
|
+
import "./chunk-RQMIYONJ.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_vp9iaavr9ps from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_vp9iaavr9ps from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_vp9iaavr9ps from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_vp9iaavr9ps.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_vp9iaavr9ps.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_vp9iaavr9ps.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-RQMIYONJ.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_vp9iaavr9ps from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_vp9iaavr9ps from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_vp9iaavr9ps from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_vp9iaavr9ps.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_vp9iaavr9ps.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_vp9iaavr9ps.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -26,18 +26,18 @@ import {
|
|
|
26
26
|
up,
|
|
27
27
|
updateMainConfig,
|
|
28
28
|
upgradeStorybookDependencies
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-3Y7SR7U7.js";
|
|
30
30
|
import {
|
|
31
31
|
slash
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-Z7PVZEPZ.js";
|
|
33
33
|
import {
|
|
34
34
|
require_semver
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-KZMUQRLC.js";
|
|
36
36
|
import {
|
|
37
37
|
__commonJS,
|
|
38
38
|
__require,
|
|
39
39
|
__toESM
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-RQMIYONJ.js";
|
|
41
41
|
|
|
42
42
|
// ../../../node_modules/envinfo/dist/envinfo.js
|
|
43
43
|
var require_envinfo = __commonJS({
|
|
@@ -4695,13 +4695,13 @@ var require_cross_spawn = __commonJS({
|
|
|
4695
4695
|
let parsed = parse2(command2, args, options), spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
|
|
4696
4696
|
return enoent.hookChildProcess(spawned, parsed), spawned;
|
|
4697
4697
|
}
|
|
4698
|
-
function
|
|
4698
|
+
function spawnSync5(command2, args, options) {
|
|
4699
4699
|
let parsed = parse2(command2, args, options), result = cp.spawnSync(parsed.command, parsed.args, parsed.options);
|
|
4700
4700
|
return result.error = result.error || enoent.verifyENOENTSync(result.status, parsed), result;
|
|
4701
4701
|
}
|
|
4702
4702
|
module.exports = spawn2;
|
|
4703
4703
|
module.exports.spawn = spawn2;
|
|
4704
|
-
module.exports.sync =
|
|
4704
|
+
module.exports.sync = spawnSync5;
|
|
4705
4705
|
module.exports._parse = parse2;
|
|
4706
4706
|
module.exports._enoent = enoent;
|
|
4707
4707
|
}
|
|
@@ -4761,19 +4761,20 @@ function leven(first, second, options) {
|
|
|
4761
4761
|
var import_picocolors19 = __toESM(require_picocolors(), 1);
|
|
4762
4762
|
|
|
4763
4763
|
// package.json
|
|
4764
|
-
var version = "10.5.0
|
|
4764
|
+
var version = "10.5.0";
|
|
4765
4765
|
|
|
4766
4766
|
// src/add.ts
|
|
4767
4767
|
var import_semver = __toESM(require_semver(), 1);
|
|
4768
4768
|
import { setupAddonInConfig, versions } from "storybook/internal/common";
|
|
4769
4769
|
import { readConfig } from "storybook/internal/csf-tools";
|
|
4770
|
-
import { logger as nodeLogger } from "storybook/internal/node-logger";
|
|
4771
|
-
import { prompt } from "storybook/internal/node-logger";
|
|
4770
|
+
import { logger as nodeLogger, prompt } from "storybook/internal/node-logger";
|
|
4772
4771
|
import { dedent } from "ts-dedent";
|
|
4773
4772
|
|
|
4774
4773
|
// src/postinstallAddon.ts
|
|
4774
|
+
import { spawnSync } from "node:child_process";
|
|
4775
4775
|
import { createRequire as createRequire2 } from "node:module";
|
|
4776
|
-
import {
|
|
4776
|
+
import { join as join2 } from "node:path";
|
|
4777
|
+
import { fileURLToPath as fileURLToPath2, pathToFileURL as pathToFileURL2 } from "node:url";
|
|
4777
4778
|
|
|
4778
4779
|
// ../../core/src/shared/utils/module.ts
|
|
4779
4780
|
import { createRequire, register } from "node:module";
|
|
@@ -5011,24 +5012,39 @@ async function importModule(path4, { skipCache = !1 } = {}) {
|
|
|
5011
5012
|
}
|
|
5012
5013
|
|
|
5013
5014
|
// src/postinstallAddon.ts
|
|
5014
|
-
var DIR_CWD = process.cwd(), require2 = createRequire2(DIR_CWD), postinstallAddon = async (addonName, options) => {
|
|
5015
|
-
let hookPath = `${addonName}/postinstall`, modulePath;
|
|
5015
|
+
var DIR_CWD = process.cwd(), require2 = createRequire2(join2(DIR_CWD, "package.json")), postinstallAddon = async (addonName, options) => {
|
|
5016
|
+
let hookPath = `${addonName}/postinstall`, logger27 = options.logger, modulePath;
|
|
5016
5017
|
try {
|
|
5017
|
-
modulePath =
|
|
5018
|
+
modulePath = require2.resolve(hookPath, { paths: [DIR_CWD] });
|
|
5018
5019
|
} catch {
|
|
5020
|
+
let result = spawnSync(
|
|
5021
|
+
process.execPath,
|
|
5022
|
+
["-p", `require.resolve(${JSON.stringify(hookPath)}, { paths: [process.cwd()] })`],
|
|
5023
|
+
{ cwd: DIR_CWD, encoding: "utf8", timeout: 3e4 }
|
|
5024
|
+
);
|
|
5025
|
+
result.status === 0 && result.stdout.trim() && (modulePath = result.stdout.trim());
|
|
5026
|
+
}
|
|
5027
|
+
if (!modulePath)
|
|
5019
5028
|
try {
|
|
5020
|
-
modulePath =
|
|
5029
|
+
modulePath = import.meta.resolve(hookPath);
|
|
5021
5030
|
} catch {
|
|
5031
|
+
logger27.warn(
|
|
5032
|
+
`Could not resolve the postinstall hook of ${addonName}, skipping its configuration. Run \`npx storybook add ${addonName}\` to set it up manually.`
|
|
5033
|
+
);
|
|
5022
5034
|
return;
|
|
5023
5035
|
}
|
|
5024
|
-
|
|
5025
|
-
let moduledLoaded;
|
|
5036
|
+
let moduleFilePath = modulePath.startsWith("file:") ? fileURLToPath2(modulePath) : modulePath, moduledLoaded;
|
|
5026
5037
|
try {
|
|
5027
|
-
moduledLoaded = await import(
|
|
5028
|
-
} catch {
|
|
5038
|
+
moduledLoaded = await import(pathToFileURL2(moduleFilePath).href).catch(() => importModule(moduleFilePath)).catch(() => require2(moduleFilePath)).catch(() => import(hookPath)).catch(() => importModule(hookPath)).catch(() => require2(hookPath));
|
|
5039
|
+
} catch (e) {
|
|
5040
|
+
logger27.warn(
|
|
5041
|
+
`Could not load the postinstall hook of ${addonName} (${String(
|
|
5042
|
+
e
|
|
5043
|
+
)}), skipping its configuration. Run \`npx storybook add ${addonName}\` to set it up manually.`
|
|
5044
|
+
);
|
|
5029
5045
|
return;
|
|
5030
5046
|
}
|
|
5031
|
-
let postinstall = moduledLoaded?.default || moduledLoaded?.postinstall || moduledLoaded
|
|
5047
|
+
let postinstall = moduledLoaded?.default || moduledLoaded?.postinstall || moduledLoaded;
|
|
5032
5048
|
if (!postinstall || typeof postinstall != "function") {
|
|
5033
5049
|
logger27.error(`Error finding postinstall function for ${addonName}`);
|
|
5034
5050
|
return;
|
|
@@ -5063,7 +5079,8 @@ async function add(addon, {
|
|
|
5063
5079
|
}, logger27 = nodeLogger) {
|
|
5064
5080
|
let [addonName, inputVersion] = getVersionSpecifier(addon), { mainConfig, mainConfigPath, configDir, previewConfigPath, packageManager } = await getStorybookData({
|
|
5065
5081
|
configDir: userSpecifiedConfigDir,
|
|
5066
|
-
packageManagerName: pkgMgr
|
|
5082
|
+
packageManagerName: pkgMgr,
|
|
5083
|
+
skipCache: !0
|
|
5067
5084
|
});
|
|
5068
5085
|
if (typeof configDir > "u")
|
|
5069
5086
|
throw new Error(dedent`
|
|
@@ -5661,7 +5678,7 @@ import { logger as logger3 } from "storybook/internal/node-logger";
|
|
|
5661
5678
|
import { promises as fs } from "fs";
|
|
5662
5679
|
var maxConcurrentTasks = Math.max(1, os.cpus().length - 1);
|
|
5663
5680
|
async function runCodemod(globPattern = "**/*.{stories,story}.{js,jsx,ts,tsx,mjs,mjsx,mts,mtsx}", transform, { dryRun = !1, skipFormatting = !1 } = {}) {
|
|
5664
|
-
let modifiedCount = 0, unmodifiedCount = 0, errorCount = 0, { globby } = await import("./globby-
|
|
5681
|
+
let modifiedCount = 0, unmodifiedCount = 0, errorCount = 0, { globby } = await import("./globby-RO5T24NW.js"), files = await globby(slash(globPattern), {
|
|
5665
5682
|
followSymbolicLinks: !0,
|
|
5666
5683
|
ignore: ["**/node_modules/**", "**/dist/**", "**/storybook-static/**", "**/build/**"]
|
|
5667
5684
|
});
|
|
@@ -5672,7 +5689,7 @@ Please try a different pattern.
|
|
|
5672
5689
|
`
|
|
5673
5690
|
), new Error("No files matched");
|
|
5674
5691
|
try {
|
|
5675
|
-
let pLimit = (await import("./p-limit-
|
|
5692
|
+
let pLimit = (await import("./p-limit-XVCIN2BU.js")).default, limit = pLimit(maxConcurrentTasks);
|
|
5676
5693
|
await Promise.all(
|
|
5677
5694
|
files.map(
|
|
5678
5695
|
(file) => limit(async () => {
|
|
@@ -6235,12 +6252,20 @@ var fileExtensions = [
|
|
|
6235
6252
|
let addons = getAddonNames(mainConfig), frameworkPackageName = getFrameworkPackageName(mainConfig), hasA11yAddon = !!addons.find((addon) => addon.includes("@storybook/addon-a11y")), hasTestAddon = !!addons.find((addon) => addon.includes("@storybook/addon-vitest"));
|
|
6236
6253
|
if (!Object.keys(frameworkPackages3).find((framework) => frameworkPackageName?.includes(framework)) || !hasA11yAddon || !hasTestAddon || !configDir)
|
|
6237
6254
|
return null;
|
|
6238
|
-
let vitestSetupFile = fileExtensions.map((ext) => path3.join(configDir, `vitest.setup${ext}`)).find((filePath) => existsSync(filePath)) ?? null, previewFile = fileExtensions.map((ext) => path3.join(configDir, `preview${ext}`)).find((filePath) => existsSync(filePath)) ?? null, skipVitestSetupTransformation = hasCsfFactoryPreview, skipPreviewTransformation = !1;
|
|
6239
|
-
if (vitestSetupFile &&
|
|
6240
|
-
|
|
6241
|
-
|
|
6242
|
-
|
|
6243
|
-
|
|
6255
|
+
let vitestSetupFile = fileExtensions.map((ext) => path3.join(configDir, `vitest.setup${ext}`)).find((filePath) => existsSync(filePath)) ?? null, previewFile = fileExtensions.map((ext) => path3.join(configDir, `preview${ext}`)).find((filePath) => existsSync(filePath)) ?? null, skipVitestSetupTransformation = hasCsfFactoryPreview || !vitestSetupFile, skipPreviewTransformation = !1;
|
|
6256
|
+
if (vitestSetupFile && !skipVitestSetupTransformation)
|
|
6257
|
+
try {
|
|
6258
|
+
skipVitestSetupTransformation = readFileSync(vitestSetupFile, "utf8").includes("@storybook/addon-a11y");
|
|
6259
|
+
} catch {
|
|
6260
|
+
}
|
|
6261
|
+
if (previewFile)
|
|
6262
|
+
try {
|
|
6263
|
+
let previewSetupSource = readFileSync(previewFile, "utf8");
|
|
6264
|
+
skipPreviewTransformation = !shouldPreviewFileBeTransformed(previewSetupSource);
|
|
6265
|
+
} catch {
|
|
6266
|
+
}
|
|
6267
|
+
if (skipVitestSetupTransformation && skipPreviewTransformation)
|
|
6268
|
+
return null;
|
|
6244
6269
|
let getTransformedSetupCode = () => {
|
|
6245
6270
|
if (!vitestSetupFile || skipVitestSetupTransformation)
|
|
6246
6271
|
return null;
|
|
@@ -6356,17 +6381,23 @@ function shouldPreviewFileBeTransformed(source) {
|
|
|
6356
6381
|
// src/automigrate/fixes/angular-to-angular-vite.ts
|
|
6357
6382
|
import { readFile, writeFile } from "node:fs/promises";
|
|
6358
6383
|
import { types as t5 } from "storybook/internal/babel";
|
|
6384
|
+
import {
|
|
6385
|
+
AngularJSON,
|
|
6386
|
+
editJsonText,
|
|
6387
|
+
isStorybookTarget
|
|
6388
|
+
} from "storybook/internal/cli";
|
|
6359
6389
|
import { formatFileContent as formatFileContent4, getProjectRoot, transformImportFiles } from "storybook/internal/common";
|
|
6390
|
+
import { formatConfig as formatConfig2, readConfig as readConfig2 } from "storybook/internal/csf-tools";
|
|
6360
6391
|
import { logger as logger7, prompt as prompt3 } from "storybook/internal/node-logger";
|
|
6361
6392
|
|
|
6362
6393
|
// ../../../node_modules/empathic/find.mjs
|
|
6363
|
-
import { join as
|
|
6394
|
+
import { join as join3 } from "node:path";
|
|
6364
6395
|
import { existsSync as existsSync2, statSync } from "node:fs";
|
|
6365
6396
|
function any(names, options) {
|
|
6366
6397
|
let dir, start = options && options.cwd || "", j = 0, len = names.length, tmp;
|
|
6367
6398
|
for (dir of up(start, options))
|
|
6368
6399
|
for (j = 0; j < len; j++)
|
|
6369
|
-
if (tmp =
|
|
6400
|
+
if (tmp = join3(dir, names[j]), existsSync2(tmp)) return tmp;
|
|
6370
6401
|
}
|
|
6371
6402
|
|
|
6372
6403
|
// src/automigrate/fixes/angular-to-angular-vite.ts
|
|
@@ -6427,29 +6458,83 @@ export default defineConfig({
|
|
|
6427
6458
|
} catch (error) {
|
|
6428
6459
|
return logger7.error(`Failed to update main config at ${mainConfigPath}: ${error}`), !1;
|
|
6429
6460
|
}
|
|
6430
|
-
},
|
|
6431
|
-
|
|
6461
|
+
}, rewriteStorybookBuilderRef = (ref) => ref === `${ANGULAR_PACKAGE}:start-storybook` ? `${ANGULAR_VITE_PACKAGE}:start-storybook` : ref === `${ANGULAR_PACKAGE}:build-storybook` ? `${ANGULAR_VITE_PACKAGE}:build-storybook` : null, TextJsonEditor = class {
|
|
6462
|
+
constructor(content) {
|
|
6463
|
+
this.content = content;
|
|
6464
|
+
}
|
|
6465
|
+
edit(path4, value) {
|
|
6466
|
+
this.content = editJsonText(this.content, path4, value);
|
|
6467
|
+
}
|
|
6468
|
+
}, processStorybookTargets = (editor, targetGroups) => {
|
|
6469
|
+
let changed = !1, disablesCompodoc = !1, hasStorybookTarget = !1, allZonelessTrue = !0;
|
|
6470
|
+
for (let { pathPrefix, targets } of targetGroups)
|
|
6471
|
+
for (let [targetName, target] of Object.entries(targets)) {
|
|
6472
|
+
if (!isStorybookTarget(target))
|
|
6473
|
+
continue;
|
|
6474
|
+
hasStorybookTarget = !0;
|
|
6475
|
+
let currentRef = target.builder ?? target.executor ?? null, compodocDisabled = target.options?.compodoc === !1, hasOldZonelessKey = !!target.options && "experimentalZoneless" in target.options, zonelessValue = target.options?.experimentalZoneless;
|
|
6476
|
+
compodocDisabled && (disablesCompodoc = !0), zonelessValue !== !0 && (allZonelessTrue = !1);
|
|
6477
|
+
let newRef = currentRef ? rewriteStorybookBuilderRef(currentRef) : null;
|
|
6478
|
+
if (newRef) {
|
|
6479
|
+
let refKey = "builder" in target ? "builder" : "executor";
|
|
6480
|
+
editor.edit([...pathPrefix, targetName, refKey], newRef), changed = !0;
|
|
6481
|
+
}
|
|
6482
|
+
hasOldZonelessKey && (editor.edit([...pathPrefix, targetName, "options", "zoneless"], zonelessValue), editor.edit([...pathPrefix, targetName, "options", "experimentalZoneless"], void 0), changed = !0);
|
|
6483
|
+
}
|
|
6484
|
+
return { changed, disablesCompodoc, hasStorybookTarget, allZonelessTrue };
|
|
6485
|
+
}, transformAngularJson = (angularJsonPath, dryRun) => {
|
|
6486
|
+
let angularJSON;
|
|
6432
6487
|
try {
|
|
6433
|
-
|
|
6488
|
+
angularJSON = new AngularJSON(angularJsonPath);
|
|
6434
6489
|
} catch {
|
|
6435
|
-
return
|
|
6490
|
+
return {
|
|
6491
|
+
changed: !1,
|
|
6492
|
+
disablesCompodoc: !1,
|
|
6493
|
+
hasStorybookTarget: !1,
|
|
6494
|
+
allStorybookTargetsZonelessTrue: !0
|
|
6495
|
+
};
|
|
6436
6496
|
}
|
|
6437
|
-
let
|
|
6438
|
-
|
|
6439
|
-
|
|
6440
|
-
},
|
|
6441
|
-
|
|
6442
|
-
|
|
6443
|
-
|
|
6444
|
-
|
|
6445
|
-
|
|
6446
|
-
|
|
6447
|
-
},
|
|
6497
|
+
let targetGroups = Object.entries(angularJSON.projects).filter(([, project]) => project?.architect && typeof project.architect == "object").map(([projectName, project]) => ({
|
|
6498
|
+
pathPrefix: ["projects", projectName, "architect"],
|
|
6499
|
+
targets: project.architect
|
|
6500
|
+
})), { changed, disablesCompodoc, hasStorybookTarget, allZonelessTrue } = processStorybookTargets(angularJSON, targetGroups);
|
|
6501
|
+
return changed && !dryRun && angularJSON.write(), {
|
|
6502
|
+
changed,
|
|
6503
|
+
disablesCompodoc,
|
|
6504
|
+
hasStorybookTarget,
|
|
6505
|
+
allStorybookTargetsZonelessTrue: allZonelessTrue
|
|
6506
|
+
};
|
|
6507
|
+
}, transformProjectJson = async (projectJsonPath, dryRun) => {
|
|
6448
6508
|
try {
|
|
6449
|
-
let
|
|
6450
|
-
return changed && !dryRun && await writeFile(
|
|
6509
|
+
let original = await readFile(projectJsonPath, "utf-8"), targets = JSON.parse(original)?.targets, editor = new TextJsonEditor(original), targetGroups = targets && typeof targets == "object" ? [{ pathPrefix: ["targets"], targets }] : [], { changed, disablesCompodoc, hasStorybookTarget, allZonelessTrue } = processStorybookTargets(editor, targetGroups);
|
|
6510
|
+
return changed && !dryRun && await writeFile(projectJsonPath, editor.content), {
|
|
6511
|
+
changed,
|
|
6512
|
+
disablesCompodoc,
|
|
6513
|
+
hasStorybookTarget,
|
|
6514
|
+
allStorybookTargetsZonelessTrue: allZonelessTrue
|
|
6515
|
+
};
|
|
6451
6516
|
} catch {
|
|
6452
|
-
return {
|
|
6517
|
+
return {
|
|
6518
|
+
changed: !1,
|
|
6519
|
+
disablesCompodoc: !1,
|
|
6520
|
+
hasStorybookTarget: !1,
|
|
6521
|
+
allStorybookTargetsZonelessTrue: !0
|
|
6522
|
+
};
|
|
6523
|
+
}
|
|
6524
|
+
}, addZoneJsPreviewImport = async (previewConfigPath, dryRun) => {
|
|
6525
|
+
try {
|
|
6526
|
+
let preview = await readConfig2(previewConfigPath);
|
|
6527
|
+
if (preview._ast.program.body.some(
|
|
6528
|
+
(node) => t5.isImportDeclaration(node) && typeof node.source.value == "string" && (node.source.value === "zone.js" || node.source.value.startsWith("zone.js/"))
|
|
6529
|
+
) || dryRun)
|
|
6530
|
+
return;
|
|
6531
|
+
preview.setImport(null, "zone.js");
|
|
6532
|
+
let formatted = await formatFileContent4(previewConfigPath, formatConfig2(preview));
|
|
6533
|
+
await writeFile(previewConfigPath, formatted), logger7.step(`Added a \`zone.js\` import to ${previewConfigPath}`);
|
|
6534
|
+
} catch (error) {
|
|
6535
|
+
logger7.warn(
|
|
6536
|
+
`Could not add a \`zone.js\` import to ${previewConfigPath} automatically: ${error}. If your app uses zone-based change detection, add \`import 'zone.js';\` at the top of your preview.`
|
|
6537
|
+
);
|
|
6453
6538
|
}
|
|
6454
6539
|
}, setFrameworkCompodocFalse = (main) => {
|
|
6455
6540
|
let frameworkNode = main.getFieldNode(["framework"]);
|
|
@@ -6515,6 +6600,7 @@ export default defineConfig({
|
|
|
6515
6600
|
result,
|
|
6516
6601
|
dryRun = !1,
|
|
6517
6602
|
mainConfigPath,
|
|
6603
|
+
previewConfigPath,
|
|
6518
6604
|
storiesPaths,
|
|
6519
6605
|
configDir,
|
|
6520
6606
|
packageManager,
|
|
@@ -6550,21 +6636,29 @@ export default defineConfig({
|
|
|
6550
6636
|
);
|
|
6551
6637
|
return;
|
|
6552
6638
|
}
|
|
6553
|
-
logger7.step(`Migrating from ${ANGULAR_PACKAGE} to ${ANGULAR_VITE_PACKAGE}...`), dryRun
|
|
6554
|
-
|
|
6555
|
-
|
|
6556
|
-
|
|
6639
|
+
if (logger7.step(`Migrating from ${ANGULAR_PACKAGE} to ${ANGULAR_VITE_PACKAGE}...`), dryRun)
|
|
6640
|
+
logger7.debug("Dry run: Skipping dependency updates.");
|
|
6641
|
+
else {
|
|
6642
|
+
logger7.debug("Updating dependencies..."), await packageManager.removeDependencies([ANGULAR_PACKAGE]);
|
|
6643
|
+
let allDeps = packageManager.getAllDependencies();
|
|
6644
|
+
await packageManager.addDependencies({ type: "devDependencies", skipInstall: !0 }, [
|
|
6645
|
+
`${ANGULAR_VITE_PACKAGE}@${storybookVersion}`,
|
|
6646
|
+
...allDeps["@analogjs/vite-plugin-angular"] ? [] : ["@analogjs/vite-plugin-angular"]
|
|
6647
|
+
]);
|
|
6648
|
+
}
|
|
6649
|
+
mainConfigPath && (logger7.debug("Updating main config..."), await transformMainConfig(mainConfigPath, dryRun));
|
|
6650
|
+
let disableCompodoc = !1, anyStorybookTarget = !1, allZonelessTrue = !0;
|
|
6557
6651
|
for (let pkgJsonPath of packageManager.packageJsonPaths) {
|
|
6558
|
-
let angularJsonPath = `${pkgJsonPath.replace(/[/\\]package\.json$/, "")}/angular.json`, { changed, disablesCompodoc } =
|
|
6559
|
-
disableCompodoc ||= disablesCompodoc, changed && logger7.debug(`Updated Angular CLI builder references in ${angularJsonPath}`);
|
|
6652
|
+
let angularJsonPath = `${pkgJsonPath.replace(/[/\\]package\.json$/, "")}/angular.json`, { changed, disablesCompodoc, hasStorybookTarget, allStorybookTargetsZonelessTrue } = transformAngularJson(angularJsonPath, dryRun);
|
|
6653
|
+
disableCompodoc ||= disablesCompodoc, hasStorybookTarget && (anyStorybookTarget = !0, allZonelessTrue = allZonelessTrue && allStorybookTargetsZonelessTrue), changed && logger7.debug(`Updated Angular CLI builder references in ${angularJsonPath}`);
|
|
6560
6654
|
}
|
|
6561
|
-
let { globby } = await import("./globby-
|
|
6655
|
+
let { globby } = await import("./globby-RO5T24NW.js"), projectJsonFiles = await globby(["**/project.json"], {
|
|
6562
6656
|
ignore: ["**/node_modules/**", "**/dist/**"],
|
|
6563
6657
|
absolute: !0
|
|
6564
6658
|
});
|
|
6565
6659
|
for (let projectJsonPath of projectJsonFiles) {
|
|
6566
|
-
let { changed, disablesCompodoc } = await
|
|
6567
|
-
disableCompodoc ||= disablesCompodoc, changed && logger7.debug(`Updated Nx builder references in ${projectJsonPath}`);
|
|
6660
|
+
let { changed, disablesCompodoc, hasStorybookTarget, allStorybookTargetsZonelessTrue } = await transformProjectJson(projectJsonPath, dryRun);
|
|
6661
|
+
disableCompodoc ||= disablesCompodoc, hasStorybookTarget && (anyStorybookTarget = !0, allZonelessTrue = allZonelessTrue && allStorybookTargetsZonelessTrue), changed && logger7.debug(`Updated Nx builder references in ${projectJsonPath}`);
|
|
6568
6662
|
}
|
|
6569
6663
|
for (let pkgJsonPath of packageManager.packageJsonPaths)
|
|
6570
6664
|
try {
|
|
@@ -6583,7 +6677,10 @@ export default defineConfig({
|
|
|
6583
6677
|
`Could not set \`framework.options.compodoc\` automatically: ${error}. Set \`compodoc: false\` in your main config's framework.options manually.`
|
|
6584
6678
|
);
|
|
6585
6679
|
}
|
|
6586
|
-
|
|
6680
|
+
let needsZoneJs = anyStorybookTarget && !allZonelessTrue;
|
|
6681
|
+
needsZoneJs && previewConfigPath ? await addZoneJsPreviewImport(previewConfigPath, dryRun) : needsZoneJs && !previewConfigPath && logger7.warn(
|
|
6682
|
+
"Could not find a Storybook preview file to add the zone.js import to. If your app uses zone-based change detection, add `import 'zone.js';` at the top of your preview file manually."
|
|
6683
|
+
), logger7.debug("Scanning and updating import statements...");
|
|
6587
6684
|
let configFiles = configDir ? await globby([`${configDir}/**/*`]) : [], allFiles = [...storiesPaths, ...configFiles].filter(Boolean), transformErrors = await transformImportFiles(
|
|
6588
6685
|
allFiles,
|
|
6589
6686
|
{ [ANGULAR_PACKAGE]: ANGULAR_VITE_PACKAGE },
|
|
@@ -6796,7 +6893,7 @@ var addonA11yParameters = {
|
|
|
6796
6893
|
errors.push({ file: previewFileToUpdate, error });
|
|
6797
6894
|
}
|
|
6798
6895
|
}
|
|
6799
|
-
let { default: pLimit } = await import("./p-limit-
|
|
6896
|
+
let { default: pLimit } = await import("./p-limit-XVCIN2BU.js"), limit = pLimit(10);
|
|
6800
6897
|
if (await Promise.all(
|
|
6801
6898
|
storyFilesToUpdate.map(
|
|
6802
6899
|
(file) => limit(async () => {
|
|
@@ -6861,7 +6958,7 @@ var addonExperimentalTest = {
|
|
|
6861
6958
|
// src/automigrate/fixes/addon-globals-api.ts
|
|
6862
6959
|
import { readFile as readFile3, writeFile as writeFile2 } from "node:fs/promises";
|
|
6863
6960
|
import { types as t8 } from "storybook/internal/babel";
|
|
6864
|
-
import { formatConfig as
|
|
6961
|
+
import { formatConfig as formatConfig3, loadConfig as loadConfig4, loadCsf as loadCsf3, writeCsf as writeCsf2 } from "storybook/internal/csf-tools";
|
|
6865
6962
|
var addonGlobalsApi = {
|
|
6866
6963
|
id: "addon-globals-api",
|
|
6867
6964
|
link: "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#viewportbackgrounds-addon-synchronized-configuration-and-globals-usage",
|
|
@@ -6937,7 +7034,7 @@ var addonGlobalsApi = {
|
|
|
6937
7034
|
t8.booleanLiteral(!0)
|
|
6938
7035
|
));
|
|
6939
7036
|
}
|
|
6940
|
-
dryRun || await writeFile2(result.previewConfigPath,
|
|
7037
|
+
dryRun || await writeFile2(result.previewConfigPath, formatConfig3(previewConfig)), (needsViewportMigration || needsBackgroundsMigration) && await transformStoryFiles(
|
|
6941
7038
|
storiesPaths,
|
|
6942
7039
|
{
|
|
6943
7040
|
needsViewportMigration,
|
|
@@ -6950,7 +7047,7 @@ var addonGlobalsApi = {
|
|
|
6950
7047
|
}
|
|
6951
7048
|
};
|
|
6952
7049
|
async function transformStoryFiles(files, options, dryRun) {
|
|
6953
|
-
let errors = [], { default: pLimit } = await import("./p-limit-
|
|
7050
|
+
let errors = [], { default: pLimit } = await import("./p-limit-XVCIN2BU.js"), limit = pLimit(10);
|
|
6954
7051
|
return await Promise.all(
|
|
6955
7052
|
files.map(
|
|
6956
7053
|
(file) => limit(async () => {
|
|
@@ -7177,7 +7274,7 @@ function transformPackageJson(content) {
|
|
|
7177
7274
|
return hasChanges ? JSON.stringify(packageJson, null, 2) : null;
|
|
7178
7275
|
}
|
|
7179
7276
|
var transformPackageJsonFiles = async (files, dryRun) => {
|
|
7180
|
-
let errors = [], { default: pLimit } = await import("./p-limit-
|
|
7277
|
+
let errors = [], { default: pLimit } = await import("./p-limit-XVCIN2BU.js"), limit = pLimit(10);
|
|
7181
7278
|
return await Promise.all(
|
|
7182
7279
|
files.map(
|
|
7183
7280
|
(file) => limit(async () => {
|
|
@@ -7216,7 +7313,7 @@ var transformPackageJsonFiles = async (files, dryRun) => {
|
|
|
7216
7313
|
dryRun
|
|
7217
7314
|
);
|
|
7218
7315
|
errors.push(...packageJsonErrors);
|
|
7219
|
-
let { globby } = await import("./globby-
|
|
7316
|
+
let { globby } = await import("./globby-RO5T24NW.js"), configFiles = await globby([`${configDir}/**/*`]), importErrors = await transformImportFiles2(
|
|
7220
7317
|
[...storiesPaths, ...configFiles].filter(Boolean),
|
|
7221
7318
|
{
|
|
7222
7319
|
...consolidatedPackages,
|
|
@@ -7378,7 +7475,7 @@ var fixFauxEsmRequire = {
|
|
|
7378
7475
|
// src/automigrate/fixes/initial-globals.ts
|
|
7379
7476
|
var import_picocolors11 = __toESM(require_picocolors(), 1);
|
|
7380
7477
|
import { readFile as readFile6, writeFile as writeFile5 } from "node:fs/promises";
|
|
7381
|
-
import { formatConfig as
|
|
7478
|
+
import { formatConfig as formatConfig4, loadConfig as loadConfig5 } from "storybook/internal/csf-tools";
|
|
7382
7479
|
var initialGlobals = {
|
|
7383
7480
|
id: "initial-globals",
|
|
7384
7481
|
link: "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#previewjs-globals-renamed-to-initialglobals",
|
|
@@ -7392,7 +7489,7 @@ var initialGlobals = {
|
|
|
7392
7489
|
return `Rename ${import_picocolors11.default.cyan("globals")} to ${import_picocolors11.default.cyan("initialGlobals")} in preview.js?`;
|
|
7393
7490
|
},
|
|
7394
7491
|
async run({ dryRun, result }) {
|
|
7395
|
-
result.previewConfig.removeField(["globals"]), result.previewConfig.setFieldNode(["initialGlobals"], result.globals), dryRun || await writeFile5(result.previewConfigPath,
|
|
7492
|
+
result.previewConfig.removeField(["globals"]), result.previewConfig.setFieldNode(["initialGlobals"], result.globals), dryRun || await writeFile5(result.previewConfigPath, formatConfig4(result.previewConfig));
|
|
7396
7493
|
}
|
|
7397
7494
|
};
|
|
7398
7495
|
|
|
@@ -7400,7 +7497,7 @@ var initialGlobals = {
|
|
|
7400
7497
|
import { readFileSync as readFileSync3, writeFileSync as writeFileSync3 } from "node:fs";
|
|
7401
7498
|
import { types as t10 } from "storybook/internal/babel";
|
|
7402
7499
|
import { formatFileContent as formatFileContent5, getAddonNames as getAddonNames5, removeAddon as removeAddon3 } from "storybook/internal/common";
|
|
7403
|
-
import { formatConfig as
|
|
7500
|
+
import { formatConfig as formatConfig5, loadConfig as loadConfig6 } from "storybook/internal/csf-tools";
|
|
7404
7501
|
import { logger as logger12 } from "storybook/internal/node-logger";
|
|
7405
7502
|
var migrateAddonConsole = {
|
|
7406
7503
|
id: "migrate-addon-console",
|
|
@@ -7503,7 +7600,7 @@ async function transformPreviewFile2(source, filePath) {
|
|
|
7503
7600
|
t10.returnStatement(functionBody)
|
|
7504
7601
|
]);
|
|
7505
7602
|
}
|
|
7506
|
-
return formatFileContent5(filePath,
|
|
7603
|
+
return formatFileContent5(filePath, formatConfig5(previewConfig));
|
|
7507
7604
|
}
|
|
7508
7605
|
|
|
7509
7606
|
// src/automigrate/fixes/nextjs-to-nextjs-vite.ts
|
|
@@ -7572,7 +7669,7 @@ var VITE_DEFAULT_VERSION = "^7.0.0", transformMainConfig2 = async (mainConfigPat
|
|
|
7572
7669
|
]);
|
|
7573
7670
|
}
|
|
7574
7671
|
mainConfigPath && (logger13.debug("Updating main config file..."), await transformMainConfig2(mainConfigPath, dryRun)), logger13.debug("Scanning and updating import statements...");
|
|
7575
|
-
let { globby } = await import("./globby-
|
|
7672
|
+
let { globby } = await import("./globby-RO5T24NW.js"), configFiles = await globby([`${configDir}/**/*`]), allFiles = [...storiesPaths, ...configFiles].filter(Boolean), transformErrors = await transformImportFiles3(
|
|
7576
7673
|
allFiles,
|
|
7577
7674
|
{
|
|
7578
7675
|
"@storybook/nextjs": "@storybook/nextjs-vite"
|
|
@@ -7650,7 +7747,7 @@ var REACT_VITE_PACKAGE = "@storybook/react-vite", TANSTACK_REACT_PACKAGE = "@sto
|
|
|
7650
7747
|
configDir,
|
|
7651
7748
|
storiesPaths
|
|
7652
7749
|
}) => {
|
|
7653
|
-
let { globby } = await import("./globby-
|
|
7750
|
+
let { globby } = await import("./globby-RO5T24NW.js"), configFiles = configDir ? await globby([`${configDir}/**/*.{ts,tsx,js,jsx,mjs,cjs}`], {
|
|
7654
7751
|
ignore: ["**/node_modules/**", "**/dist/**"]
|
|
7655
7752
|
}) : [], candidateFiles = Array.from(
|
|
7656
7753
|
/* @__PURE__ */ new Set([...previewConfigPath ? [previewConfigPath] : [], ...configFiles, ...storiesPaths])
|
|
@@ -7869,7 +7966,7 @@ var REACT_VITE_PACKAGE = "@storybook/react-vite", TANSTACK_REACT_PACKAGE = "@sto
|
|
|
7869
7966
|
logger14.step(`Migrating from ${REACT_VITE_PACKAGE} to ${TANSTACK_REACT_PACKAGE}...`), dryRun ? logger14.debug("Dry run: Skipping package.json updates.") : (logger14.debug("Updating package.json files..."), await packageManager.removeDependencies([REACT_VITE_PACKAGE]), await packageManager.addDependencies({ type: "devDependencies", skipInstall: !0 }, [
|
|
7870
7967
|
`${TANSTACK_REACT_PACKAGE}@${storybookVersion}`
|
|
7871
7968
|
])), mainConfigPath && (logger14.debug("Updating main config file..."), await transformMainConfig3(mainConfigPath, dryRun)), logger14.debug("Scanning and updating import statements...");
|
|
7872
|
-
let { globby } = await import("./globby-
|
|
7969
|
+
let { globby } = await import("./globby-RO5T24NW.js"), configFiles = configDir ? await globby([`${configDir}/**/*.{ts,tsx,js,jsx,mjs,cjs}`], {
|
|
7873
7970
|
ignore: ["**/node_modules/**", "**/dist/**"]
|
|
7874
7971
|
}) : [], allFiles = [...storiesPaths, ...configFiles, previewConfigPath].filter(
|
|
7875
7972
|
Boolean
|
|
@@ -7939,7 +8036,7 @@ var removeAddonInteractions = {
|
|
|
7939
8036
|
// src/automigrate/fixes/remove-docs-autodocs.ts
|
|
7940
8037
|
var import_picocolors13 = __toESM(require_picocolors(), 1);
|
|
7941
8038
|
import { Tag } from "storybook/internal/core-server";
|
|
7942
|
-
import { readConfig as
|
|
8039
|
+
import { readConfig as readConfig3 } from "storybook/internal/csf-tools";
|
|
7943
8040
|
var logger15 = {
|
|
7944
8041
|
log: (message) => {
|
|
7945
8042
|
process.env.NODE_ENV !== "test" && console.log(message);
|
|
@@ -7951,7 +8048,7 @@ var logger15 = {
|
|
|
7951
8048
|
if (!mainConfigPath)
|
|
7952
8049
|
return null;
|
|
7953
8050
|
try {
|
|
7954
|
-
let autodocs = (await
|
|
8051
|
+
let autodocs = (await readConfig3(mainConfigPath)).getSafeFieldValue(["docs", "autodocs"]);
|
|
7955
8052
|
return autodocs === void 0 ? null : {
|
|
7956
8053
|
autodocs
|
|
7957
8054
|
};
|
|
@@ -8110,7 +8207,7 @@ var getAllDependencies = (packageJson) => Object.keys({
|
|
|
8110
8207
|
let regex = new RegExp(`(['"])${renderer}(['"])`, "g");
|
|
8111
8208
|
return regex.test(source) ? source.replace(regex, `$1${framework}$2`) : null;
|
|
8112
8209
|
}, transformSourceFiles = async (files, renderer, framework, dryRun) => {
|
|
8113
|
-
let errors = [], { default: pLimit } = await import("./p-limit-
|
|
8210
|
+
let errors = [], { default: pLimit } = await import("./p-limit-XVCIN2BU.js"), limit = pLimit(10);
|
|
8114
8211
|
return await Promise.all(
|
|
8115
8212
|
files.map(
|
|
8116
8213
|
(file) => limit(async () => {
|
|
@@ -8177,7 +8274,7 @@ var getAllDependencies = (packageJson) => Object.keys({
|
|
|
8177
8274
|
continue;
|
|
8178
8275
|
logger16.debug(`
|
|
8179
8276
|
Migrating ${rendererPackage} to ${selectedFramework}`);
|
|
8180
|
-
let { globby } = await import("./globby-
|
|
8277
|
+
let { globby } = await import("./globby-RO5T24NW.js"), configFiles = await globby([`${configDir}/**/*`]);
|
|
8181
8278
|
await transformSourceFiles(
|
|
8182
8279
|
[...storiesPaths, ...configFiles].filter(Boolean),
|
|
8183
8280
|
rendererPackage,
|
|
@@ -8194,7 +8291,7 @@ Migrating ${rendererPackage} to ${selectedFramework}`);
|
|
|
8194
8291
|
|
|
8195
8292
|
// src/automigrate/fixes/rn-ondevice-addons-to-device-addons.ts
|
|
8196
8293
|
import { existsSync as existsSync3 } from "node:fs";
|
|
8197
|
-
import { basename as basename2, dirname as dirname2, isAbsolute as isAbsolute2, join as
|
|
8294
|
+
import { basename as basename2, dirname as dirname2, isAbsolute as isAbsolute2, join as join4, resolve as resolve2 } from "node:path";
|
|
8198
8295
|
import { findConfigFile, loadMainConfig } from "storybook/internal/common";
|
|
8199
8296
|
import { logger as logger17 } from "storybook/internal/node-logger";
|
|
8200
8297
|
|
|
@@ -8202,14 +8299,14 @@ import { logger as logger17 } from "storybook/internal/node-logger";
|
|
|
8202
8299
|
var RN_STORYBOOK_DIR = ".rnstorybook";
|
|
8203
8300
|
|
|
8204
8301
|
// src/automigrate/fixes/rn-ondevice-addons-to-device-addons.ts
|
|
8205
|
-
var resolveAbsoluteConfigDir = (configDir) => isAbsolute2(configDir) ? configDir :
|
|
8302
|
+
var resolveAbsoluteConfigDir = (configDir) => isAbsolute2(configDir) ? configDir : join4(process.cwd(), configDir), getSiblingStorybookConfigDir = (configDirAbs) => {
|
|
8206
8303
|
let base = basename2(configDirAbs), parent = dirname2(configDirAbs);
|
|
8207
8304
|
if (base === ".storybook") {
|
|
8208
|
-
let rn =
|
|
8305
|
+
let rn = join4(parent, RN_STORYBOOK_DIR);
|
|
8209
8306
|
return existsSync3(rn) ? rn : null;
|
|
8210
8307
|
}
|
|
8211
8308
|
if (base === RN_STORYBOOK_DIR) {
|
|
8212
|
-
let web =
|
|
8309
|
+
let web = join4(parent, ".storybook");
|
|
8213
8310
|
return existsSync3(web) ? web : null;
|
|
8214
8311
|
}
|
|
8215
8312
|
return null;
|
|
@@ -8271,7 +8368,7 @@ var resolveAbsoluteConfigDir = (configDir) => isAbsolute2(configDir) ? configDir
|
|
|
8271
8368
|
// src/automigrate/fixes/rnstorybook-config.ts
|
|
8272
8369
|
import { existsSync as existsSync4 } from "node:fs";
|
|
8273
8370
|
import { readFile as readFile10, rename, writeFile as writeFile9 } from "node:fs/promises";
|
|
8274
|
-
import { join as
|
|
8371
|
+
import { join as join5 } from "node:path";
|
|
8275
8372
|
import { dedent as dedent12 } from "ts-dedent";
|
|
8276
8373
|
async function renameInFile(filePath, oldText, newText) {
|
|
8277
8374
|
try {
|
|
@@ -8283,7 +8380,7 @@ async function renameInFile(filePath, oldText, newText) {
|
|
|
8283
8380
|
}
|
|
8284
8381
|
var getDotStorybookReferences = async (searchDir) => {
|
|
8285
8382
|
try {
|
|
8286
|
-
let { globby } = await import("./globby-
|
|
8383
|
+
let { globby } = await import("./globby-RO5T24NW.js"), { readFile: readFile12 } = await import("node:fs/promises"), files = await globby(`${searchDir}/**/*`, {
|
|
8287
8384
|
onlyFiles: !0,
|
|
8288
8385
|
gitignore: !0
|
|
8289
8386
|
}), referencedFiles = [];
|
|
@@ -8304,7 +8401,7 @@ var getDotStorybookReferences = async (searchDir) => {
|
|
|
8304
8401
|
async check({ packageManager, mainConfigPath }) {
|
|
8305
8402
|
if (!packageManager.getAllDependencies()["@storybook/react-native"])
|
|
8306
8403
|
return null;
|
|
8307
|
-
let projectDir = mainConfigPath ?
|
|
8404
|
+
let projectDir = mainConfigPath ? join5(mainConfigPath, "..", "..") : process.cwd(), storybookDir = join5(projectDir, ".storybook"), rnStorybookDir = join5(projectDir, RN_STORYBOOK_DIR), { globby } = await import("./globby-RO5T24NW.js"), requiresFiles = await globby(join5(storybookDir, "storybook.requires.*"));
|
|
8308
8405
|
return existsSync4(storybookDir) && requiresFiles.length > 0 && !existsSync4(rnStorybookDir) ? { storybookDir, rnStorybookDir } : null;
|
|
8309
8406
|
},
|
|
8310
8407
|
prompt() {
|
|
@@ -8420,7 +8517,7 @@ import {
|
|
|
8420
8517
|
isGetAbsolutePathWrapperNecessary,
|
|
8421
8518
|
wrapValueWithGetAbsolutePathWrapper
|
|
8422
8519
|
} from "storybook/internal/common";
|
|
8423
|
-
import { readConfig as
|
|
8520
|
+
import { readConfig as readConfig4 } from "storybook/internal/csf-tools";
|
|
8424
8521
|
import { CommonJsConfigNotSupportedError } from "storybook/internal/server-errors";
|
|
8425
8522
|
import { dedent as dedent15 } from "ts-dedent";
|
|
8426
8523
|
var wrapGetAbsolutePath = {
|
|
@@ -8430,7 +8527,7 @@ var wrapGetAbsolutePath = {
|
|
|
8430
8527
|
let isStorybookInMonorepo = packageManager.isStorybookInMonorepo(), isPnp = await detectPnp();
|
|
8431
8528
|
if (!mainConfigPath)
|
|
8432
8529
|
return null;
|
|
8433
|
-
let config = await
|
|
8530
|
+
let config = await readConfig4(mainConfigPath);
|
|
8434
8531
|
if (!isStorybookInMonorepo && !isPnp || !getFieldsForGetAbsolutePathWrapper(config).some(
|
|
8435
8532
|
(node) => isGetAbsolutePathWrapperNecessary(node)
|
|
8436
8533
|
))
|
|
@@ -8776,7 +8873,7 @@ ${error.stack}`), fixSummary.failed[f.id] = error.message), fixResults[f.id] = "
|
|
|
8776
8873
|
// src/link.ts
|
|
8777
8874
|
var import_cross_spawn = __toESM(require_cross_spawn(), 1);
|
|
8778
8875
|
import { mkdir, readFile as readFile11, writeFile as writeFile10 } from "node:fs/promises";
|
|
8779
|
-
import { basename as basename3, extname as extname2, join as
|
|
8876
|
+
import { basename as basename3, extname as extname2, join as join6 } from "node:path";
|
|
8780
8877
|
import { executeCommand } from "storybook/internal/common";
|
|
8781
8878
|
import { logger as logger21 } from "storybook/internal/node-logger";
|
|
8782
8879
|
var link = async ({ target, local, start }) => {
|
|
@@ -8789,12 +8886,12 @@ var link = async ({ target, local, start }) => {
|
|
|
8789
8886
|
}
|
|
8790
8887
|
let reproDir = target, reproName = basename3(target);
|
|
8791
8888
|
if (!local) {
|
|
8792
|
-
let reprosDir =
|
|
8889
|
+
let reprosDir = join6(storybookDir, "../storybook-repros");
|
|
8793
8890
|
logger21.info(`Ensuring directory ${reprosDir}`), await mkdir(reprosDir, { recursive: !0 }), logger21.info(`Cloning ${target}`), await executeCommand({
|
|
8794
8891
|
command: "git",
|
|
8795
8892
|
args: ["clone", target],
|
|
8796
8893
|
cwd: reprosDir
|
|
8797
|
-
}), reproName = basename3(target, extname2(target)), reproDir =
|
|
8894
|
+
}), reproName = basename3(target, extname2(target)), reproDir = join6(reprosDir, reproName);
|
|
8798
8895
|
}
|
|
8799
8896
|
let version2 = (0, import_cross_spawn.sync)("yarn", ["--version"], {
|
|
8800
8897
|
cwd: reproDir,
|
|
@@ -8811,7 +8908,7 @@ var link = async ({ target, local, start }) => {
|
|
|
8811
8908
|
cwd: reproDir
|
|
8812
8909
|
}), logger21.info(`Installing ${reproName}`);
|
|
8813
8910
|
let reproPackageJson = JSON.parse(
|
|
8814
|
-
await readFile11(
|
|
8911
|
+
await readFile11(join6(reproDir, "package.json"), { encoding: "utf8" })
|
|
8815
8912
|
);
|
|
8816
8913
|
reproPackageJson.devDependencies?.vite || (reproPackageJson.devDependencies = {
|
|
8817
8914
|
...reproPackageJson.devDependencies,
|
|
@@ -8819,7 +8916,7 @@ var link = async ({ target, local, start }) => {
|
|
|
8819
8916
|
}), reproPackageJson.devDependencies = {
|
|
8820
8917
|
...reproPackageJson.devDependencies,
|
|
8821
8918
|
"@types/node": "^22"
|
|
8822
|
-
}, await writeFile10(
|
|
8919
|
+
}, await writeFile10(join6(reproDir, "package.json"), JSON.stringify(reproPackageJson, null, 2)), await executeCommand({
|
|
8823
8920
|
command: "yarn",
|
|
8824
8921
|
args: ["install"],
|
|
8825
8922
|
cwd: reproDir
|
|
@@ -9425,8 +9522,10 @@ var baseTemplates = {
|
|
|
9425
9522
|
name: "Angular CLI Latest (Webpack | TypeScript)",
|
|
9426
9523
|
script: "npx -p @angular/cli ng new angular-latest --directory {{beforeDir}} --routing=true --minimal=true --style=scss --strict --skip-git --skip-install --package-manager=yarn --ssr",
|
|
9427
9524
|
modifications: {
|
|
9428
|
-
//
|
|
9429
|
-
|
|
9525
|
+
// The latest CLI scaffolds Angular 22 but omits @angular/forms and @angular/animations. Match
|
|
9526
|
+
// the `^22` major `ng new` uses for the other @angular packages so every @angular/* aligns.
|
|
9527
|
+
// Also, Angular 22 needs TypeScript 6 or more recent.
|
|
9528
|
+
extraDependencies: ["@angular/forms@^22", "@angular/animations@^22", "typescript@^6"],
|
|
9430
9529
|
resolutions: {
|
|
9431
9530
|
webpack: "5.107.2"
|
|
9432
9531
|
},
|
|
@@ -10477,13 +10576,24 @@ Upgrade interrupted by user.`), allProjects.length > 1 && await sendMultiUpgrade
|
|
|
10477
10576
|
)), !options.dryRun && !options.skipInstall)
|
|
10478
10577
|
for (let project of storybookProjects) {
|
|
10479
10578
|
let addonsToPostinstall = automigrationResults2[project.configDir]?.addonsToPostinstall;
|
|
10480
|
-
addonsToPostinstall?.length
|
|
10481
|
-
|
|
10482
|
-
|
|
10483
|
-
|
|
10484
|
-
|
|
10485
|
-
|
|
10486
|
-
|
|
10579
|
+
if (addonsToPostinstall?.length) {
|
|
10580
|
+
logger25.step(`Configuring addons: ${addonsToPostinstall.join(", ")}..`);
|
|
10581
|
+
try {
|
|
10582
|
+
await configureDeferredAddons(addonsToPostinstall, {
|
|
10583
|
+
packageManager: project.packageManager.type,
|
|
10584
|
+
configDir: project.configDir,
|
|
10585
|
+
yes: options.yes,
|
|
10586
|
+
logger: logger25,
|
|
10587
|
+
prompt: prompt8
|
|
10588
|
+
});
|
|
10589
|
+
} catch (error) {
|
|
10590
|
+
logger25.warn(
|
|
10591
|
+
`Configuring ${addonsToPostinstall.join(", ")} failed: ${String(
|
|
10592
|
+
error
|
|
10593
|
+
)}. Run "npx storybook add <addon>" manually for each addon to finish the setup.`
|
|
10594
|
+
), logger25.debug(error instanceof Error ? error.stack ?? error.message : String(error));
|
|
10595
|
+
}
|
|
10596
|
+
}
|
|
10487
10597
|
}
|
|
10488
10598
|
let doctorProjects = storybookProjects.map((project) => ({
|
|
10489
10599
|
configDir: project.configDir,
|
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_vp9iaavr9ps from 'node:url';
|
|
3
|
+
import CJS_COMPAT_NODE_PATH_vp9iaavr9ps from 'node:path';
|
|
4
|
+
import CJS_COMPAT_NODE_MODULE_vp9iaavr9ps from "node:module";
|
|
5
5
|
|
|
6
|
-
var __filename =
|
|
7
|
-
var __dirname =
|
|
8
|
-
var require =
|
|
6
|
+
var __filename = CJS_COMPAT_NODE_URL_vp9iaavr9ps.fileURLToPath(import.meta.url);
|
|
7
|
+
var __dirname = CJS_COMPAT_NODE_PATH_vp9iaavr9ps.dirname(__filename);
|
|
8
|
+
var require = CJS_COMPAT_NODE_MODULE_vp9iaavr9ps.createRequire(import.meta.url);
|
|
9
9
|
|
|
10
10
|
// ------------------------------------------------------------
|
|
11
11
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -20,4 +20,4 @@ isNodeVersionSupported(major, minor, patch) || (logger.error(
|
|
|
20
20
|
dedent`To run Storybook, you need Node.js version ${MIN_SUPPORTED_NODE_DESCRIPTION}.
|
|
21
21
|
You are currently running Node.js ${process.version}. Please upgrade your Node.js installation.`
|
|
22
22
|
), process.exit(1));
|
|
23
|
-
import("../_node-chunks/run-
|
|
23
|
+
import("../_node-chunks/run-UOXW6XFP.js");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/cli",
|
|
3
|
-
"version": "10.5.0
|
|
3
|
+
"version": "10.5.0",
|
|
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": "10.5.0
|
|
40
|
+
"@storybook/codemod": "10.5.0",
|
|
41
41
|
"@types/semver": "^7.7.1",
|
|
42
42
|
"commander": "^14.0.2",
|
|
43
|
-
"create-storybook": "10.5.0
|
|
43
|
+
"create-storybook": "10.5.0",
|
|
44
44
|
"jscodeshift": "^0.15.1",
|
|
45
|
-
"storybook": "10.5.0
|
|
45
|
+
"storybook": "10.5.0",
|
|
46
46
|
"ts-dedent": "^2.0.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_wig314a5l1 from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_wig314a5l1 from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_wig314a5l1 from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_wig314a5l1.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_wig314a5l1.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_wig314a5l1.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|