@storybook/cli 10.1.0-alpha.10 → 10.1.0-alpha.12
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-2APKKCLU.js → block-dependencies-versions-QNU3AJML.js} +13 -16
- package/dist/_node-chunks/{block-experimental-addon-test-DSHFNBHE.js → block-experimental-addon-test-7ID6U4ZB.js} +16 -23
- package/dist/_node-chunks/{block-major-version-L7KR5JAX.js → block-major-version-RQBG4GU3.js} +25 -48
- package/dist/_node-chunks/{block-node-version-G63QHY2C.js → block-node-version-RG4TKZVB.js} +13 -18
- package/dist/_node-chunks/{block-webpack5-frameworks-5MISMG7G.js → block-webpack5-frameworks-EOHC7MGO.js} +14 -19
- package/dist/_node-chunks/chunk-AYSGWBPB.js +1340 -0
- package/dist/_node-chunks/chunk-G7WNAI4O.js +11 -0
- package/dist/_node-chunks/chunk-P7TBIJSH.js +1160 -0
- package/dist/_node-chunks/{chunk-WW7YB2UR.js → chunk-VFUI46B4.js} +14 -19
- package/dist/_node-chunks/chunk-ZAQE57EP.js +4375 -0
- package/dist/_node-chunks/{globby-ZUUYKWYQ.js → globby-AN5NTFOS.js} +8 -8
- package/dist/_node-chunks/p-limit-UJQPNFP6.js +116 -0
- package/dist/_node-chunks/run-662PQ5Z3.js +9598 -0
- package/dist/bin/index.js +10 -13
- package/package.json +5 -5
- package/dist/_node-chunks/chunk-EWHTUHNQ.js +0 -6737
- package/dist/_node-chunks/chunk-PW42J35B.js +0 -1770
- package/dist/_node-chunks/chunk-S5E3PR7E.js +0 -1939
- package/dist/_node-chunks/chunk-YA5UBW6S.js +0 -24
- package/dist/_node-chunks/p-limit-OXOGURRS.js +0 -168
- package/dist/_node-chunks/run-3URSVYYH.js +0 -11467
|
@@ -1,23 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_cnh1zw3akmi from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_cnh1zw3akmi from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_cnh1zw3akmi from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_cnh1zw3akmi.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_cnh1zw3akmi.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_cnh1zw3akmi.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
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
import "./chunk-S5E3PR7E.js";
|
|
20
|
-
import "./chunk-WW7YB2UR.js";
|
|
14
|
+
} from "./chunk-AYSGWBPB.js";
|
|
15
|
+
import "./chunk-ZAQE57EP.js";
|
|
16
|
+
import "./chunk-G7WNAI4O.js";
|
|
17
|
+
import "./chunk-P7TBIJSH.js";
|
|
18
|
+
import "./chunk-VFUI46B4.js";
|
|
21
19
|
|
|
22
20
|
// src/autoblock/block-dependencies-versions.ts
|
|
23
21
|
import { dedent } from "ts-dedent";
|
|
@@ -29,8 +27,7 @@ var minimalVersionsMap = {
|
|
|
29
27
|
svelte: "5.0.0",
|
|
30
28
|
vue: "3.0.0",
|
|
31
29
|
vite: "5.0.0"
|
|
32
|
-
}
|
|
33
|
-
var blocker = createBlocker({
|
|
30
|
+
}, blocker = {
|
|
34
31
|
id: "dependenciesVersions",
|
|
35
32
|
async check({ packageManager }) {
|
|
36
33
|
return findOutdatedPackage(minimalVersionsMap, { packageManager });
|
|
@@ -65,7 +62,7 @@ var blocker = createBlocker({
|
|
|
65
62
|
};
|
|
66
63
|
}
|
|
67
64
|
}
|
|
68
|
-
}
|
|
65
|
+
};
|
|
69
66
|
export {
|
|
70
67
|
blocker
|
|
71
68
|
};
|
|
@@ -1,41 +1,34 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_cnh1zw3akmi from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_cnh1zw3akmi from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_cnh1zw3akmi from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_cnh1zw3akmi.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_cnh1zw3akmi.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_cnh1zw3akmi.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
|
|
13
|
-
createBlocker
|
|
14
|
-
} from "./chunk-YA5UBW6S.js";
|
|
12
|
+
import "./chunk-G7WNAI4O.js";
|
|
15
13
|
import {
|
|
16
14
|
require_semver
|
|
17
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-P7TBIJSH.js";
|
|
18
16
|
import {
|
|
19
17
|
__toESM
|
|
20
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-VFUI46B4.js";
|
|
21
19
|
|
|
22
20
|
// src/autoblock/block-experimental-addon-test.ts
|
|
23
21
|
var import_semver = __toESM(require_semver(), 1);
|
|
24
22
|
import { dedent } from "ts-dedent";
|
|
25
|
-
var blocker =
|
|
23
|
+
var blocker = {
|
|
26
24
|
id: "experimentalAddonTestVitest",
|
|
27
25
|
async check({ packageManager }) {
|
|
28
|
-
|
|
26
|
+
if (!await packageManager.getInstalledVersion(
|
|
29
27
|
"@storybook/experimental-addon-test"
|
|
30
|
-
)
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const vitestVersion = await packageManager.getInstalledVersion("vitest");
|
|
35
|
-
if (!vitestVersion) {
|
|
36
|
-
return false;
|
|
37
|
-
}
|
|
38
|
-
return import_semver.default.lt(vitestVersion, "3.0.0");
|
|
28
|
+
))
|
|
29
|
+
return !1;
|
|
30
|
+
let vitestVersion = await packageManager.getInstalledVersion("vitest");
|
|
31
|
+
return vitestVersion ? import_semver.default.lt(vitestVersion, "3.0.0") : !1;
|
|
39
32
|
},
|
|
40
33
|
log() {
|
|
41
34
|
return {
|
|
@@ -52,7 +45,7 @@ var blocker = createBlocker({
|
|
|
52
45
|
link: "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#experimental-addon-test-vitest"
|
|
53
46
|
};
|
|
54
47
|
}
|
|
55
|
-
}
|
|
48
|
+
};
|
|
56
49
|
export {
|
|
57
50
|
blocker
|
|
58
51
|
};
|
package/dist/_node-chunks/{block-major-version-L7KR5JAX.js → block-major-version-RQBG4GU3.js}
RENAMED
|
@@ -1,24 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_cnh1zw3akmi from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_cnh1zw3akmi from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_cnh1zw3akmi from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_cnh1zw3akmi.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_cnh1zw3akmi.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_cnh1zw3akmi.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
|
|
13
|
-
createBlocker
|
|
14
|
-
} from "./chunk-YA5UBW6S.js";
|
|
12
|
+
import "./chunk-G7WNAI4O.js";
|
|
15
13
|
import {
|
|
16
14
|
require_semver
|
|
17
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-P7TBIJSH.js";
|
|
18
16
|
import {
|
|
19
|
-
__name,
|
|
20
17
|
__toESM
|
|
21
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-VFUI46B4.js";
|
|
22
19
|
|
|
23
20
|
// src/autoblock/block-major-version.ts
|
|
24
21
|
var import_semver = __toESM(require_semver(), 1);
|
|
@@ -26,49 +23,31 @@ import { versions } from "storybook/internal/common";
|
|
|
26
23
|
import { CLI_COLORS } from "storybook/internal/node-logger";
|
|
27
24
|
import { dedent } from "ts-dedent";
|
|
28
25
|
function validateVersionTransition(currentVersion, targetVersion) {
|
|
29
|
-
if (!currentVersion || !targetVersion)
|
|
30
|
-
return "ok";
|
|
31
|
-
}
|
|
32
|
-
const current = (0, import_semver.parse)(currentVersion);
|
|
33
|
-
const target = (0, import_semver.parse)(targetVersion);
|
|
34
|
-
if (!current || !target) {
|
|
35
|
-
return "ok";
|
|
36
|
-
}
|
|
37
|
-
if (current.major === 0 || target.major === 0) {
|
|
26
|
+
if (!currentVersion || !targetVersion)
|
|
38
27
|
return "ok";
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
return "downgrade";
|
|
42
|
-
}
|
|
43
|
-
const gap = target.major - current.major;
|
|
44
|
-
return gap > 1 ? "gap-too-large" : "ok";
|
|
28
|
+
let current = (0, import_semver.parse)(currentVersion), target = (0, import_semver.parse)(targetVersion);
|
|
29
|
+
return !current || !target || current.major === 0 || target.major === 0 ? "ok" : (0, import_semver.gt)(currentVersion, targetVersion) ? "downgrade" : target.major - current.major > 1 ? "gap-too-large" : "ok";
|
|
45
30
|
}
|
|
46
|
-
|
|
47
|
-
var blocker = createBlocker({
|
|
31
|
+
var blocker = {
|
|
48
32
|
id: "major-version-gap",
|
|
49
33
|
async check(options) {
|
|
50
|
-
|
|
34
|
+
let { packageManager } = options;
|
|
51
35
|
try {
|
|
52
|
-
|
|
53
|
-
if (!currentStorybookVersion)
|
|
54
|
-
return
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
const result = validateVersionTransition(currentStorybookVersion, target);
|
|
58
|
-
if (result === "ok") {
|
|
59
|
-
return false;
|
|
60
|
-
}
|
|
61
|
-
return {
|
|
36
|
+
let currentStorybookVersion = packageManager.getAllDependencies().storybook;
|
|
37
|
+
if (!currentStorybookVersion)
|
|
38
|
+
return !1;
|
|
39
|
+
let target = versions.storybook, result = validateVersionTransition(currentStorybookVersion, target);
|
|
40
|
+
return result === "ok" ? !1 : {
|
|
62
41
|
currentVersion: currentStorybookVersion,
|
|
63
42
|
reason: result
|
|
64
43
|
};
|
|
65
|
-
} catch
|
|
66
|
-
return
|
|
44
|
+
} catch {
|
|
45
|
+
return !1;
|
|
67
46
|
}
|
|
68
47
|
},
|
|
69
48
|
log(data) {
|
|
70
|
-
|
|
71
|
-
if (data.reason === "downgrade")
|
|
49
|
+
let coercedVersion = (0, import_semver.coerce)(data.currentVersion);
|
|
50
|
+
if (data.reason === "downgrade")
|
|
72
51
|
return {
|
|
73
52
|
title: "Downgrade Not Supported",
|
|
74
53
|
message: dedent`
|
|
@@ -76,10 +55,8 @@ var blocker = createBlocker({
|
|
|
76
55
|
`,
|
|
77
56
|
link: "https://storybook.js.org/docs/releases/migration-guide?ref=upgrade"
|
|
78
57
|
};
|
|
79
|
-
}
|
|
80
58
|
if (coercedVersion) {
|
|
81
|
-
|
|
82
|
-
const nextMajor = currentMajor + 1;
|
|
59
|
+
let nextMajor = (0, import_semver.major)(coercedVersion) + 1;
|
|
83
60
|
return {
|
|
84
61
|
title: "Major Version Gap Detected",
|
|
85
62
|
message: dedent`
|
|
@@ -93,7 +70,7 @@ var blocker = createBlocker({
|
|
|
93
70
|
}
|
|
94
71
|
throw new Error("No message found");
|
|
95
72
|
}
|
|
96
|
-
}
|
|
73
|
+
};
|
|
97
74
|
export {
|
|
98
75
|
blocker,
|
|
99
76
|
validateVersionTransition
|
|
@@ -1,34 +1,29 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_cnh1zw3akmi from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_cnh1zw3akmi from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_cnh1zw3akmi from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_cnh1zw3akmi.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_cnh1zw3akmi.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_cnh1zw3akmi.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
|
|
13
|
-
createBlocker
|
|
14
|
-
} from "./chunk-YA5UBW6S.js";
|
|
12
|
+
import "./chunk-G7WNAI4O.js";
|
|
15
13
|
import {
|
|
16
14
|
require_semver
|
|
17
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-P7TBIJSH.js";
|
|
18
16
|
import {
|
|
19
17
|
__toESM
|
|
20
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-VFUI46B4.js";
|
|
21
19
|
|
|
22
20
|
// src/autoblock/block-node-version.ts
|
|
23
21
|
var import_semver = __toESM(require_semver(), 1);
|
|
24
|
-
var blocker =
|
|
22
|
+
var blocker = {
|
|
25
23
|
id: "minimumNode20",
|
|
26
24
|
async check() {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
return { nodeVersion };
|
|
30
|
-
}
|
|
31
|
-
return false;
|
|
25
|
+
let nodeVersion = process.versions.node;
|
|
26
|
+
return nodeVersion && (0, import_semver.lt)(nodeVersion, "20.0.0") ? { nodeVersion } : !1;
|
|
32
27
|
},
|
|
33
28
|
log(data) {
|
|
34
29
|
return {
|
|
@@ -37,7 +32,7 @@ var blocker = createBlocker({
|
|
|
37
32
|
link: "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#nodejs--20"
|
|
38
33
|
};
|
|
39
34
|
}
|
|
40
|
-
}
|
|
35
|
+
};
|
|
41
36
|
export {
|
|
42
37
|
blocker
|
|
43
38
|
};
|
|
@@ -1,23 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_cnh1zw3akmi from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_cnh1zw3akmi from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_cnh1zw3akmi from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_cnh1zw3akmi.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_cnh1zw3akmi.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_cnh1zw3akmi.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
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
import "./chunk-S5E3PR7E.js";
|
|
20
|
-
import "./chunk-WW7YB2UR.js";
|
|
14
|
+
} from "./chunk-AYSGWBPB.js";
|
|
15
|
+
import "./chunk-ZAQE57EP.js";
|
|
16
|
+
import "./chunk-G7WNAI4O.js";
|
|
17
|
+
import "./chunk-P7TBIJSH.js";
|
|
18
|
+
import "./chunk-VFUI46B4.js";
|
|
21
19
|
|
|
22
20
|
// src/autoblock/block-webpack5-frameworks.ts
|
|
23
21
|
var minimalVersionsMap = {
|
|
@@ -29,16 +27,13 @@ var minimalVersionsMap = {
|
|
|
29
27
|
"@storybook/preset-html-webpack": "9.0.0",
|
|
30
28
|
"@storybook/web-components-webpack5": "9.0.0",
|
|
31
29
|
"@storybook/svelte-webpack5": "9.0.0"
|
|
32
|
-
}
|
|
33
|
-
var blocker = createBlocker({
|
|
30
|
+
}, blocker = {
|
|
34
31
|
id: "dependenciesVersions",
|
|
35
32
|
async check({ packageManager }) {
|
|
36
33
|
return findOutdatedPackage(minimalVersionsMap, { packageManager });
|
|
37
34
|
},
|
|
38
35
|
log(data) {
|
|
39
|
-
|
|
40
|
-
const link = "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#dropped-webpack5-builder-support-in-favor-of-vite";
|
|
41
|
-
let title;
|
|
36
|
+
let additionalInfo = "Please migrate your Webpack5-based frameworks to their Vite equivalents.", link = "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#dropped-webpack5-builder-support-in-favor-of-vite", title;
|
|
42
37
|
switch (data.packageName) {
|
|
43
38
|
case "@storybook/preact-webpack5":
|
|
44
39
|
case "@storybook/preset-preact-webpack":
|
|
@@ -65,7 +60,7 @@ var blocker = createBlocker({
|
|
|
65
60
|
link
|
|
66
61
|
};
|
|
67
62
|
}
|
|
68
|
-
}
|
|
63
|
+
};
|
|
69
64
|
export {
|
|
70
65
|
blocker
|
|
71
66
|
};
|