@storybook/cli 10.2.0-alpha.0 → 10.2.0-alpha.2
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-YKRW5SYC.js → block-dependencies-versions-YMH7MA6V.js} +11 -11
- package/dist/_node-chunks/{block-experimental-addon-test-BHT6IBTZ.js → block-experimental-addon-test-VMSSA6IY.js} +9 -9
- package/dist/_node-chunks/{block-major-version-J6RFROI4.js → block-major-version-RKSGPDEM.js} +9 -9
- package/dist/_node-chunks/{block-node-version-G4ZMP6PJ.js → block-node-version-MMAIJUYV.js} +9 -9
- package/dist/_node-chunks/{block-webpack5-frameworks-DEKL5ZQB.js → block-webpack5-frameworks-W2IQ3DDM.js} +11 -11
- package/dist/_node-chunks/{chunk-WAFUIVHE.js → chunk-6IINXQSO.js} +97 -97
- package/dist/_node-chunks/chunk-ANTP3N6G.js +11 -0
- package/dist/_node-chunks/{chunk-MAC22N5V.js → chunk-BCFEN3Q2.js} +20 -20
- package/dist/_node-chunks/{chunk-KUU46LHW.js → chunk-EXMRYCYJ.js} +6 -6
- package/dist/_node-chunks/{chunk-QMFFDEDI.js → chunk-IY7VLWOH.js} +165 -165
- package/dist/_node-chunks/{globby-UTOPYCAF.js → globby-LDZL2WSF.js} +8 -8
- package/dist/_node-chunks/{p-limit-DP5WTOR3.js → p-limit-KOKXKO6S.js} +8 -8
- package/dist/_node-chunks/{run-V6TJ2DH5.js → run-DGUQRWOC.js} +68 -76
- package/dist/bin/index.js +7 -7
- package/package.json +4 -8
- package/dist/_node-chunks/chunk-FBXLLQHP.js +0 -11
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_i51ef7xnrop from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_i51ef7xnrop from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_i51ef7xnrop from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_i51ef7xnrop.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_i51ef7xnrop.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_i51ef7xnrop.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-IY7VLWOH.js";
|
|
25
|
+
import "./chunk-EXMRYCYJ.js";
|
|
26
26
|
export {
|
|
27
27
|
convertPathToPattern,
|
|
28
28
|
generateGlobTasks,
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_i51ef7xnrop from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_i51ef7xnrop from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_i51ef7xnrop from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_i51ef7xnrop.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_i51ef7xnrop.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_i51ef7xnrop.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-EXMRYCYJ.js";
|
|
13
13
|
|
|
14
|
-
//
|
|
14
|
+
// ../../../node_modules/yocto-queue/index.js
|
|
15
15
|
var Node = class {
|
|
16
16
|
value;
|
|
17
17
|
next;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_i51ef7xnrop from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_i51ef7xnrop from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_i51ef7xnrop from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_i51ef7xnrop.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_i51ef7xnrop.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_i51ef7xnrop.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -25,22 +25,22 @@ import {
|
|
|
25
25
|
shortenPath,
|
|
26
26
|
updateMainConfig,
|
|
27
27
|
upgradeStorybookDependencies
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-BCFEN3Q2.js";
|
|
29
29
|
import {
|
|
30
30
|
slash
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-IY7VLWOH.js";
|
|
32
32
|
import {
|
|
33
33
|
require_semver
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-6IINXQSO.js";
|
|
35
35
|
import {
|
|
36
36
|
__commonJS,
|
|
37
37
|
__require,
|
|
38
38
|
__toESM
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-EXMRYCYJ.js";
|
|
40
40
|
|
|
41
|
-
//
|
|
41
|
+
// ../../../node_modules/envinfo/dist/envinfo.js
|
|
42
42
|
var require_envinfo = __commonJS({
|
|
43
|
-
"
|
|
43
|
+
"../../../node_modules/envinfo/dist/envinfo.js"(exports, module) {
|
|
44
44
|
(() => {
|
|
45
45
|
var e = { 2980: (e2, t11, n2) => {
|
|
46
46
|
"use strict";
|
|
@@ -4351,9 +4351,9 @@ ${r2}${n3}`), o2 = new Error(`Command failed: ${c2}${e4}`), o2.code = i2 < 0 ? p
|
|
|
4351
4351
|
}
|
|
4352
4352
|
});
|
|
4353
4353
|
|
|
4354
|
-
//
|
|
4354
|
+
// ../../../node_modules/isexe/windows.js
|
|
4355
4355
|
var require_windows = __commonJS({
|
|
4356
|
-
"
|
|
4356
|
+
"../../../node_modules/isexe/windows.js"(exports, module) {
|
|
4357
4357
|
module.exports = isexe;
|
|
4358
4358
|
isexe.sync = sync;
|
|
4359
4359
|
var fs2 = __require("fs");
|
|
@@ -4382,9 +4382,9 @@ var require_windows = __commonJS({
|
|
|
4382
4382
|
}
|
|
4383
4383
|
});
|
|
4384
4384
|
|
|
4385
|
-
//
|
|
4385
|
+
// ../../../node_modules/isexe/mode.js
|
|
4386
4386
|
var require_mode = __commonJS({
|
|
4387
|
-
"
|
|
4387
|
+
"../../../node_modules/isexe/mode.js"(exports, module) {
|
|
4388
4388
|
module.exports = isexe;
|
|
4389
4389
|
isexe.sync = sync;
|
|
4390
4390
|
var fs2 = __require("fs");
|
|
@@ -4406,9 +4406,9 @@ var require_mode = __commonJS({
|
|
|
4406
4406
|
}
|
|
4407
4407
|
});
|
|
4408
4408
|
|
|
4409
|
-
//
|
|
4409
|
+
// ../../../node_modules/isexe/index.js
|
|
4410
4410
|
var require_isexe = __commonJS({
|
|
4411
|
-
"
|
|
4411
|
+
"../../../node_modules/isexe/index.js"(exports, module) {
|
|
4412
4412
|
var fs2 = __require("fs"), core;
|
|
4413
4413
|
process.platform === "win32" || global.TESTING_WINDOWS ? core = require_windows() : core = require_mode();
|
|
4414
4414
|
module.exports = isexe;
|
|
@@ -4439,9 +4439,9 @@ var require_isexe = __commonJS({
|
|
|
4439
4439
|
}
|
|
4440
4440
|
});
|
|
4441
4441
|
|
|
4442
|
-
//
|
|
4442
|
+
// ../../../node_modules/which/which.js
|
|
4443
4443
|
var require_which = __commonJS({
|
|
4444
|
-
"
|
|
4444
|
+
"../../../node_modules/which/which.js"(exports, module) {
|
|
4445
4445
|
var isWindows2 = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys", path4 = __require("path"), COLON = isWindows2 ? ";" : ":", isexe = require_isexe(), getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" }), getPathInfo = (cmd, opt) => {
|
|
4446
4446
|
let colon = opt.colon || COLON, pathEnv = cmd.match(/\//) || isWindows2 && cmd.match(/\\/) ? [""] : [
|
|
4447
4447
|
// windows always checks the cwd first
|
|
@@ -4503,9 +4503,9 @@ var require_which = __commonJS({
|
|
|
4503
4503
|
}
|
|
4504
4504
|
});
|
|
4505
4505
|
|
|
4506
|
-
//
|
|
4506
|
+
// ../../../node_modules/path-key/index.js
|
|
4507
4507
|
var require_path_key = __commonJS({
|
|
4508
|
-
"
|
|
4508
|
+
"../../../node_modules/path-key/index.js"(exports, module) {
|
|
4509
4509
|
"use strict";
|
|
4510
4510
|
var pathKey = (options = {}) => {
|
|
4511
4511
|
let environment = options.env || process.env;
|
|
@@ -4516,9 +4516,9 @@ var require_path_key = __commonJS({
|
|
|
4516
4516
|
}
|
|
4517
4517
|
});
|
|
4518
4518
|
|
|
4519
|
-
//
|
|
4519
|
+
// ../../../node_modules/cross-spawn/lib/util/resolveCommand.js
|
|
4520
4520
|
var require_resolveCommand = __commonJS({
|
|
4521
|
-
"
|
|
4521
|
+
"../../../node_modules/cross-spawn/lib/util/resolveCommand.js"(exports, module) {
|
|
4522
4522
|
"use strict";
|
|
4523
4523
|
var path4 = __require("path"), which = require_which(), getPathKey = require_path_key();
|
|
4524
4524
|
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
@@ -4547,9 +4547,9 @@ var require_resolveCommand = __commonJS({
|
|
|
4547
4547
|
}
|
|
4548
4548
|
});
|
|
4549
4549
|
|
|
4550
|
-
//
|
|
4550
|
+
// ../../../node_modules/cross-spawn/lib/util/escape.js
|
|
4551
4551
|
var require_escape = __commonJS({
|
|
4552
|
-
"
|
|
4552
|
+
"../../../node_modules/cross-spawn/lib/util/escape.js"(exports, module) {
|
|
4553
4553
|
"use strict";
|
|
4554
4554
|
var metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
|
|
4555
4555
|
function escapeCommand(arg) {
|
|
@@ -4563,17 +4563,17 @@ var require_escape = __commonJS({
|
|
|
4563
4563
|
}
|
|
4564
4564
|
});
|
|
4565
4565
|
|
|
4566
|
-
//
|
|
4566
|
+
// ../../../node_modules/shebang-regex/index.js
|
|
4567
4567
|
var require_shebang_regex = __commonJS({
|
|
4568
|
-
"
|
|
4568
|
+
"../../../node_modules/shebang-regex/index.js"(exports, module) {
|
|
4569
4569
|
"use strict";
|
|
4570
4570
|
module.exports = /^#!(.*)/;
|
|
4571
4571
|
}
|
|
4572
4572
|
});
|
|
4573
4573
|
|
|
4574
|
-
//
|
|
4574
|
+
// ../../../node_modules/shebang-command/index.js
|
|
4575
4575
|
var require_shebang_command = __commonJS({
|
|
4576
|
-
"
|
|
4576
|
+
"../../../node_modules/shebang-command/index.js"(exports, module) {
|
|
4577
4577
|
"use strict";
|
|
4578
4578
|
var shebangRegex = require_shebang_regex();
|
|
4579
4579
|
module.exports = (string = "") => {
|
|
@@ -4586,9 +4586,9 @@ var require_shebang_command = __commonJS({
|
|
|
4586
4586
|
}
|
|
4587
4587
|
});
|
|
4588
4588
|
|
|
4589
|
-
//
|
|
4589
|
+
// ../../../node_modules/cross-spawn/lib/util/readShebang.js
|
|
4590
4590
|
var require_readShebang = __commonJS({
|
|
4591
|
-
"
|
|
4591
|
+
"../../../node_modules/cross-spawn/lib/util/readShebang.js"(exports, module) {
|
|
4592
4592
|
"use strict";
|
|
4593
4593
|
var fs2 = __require("fs"), shebangCommand = require_shebang_command();
|
|
4594
4594
|
function readShebang(command2) {
|
|
@@ -4603,9 +4603,9 @@ var require_readShebang = __commonJS({
|
|
|
4603
4603
|
}
|
|
4604
4604
|
});
|
|
4605
4605
|
|
|
4606
|
-
//
|
|
4606
|
+
// ../../../node_modules/cross-spawn/lib/parse.js
|
|
4607
4607
|
var require_parse = __commonJS({
|
|
4608
|
-
"
|
|
4608
|
+
"../../../node_modules/cross-spawn/lib/parse.js"(exports, module) {
|
|
4609
4609
|
"use strict";
|
|
4610
4610
|
var path4 = __require("path"), resolveCommand = require_resolveCommand(), escape = require_escape(), readShebang = require_readShebang(), isWin = process.platform === "win32", isExecutableRegExp = /\.(?:com|exe)$/i, isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
|
|
4611
4611
|
function detectShebang(parsed) {
|
|
@@ -4643,9 +4643,9 @@ var require_parse = __commonJS({
|
|
|
4643
4643
|
}
|
|
4644
4644
|
});
|
|
4645
4645
|
|
|
4646
|
-
//
|
|
4646
|
+
// ../../../node_modules/cross-spawn/lib/enoent.js
|
|
4647
4647
|
var require_enoent = __commonJS({
|
|
4648
|
-
"
|
|
4648
|
+
"../../../node_modules/cross-spawn/lib/enoent.js"(exports, module) {
|
|
4649
4649
|
"use strict";
|
|
4650
4650
|
var isWin = process.platform === "win32";
|
|
4651
4651
|
function notFoundError(original, syscall) {
|
|
@@ -4685,9 +4685,9 @@ var require_enoent = __commonJS({
|
|
|
4685
4685
|
}
|
|
4686
4686
|
});
|
|
4687
4687
|
|
|
4688
|
-
//
|
|
4688
|
+
// ../../../node_modules/cross-spawn/index.js
|
|
4689
4689
|
var require_cross_spawn = __commonJS({
|
|
4690
|
-
"
|
|
4690
|
+
"../../../node_modules/cross-spawn/index.js"(exports, module) {
|
|
4691
4691
|
"use strict";
|
|
4692
4692
|
var cp = __require("child_process"), parse2 = require_parse(), enoent = require_enoent();
|
|
4693
4693
|
function spawn(command2, args, options) {
|
|
@@ -4723,7 +4723,7 @@ import { CLI_COLORS as CLI_COLORS5, logTracker as logTracker4, logger as logger2
|
|
|
4723
4723
|
import { addToGlobalContext, telemetry as telemetry2 } from "storybook/internal/telemetry";
|
|
4724
4724
|
import { Option, program } from "commander";
|
|
4725
4725
|
|
|
4726
|
-
//
|
|
4726
|
+
// ../../../node_modules/leven/index.js
|
|
4727
4727
|
var array = [], characterCodeCache = [];
|
|
4728
4728
|
function leven(first, second, options) {
|
|
4729
4729
|
if (first === second)
|
|
@@ -4761,7 +4761,7 @@ function leven(first, second, options) {
|
|
|
4761
4761
|
var import_picocolors16 = __toESM(require_picocolors(), 1);
|
|
4762
4762
|
|
|
4763
4763
|
// package.json
|
|
4764
|
-
var version = "10.2.0-alpha.
|
|
4764
|
+
var version = "10.2.0-alpha.2";
|
|
4765
4765
|
|
|
4766
4766
|
// src/add.ts
|
|
4767
4767
|
var import_semver = __toESM(require_semver(), 1);
|
|
@@ -4780,7 +4780,7 @@ import { createRequire, register } from "node:module";
|
|
|
4780
4780
|
import { win32 } from "node:path/win32";
|
|
4781
4781
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
4782
4782
|
|
|
4783
|
-
//
|
|
4783
|
+
// ../../../node_modules/exsolve/dist/index.mjs
|
|
4784
4784
|
import assert from "node:assert";
|
|
4785
4785
|
import v8 from "node:v8";
|
|
4786
4786
|
import { format, inspect } from "node:util";
|
|
@@ -4904,7 +4904,7 @@ var hasOwnProperty = {}.hasOwnProperty;
|
|
|
4904
4904
|
var RegExpPrototypeSymbolReplace = RegExp.prototype[Symbol.replace], own = {}.hasOwnProperty;
|
|
4905
4905
|
var isWindows = process.platform === "win32", globalCache = globalThis.__EXSOLVE_CACHE__ ||= /* @__PURE__ */ new Map();
|
|
4906
4906
|
|
|
4907
|
-
//
|
|
4907
|
+
// ../../../node_modules/pathe/dist/shared/pathe.ff20891b.mjs
|
|
4908
4908
|
var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
4909
4909
|
function normalizeWindowsPath(input = "") {
|
|
4910
4910
|
return input && input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
|
|
@@ -5082,7 +5082,7 @@ var import_picocolors13 = __toESM(require_picocolors(), 1);
|
|
|
5082
5082
|
import { logTracker as logTracker2, logger as logger16, prompt as prompt3 } from "storybook/internal/node-logger";
|
|
5083
5083
|
import { AutomigrateError } from "storybook/internal/server-errors";
|
|
5084
5084
|
|
|
5085
|
-
//
|
|
5085
|
+
// ../../../node_modules/tiny-invariant/dist/esm/tiny-invariant.js
|
|
5086
5086
|
var isProduction = process.env.NODE_ENV === "production", prefix = "Invariant failed";
|
|
5087
5087
|
function invariant(condition, message) {
|
|
5088
5088
|
if (!condition) {
|
|
@@ -5624,7 +5624,7 @@ import { logger as logger3 } from "storybook/internal/node-logger";
|
|
|
5624
5624
|
import { promises as fs } from "fs";
|
|
5625
5625
|
var maxConcurrentTasks = Math.max(1, os.cpus().length - 1);
|
|
5626
5626
|
async function runCodemod(globPattern = "**/*.stories.*", transform, { dryRun = !1, skipFormatting = !1 } = {}) {
|
|
5627
|
-
let modifiedCount = 0, unmodifiedCount = 0, errorCount = 0, { globby } = await import("./globby-
|
|
5627
|
+
let modifiedCount = 0, unmodifiedCount = 0, errorCount = 0, { globby } = await import("./globby-LDZL2WSF.js"), files = await globby(slash(globPattern), {
|
|
5628
5628
|
followSymbolicLinks: !0,
|
|
5629
5629
|
ignore: ["**/node_modules/**", "**/dist/**", "**/storybook-static/**", "**/build/**"]
|
|
5630
5630
|
});
|
|
@@ -5635,7 +5635,7 @@ Please try a different pattern.
|
|
|
5635
5635
|
`
|
|
5636
5636
|
), new Error("No files matched");
|
|
5637
5637
|
try {
|
|
5638
|
-
let pLimit = (await import("./p-limit-
|
|
5638
|
+
let pLimit = (await import("./p-limit-KOKXKO6S.js")).default, limit = pLimit(maxConcurrentTasks);
|
|
5639
5639
|
await Promise.all(
|
|
5640
5640
|
files.map(
|
|
5641
5641
|
(file) => limit(async () => {
|
|
@@ -6395,7 +6395,7 @@ var addonA11yParameters = {
|
|
|
6395
6395
|
errors.push({ file: previewFileToUpdate, error });
|
|
6396
6396
|
}
|
|
6397
6397
|
}
|
|
6398
|
-
let { default: pLimit } = await import("./p-limit-
|
|
6398
|
+
let { default: pLimit } = await import("./p-limit-KOKXKO6S.js"), limit = pLimit(10);
|
|
6399
6399
|
if (await Promise.all(
|
|
6400
6400
|
storyFilesToUpdate.map(
|
|
6401
6401
|
(file) => limit(async () => {
|
|
@@ -6549,7 +6549,7 @@ var addonGlobalsApi = {
|
|
|
6549
6549
|
}
|
|
6550
6550
|
};
|
|
6551
6551
|
async function transformStoryFiles(files, options, dryRun) {
|
|
6552
|
-
let errors = [], { default: pLimit } = await import("./p-limit-
|
|
6552
|
+
let errors = [], { default: pLimit } = await import("./p-limit-KOKXKO6S.js"), limit = pLimit(10);
|
|
6553
6553
|
return await Promise.all(
|
|
6554
6554
|
files.map(
|
|
6555
6555
|
(file) => limit(async () => {
|
|
@@ -6741,7 +6741,7 @@ function transformPackageJson(content) {
|
|
|
6741
6741
|
return hasChanges ? JSON.stringify(packageJson, null, 2) : null;
|
|
6742
6742
|
}
|
|
6743
6743
|
var transformPackageJsonFiles = async (files, dryRun) => {
|
|
6744
|
-
let errors = [], { default: pLimit } = await import("./p-limit-
|
|
6744
|
+
let errors = [], { default: pLimit } = await import("./p-limit-KOKXKO6S.js"), limit = pLimit(10);
|
|
6745
6745
|
return await Promise.all(
|
|
6746
6746
|
files.map(
|
|
6747
6747
|
(file) => limit(async () => {
|
|
@@ -6780,7 +6780,7 @@ var transformPackageJsonFiles = async (files, dryRun) => {
|
|
|
6780
6780
|
dryRun
|
|
6781
6781
|
);
|
|
6782
6782
|
errors.push(...packageJsonErrors);
|
|
6783
|
-
let { globby } = await import("./globby-
|
|
6783
|
+
let { globby } = await import("./globby-LDZL2WSF.js"), configFiles = await globby([`${configDir}/**/*`]), importErrors = await transformImportFiles(
|
|
6784
6784
|
[...storiesPaths, ...configFiles].filter(Boolean),
|
|
6785
6785
|
{
|
|
6786
6786
|
...consolidatedPackages,
|
|
@@ -7124,7 +7124,7 @@ var transformMainConfig = async (mainConfigPath, dryRun) => {
|
|
|
7124
7124
|
logger11.step("Migrating from @storybook/nextjs to @storybook/nextjs-vite..."), dryRun ? logger11.debug("Dry run: Skipping package.json updates.") : (logger11.debug("Updating package.json files..."), await packageManager.removeDependencies(["@storybook/nextjs"]), await packageManager.addDependencies({ type: "devDependencies", skipInstall: !0 }, [
|
|
7125
7125
|
`@storybook/nextjs-vite@${storybookVersion}`
|
|
7126
7126
|
])), mainConfigPath && (logger11.debug("Updating main config file..."), await transformMainConfig(mainConfigPath, dryRun)), logger11.debug("Scanning and updating import statements...");
|
|
7127
|
-
let { globby } = await import("./globby-
|
|
7127
|
+
let { globby } = await import("./globby-LDZL2WSF.js"), configFiles = await globby([`${configDir}/**/*`]), allFiles = [...storiesPaths, ...configFiles].filter(Boolean), transformErrors = await transformImportFiles2(
|
|
7128
7128
|
allFiles,
|
|
7129
7129
|
{
|
|
7130
7130
|
"@storybook/nextjs": "@storybook/nextjs-vite"
|
|
@@ -7333,7 +7333,7 @@ var getAllDependencies = (packageJson) => Object.keys({
|
|
|
7333
7333
|
let regex = new RegExp(`(['"])${renderer}(['"])`, "g");
|
|
7334
7334
|
return regex.test(source) ? source.replace(regex, `$1${framework}$2`) : null;
|
|
7335
7335
|
}, transformSourceFiles = async (files, renderer, framework, dryRun) => {
|
|
7336
|
-
let errors = [], { default: pLimit } = await import("./p-limit-
|
|
7336
|
+
let errors = [], { default: pLimit } = await import("./p-limit-KOKXKO6S.js"), limit = pLimit(10);
|
|
7337
7337
|
return await Promise.all(
|
|
7338
7338
|
files.map(
|
|
7339
7339
|
(file) => limit(async () => {
|
|
@@ -7400,7 +7400,7 @@ var getAllDependencies = (packageJson) => Object.keys({
|
|
|
7400
7400
|
continue;
|
|
7401
7401
|
logger13.debug(`
|
|
7402
7402
|
Migrating ${rendererPackage} to ${selectedFramework}`);
|
|
7403
|
-
let { globby } = await import("./globby-
|
|
7403
|
+
let { globby } = await import("./globby-LDZL2WSF.js"), configFiles = await globby([`${configDir}/**/*`]);
|
|
7404
7404
|
await transformSourceFiles(
|
|
7405
7405
|
[...storiesPaths, ...configFiles].filter(Boolean),
|
|
7406
7406
|
rendererPackage,
|
|
@@ -7430,7 +7430,7 @@ async function renameInFile(filePath, oldText, newText) {
|
|
|
7430
7430
|
}
|
|
7431
7431
|
var getDotStorybookReferences = async (searchDir) => {
|
|
7432
7432
|
try {
|
|
7433
|
-
let { globby } = await import("./globby-
|
|
7433
|
+
let { globby } = await import("./globby-LDZL2WSF.js"), { readFile: readFile10 } = await import("node:fs/promises"), files = await globby(`${searchDir}/**/*`, {
|
|
7434
7434
|
onlyFiles: !0,
|
|
7435
7435
|
gitignore: !0
|
|
7436
7436
|
}), referencedFiles = [];
|
|
@@ -7451,7 +7451,7 @@ var getDotStorybookReferences = async (searchDir) => {
|
|
|
7451
7451
|
async check({ packageManager, mainConfigPath }) {
|
|
7452
7452
|
if (!packageManager.getAllDependencies()["@storybook/react-native"])
|
|
7453
7453
|
return null;
|
|
7454
|
-
let projectDir = mainConfigPath ? join2(mainConfigPath, "..", "..") : process.cwd(), storybookDir = join2(projectDir, ".storybook"), rnStorybookDir = join2(projectDir, ".rnstorybook"), { globby } = await import("./globby-
|
|
7454
|
+
let projectDir = mainConfigPath ? join2(mainConfigPath, "..", "..") : process.cwd(), storybookDir = join2(projectDir, ".storybook"), rnStorybookDir = join2(projectDir, ".rnstorybook"), { globby } = await import("./globby-LDZL2WSF.js"), requiresFiles = await globby(join2(storybookDir, "storybook.requires.*"));
|
|
7455
7455
|
return existsSync2(storybookDir) && requiresFiles.length > 0 && !existsSync2(rnStorybookDir) ? { storybookDir, rnStorybookDir } : null;
|
|
7456
7456
|
},
|
|
7457
7457
|
prompt() {
|
|
@@ -7884,7 +7884,7 @@ import { logger as logger17 } from "storybook/internal/node-logger";
|
|
|
7884
7884
|
var link = async ({ target, local, start }) => {
|
|
7885
7885
|
let storybookDir = process.cwd();
|
|
7886
7886
|
try {
|
|
7887
|
-
if (JSON.parse(await readFile9("package.json", { encoding: "utf8" })).name !== "@storybook/
|
|
7887
|
+
if (JSON.parse(await readFile9("package.json", { encoding: "utf8" })).name !== "@storybook/code")
|
|
7888
7888
|
throw new Error();
|
|
7889
7889
|
} catch {
|
|
7890
7890
|
throw new Error("Expected to run link from the root of the storybook monorepo");
|
|
@@ -7947,7 +7947,7 @@ async function migrate(migration, { glob, dryRun, list, rename: rename2, parser
|
|
|
7947
7947
|
// src/sandbox.ts
|
|
7948
7948
|
var import_cross_spawn2 = __toESM(require_cross_spawn(), 1);
|
|
7949
7949
|
import { existsSync as existsSync3 } from "node:fs";
|
|
7950
|
-
import { readdir, rm } from "node:fs/promises";
|
|
7950
|
+
import { mkdir as mkdir2, readdir, rm } from "node:fs/promises";
|
|
7951
7951
|
import { isAbsolute as isAbsolute2 } from "node:path";
|
|
7952
7952
|
import {
|
|
7953
7953
|
JsPackageManagerFactory,
|
|
@@ -8316,7 +8316,7 @@ var baseTemplates = {
|
|
|
8316
8316
|
builder: "storybook-builder-rsbuild"
|
|
8317
8317
|
},
|
|
8318
8318
|
modifications: {
|
|
8319
|
-
extraDependencies: ["prop-types"
|
|
8319
|
+
extraDependencies: ["prop-types"],
|
|
8320
8320
|
useCsfFactory: !0,
|
|
8321
8321
|
mainConfig: {
|
|
8322
8322
|
features: {
|
|
@@ -8327,25 +8327,15 @@ var baseTemplates = {
|
|
|
8327
8327
|
},
|
|
8328
8328
|
skipTasks: ["e2e-tests", "e2e-tests-dev", "bench", "vitest-integration"]
|
|
8329
8329
|
},
|
|
8330
|
-
"solid-vite/default-js": {
|
|
8331
|
-
name: "SolidJS Latest (Vite | JavaScript)",
|
|
8332
|
-
script: "npx degit solidjs/templates/js {{beforeDir}}",
|
|
8333
|
-
expected: {
|
|
8334
|
-
framework: "storybook-solidjs-vite",
|
|
8335
|
-
renderer: "storybook-solidjs-vite",
|
|
8336
|
-
builder: "@storybook/builder-vite"
|
|
8337
|
-
},
|
|
8338
|
-
skipTasks: ["e2e-tests", "bench", "vitest-integration"]
|
|
8339
|
-
},
|
|
8340
8330
|
"solid-vite/default-ts": {
|
|
8341
8331
|
name: "SolidJS Latest (Vite | TypeScript)",
|
|
8342
|
-
script: "
|
|
8332
|
+
script: "yarn create solid {{beforeDir}} --vanilla --ts --template=with-vitest",
|
|
8343
8333
|
expected: {
|
|
8344
8334
|
framework: "storybook-solidjs-vite",
|
|
8345
8335
|
renderer: "storybook-solidjs-vite",
|
|
8346
8336
|
builder: "@storybook/builder-vite"
|
|
8347
8337
|
},
|
|
8348
|
-
skipTasks: ["e2e-tests", "bench"]
|
|
8338
|
+
skipTasks: ["e2e-tests", "e2e-tests-dev", "bench", "vitest-integration"]
|
|
8349
8339
|
},
|
|
8350
8340
|
"vue3-vite/default-js": {
|
|
8351
8341
|
name: "Vue v3 (Vite | JavaScript)",
|
|
@@ -8431,10 +8421,12 @@ var baseTemplates = {
|
|
|
8431
8421
|
builder: "storybook-builder-rsbuild"
|
|
8432
8422
|
},
|
|
8433
8423
|
modifications: {
|
|
8434
|
-
extraDependencies: ["storybook-html-rsbuild@^3.0.0-beta.1"],
|
|
8435
8424
|
skipMocking: !0
|
|
8436
8425
|
},
|
|
8437
|
-
skipTasks: ["e2e-tests", "e2e-tests-dev", "bench", "vitest-integration"]
|
|
8426
|
+
skipTasks: ["e2e-tests", "e2e-tests-dev", "bench", "vitest-integration"],
|
|
8427
|
+
initOptions: {
|
|
8428
|
+
type: "html" /* HTML */
|
|
8429
|
+
}
|
|
8438
8430
|
},
|
|
8439
8431
|
"svelte-vite/default-js": {
|
|
8440
8432
|
name: "Svelte Latest (Vite | JavaScript)",
|
|
@@ -8461,9 +8453,7 @@ var baseTemplates = {
|
|
|
8461
8453
|
name: "Angular CLI Prerelease (Webpack | TypeScript)",
|
|
8462
8454
|
script: "npx -p @angular/cli@next ng new angular-v16 --directory {{beforeDir}} --routing=true --minimal=true --style=scss --strict --skip-git --skip-install --package-manager=yarn --ssr",
|
|
8463
8455
|
modifications: {
|
|
8464
|
-
|
|
8465
|
-
// TODO: use @angular/forms@next as soon as @angular/cli@next points to the same version
|
|
8466
|
-
extraDependencies: ["@standard-schema/spec@^1", "@angular/forms@^21.0.0"]
|
|
8456
|
+
extraDependencies: ["@standard-schema/spec@^1", "@angular/forms@next"]
|
|
8467
8457
|
},
|
|
8468
8458
|
expected: {
|
|
8469
8459
|
framework: "@storybook/angular",
|
|
@@ -8526,7 +8516,6 @@ var baseTemplates = {
|
|
|
8526
8516
|
builder: "storybook-builder-rsbuild"
|
|
8527
8517
|
},
|
|
8528
8518
|
modifications: {
|
|
8529
|
-
extraDependencies: ["storybook-web-components-rsbuild@^3.0.0-beta.1"],
|
|
8530
8519
|
skipMocking: !0
|
|
8531
8520
|
},
|
|
8532
8521
|
skipTasks: ["e2e-tests", "e2e-tests-dev", "bench", "vitest-integration"]
|
|
@@ -8819,6 +8808,7 @@ var baseTemplates = {
|
|
|
8819
8808
|
"nextjs-vite/15-ts",
|
|
8820
8809
|
"preact-vite/default-ts",
|
|
8821
8810
|
"html-vite/default-ts",
|
|
8811
|
+
"solid-vite/default-ts",
|
|
8822
8812
|
"vue3-rsbuild/default-ts"
|
|
8823
8813
|
], daily = [
|
|
8824
8814
|
...merged,
|
|
@@ -8929,7 +8919,9 @@ var toChoices = (c) => ({ label: allTemplates[c].name, value: c }), sandbox = as
|
|
|
8929
8919
|
logger19.log(`\u{1F3C3} Adding ${selectedConfig.name} into ${templateDestination}`), logger19.log(`\u{1F4E6} Downloading sandbox template (${import_picocolors14.default.bold(downloadType)})...`);
|
|
8930
8920
|
try {
|
|
8931
8921
|
let gitPath = `storybookjs/sandboxes/tree/${branch}/${templateId}/${downloadType}`;
|
|
8932
|
-
if ((0, import_cross_spawn2.sync)("npx", ["gitpick@4.12.4", gitPath, templateDestination, "-o"]
|
|
8922
|
+
if (await mkdir2(templateDestination, { recursive: !0 }), (0, import_cross_spawn2.sync)("npx", ["gitpick@4.12.4", gitPath, templateDestination, "-o"], {
|
|
8923
|
+
stdio: "inherit"
|
|
8924
|
+
}), (await readdir(templateDestination)).length === 0) {
|
|
8933
8925
|
let selected = import_picocolors14.default.yellow(templateId);
|
|
8934
8926
|
throw new Error(dedent14`
|
|
8935
8927
|
Template downloaded from ${import_picocolors14.default.blue(gitPath)} is empty.
|
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_i51ef7xnrop from 'node:url';
|
|
3
|
+
import CJS_COMPAT_NODE_PATH_i51ef7xnrop from 'node:path';
|
|
4
|
+
import CJS_COMPAT_NODE_MODULE_i51ef7xnrop from "node:module";
|
|
5
5
|
|
|
6
|
-
var __filename =
|
|
7
|
-
var __dirname =
|
|
8
|
-
var require =
|
|
6
|
+
var __filename = CJS_COMPAT_NODE_URL_i51ef7xnrop.fileURLToPath(import.meta.url);
|
|
7
|
+
var __dirname = CJS_COMPAT_NODE_PATH_i51ef7xnrop.dirname(__filename);
|
|
8
|
+
var require = CJS_COMPAT_NODE_MODULE_i51ef7xnrop.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 @@ var [majorNodeVersion, minorNodeVersion] = process.versions.node.split(".").map(
|
|
|
19
19
|
dedent`To run Storybook, you need Node.js version 20.19+ or 22.12+.
|
|
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-DGUQRWOC.js");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/cli",
|
|
3
|
-
"version": "10.2.0-alpha.
|
|
3
|
+
"version": "10.2.0-alpha.2",
|
|
4
4
|
"description": "Storybook CLI: Develop, document, and test UI components in isolation",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -36,17 +36,13 @@
|
|
|
36
36
|
"README.md",
|
|
37
37
|
"!src/**/*"
|
|
38
38
|
],
|
|
39
|
-
"scripts": {
|
|
40
|
-
"check": "jiti ../../../scripts/check/check-package.ts",
|
|
41
|
-
"prep": "jiti ../../../scripts/build/build-package.ts"
|
|
42
|
-
},
|
|
43
39
|
"dependencies": {
|
|
44
|
-
"@storybook/codemod": "10.2.0-alpha.
|
|
40
|
+
"@storybook/codemod": "10.2.0-alpha.2",
|
|
45
41
|
"@types/semver": "^7.3.4",
|
|
46
42
|
"commander": "^14.0.1",
|
|
47
|
-
"create-storybook": "10.2.0-alpha.
|
|
43
|
+
"create-storybook": "10.2.0-alpha.2",
|
|
48
44
|
"jscodeshift": "^0.15.1",
|
|
49
|
-
"storybook": "10.2.0-alpha.
|
|
45
|
+
"storybook": "10.2.0-alpha.2",
|
|
50
46
|
"ts-dedent": "^2.0.0"
|
|
51
47
|
},
|
|
52
48
|
"devDependencies": {
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_y3lf37qc5es from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_y3lf37qc5es from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_y3lf37qc5es from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_y3lf37qc5es.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_y3lf37qc5es.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_y3lf37qc5es.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|