@storybook/cli 10.1.0-alpha.9 → 10.1.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_node-chunks/{block-dependencies-versions-BGKJ74J2.js → block-dependencies-versions-RWX4DX7W.js} +13 -16
- package/dist/_node-chunks/{block-experimental-addon-test-5WOB3QXI.js → block-experimental-addon-test-OM3MVIEF.js} +16 -23
- package/dist/_node-chunks/block-major-version-7X5ELMS5.js +77 -0
- package/dist/_node-chunks/block-node-version-IVL2SO4R.js +38 -0
- package/dist/_node-chunks/{block-webpack5-frameworks-UY6KAASI.js → block-webpack5-frameworks-DRJJONK4.js} +14 -19
- package/dist/_node-chunks/chunk-B52WZYLE.js +1160 -0
- package/dist/_node-chunks/chunk-H7CKG54H.js +45 -0
- package/dist/_node-chunks/chunk-IMEW6HKQ.js +11 -0
- package/dist/_node-chunks/chunk-OVP33YUF.js +591 -0
- package/dist/_node-chunks/chunk-YET6YMCR.js +4375 -0
- package/dist/_node-chunks/{globby-DNHQPHUT.js → globby-7EVLGXCD.js} +8 -8
- package/dist/_node-chunks/p-limit-DCVNL4HF.js +116 -0
- package/dist/_node-chunks/run-CFKOL6SH.js +9627 -0
- package/dist/bin/index.js +10 -13
- package/package.json +5 -9
- package/dist/_node-chunks/block-major-version-UQXLZ64F.js +0 -100
- package/dist/_node-chunks/block-node-version-QP5KXT5Q.js +0 -43
- package/dist/_node-chunks/chunk-3ISYWOFW.js +0 -1770
- package/dist/_node-chunks/chunk-5JXVRX4Y.js +0 -50
- package/dist/_node-chunks/chunk-7ZMKNOV3.js +0 -24
- package/dist/_node-chunks/chunk-KK6KWG7C.js +0 -1939
- package/dist/_node-chunks/chunk-QLMPSJFV.js +0 -6737
- package/dist/_node-chunks/p-limit-YAWAKA4U.js +0 -168
- package/dist/_node-chunks/run-IFPXJ7NW.js +0 -11461
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_7na3jaknjbu from 'node:url';
|
|
3
|
+
import CJS_COMPAT_NODE_PATH_7na3jaknjbu from 'node:path';
|
|
4
|
+
import CJS_COMPAT_NODE_MODULE_7na3jaknjbu from "node:module";
|
|
5
5
|
|
|
6
|
-
var __filename =
|
|
7
|
-
var __dirname =
|
|
8
|
-
var require =
|
|
6
|
+
var __filename = CJS_COMPAT_NODE_URL_7na3jaknjbu.fileURLToPath(import.meta.url);
|
|
7
|
+
var __dirname = CJS_COMPAT_NODE_PATH_7na3jaknjbu.dirname(__filename);
|
|
8
|
+
var require = CJS_COMPAT_NODE_MODULE_7na3jaknjbu.createRequire(import.meta.url);
|
|
9
9
|
|
|
10
10
|
// ------------------------------------------------------------
|
|
11
11
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -15,11 +15,8 @@ var require = CJS_COMPAT_NODE_MODULE_i5timqwdlx.createRequire(import.meta.url);
|
|
|
15
15
|
import { logger } from "storybook/internal/node-logger";
|
|
16
16
|
import { dedent } from "ts-dedent";
|
|
17
17
|
var [majorNodeVersion, minorNodeVersion] = process.versions.node.split(".").map(Number);
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
dedent`To run Storybook, you need Node.js version 20.19+ or 22.12+.
|
|
18
|
+
(majorNodeVersion < 20 || majorNodeVersion === 20 && minorNodeVersion < 19 || majorNodeVersion === 22 && minorNodeVersion < 12) && (logger.error(
|
|
19
|
+
dedent`To run Storybook, you need Node.js version 20.19+ or 22.12+.
|
|
21
20
|
You are currently running Node.js ${process.version}. Please upgrade your Node.js installation.`
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
import("../_node-chunks/run-IFPXJ7NW.js");
|
|
21
|
+
), process.exit(1));
|
|
22
|
+
import("../_node-chunks/run-CFKOL6SH.js");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/cli",
|
|
3
|
-
"version": "10.1.0-
|
|
3
|
+
"version": "10.1.0-beta.1",
|
|
4
4
|
"description": "Storybook CLI: Develop, document, and test UI components in isolation",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -41,29 +41,25 @@
|
|
|
41
41
|
"prep": "jiti ../../../scripts/build/build-package.ts"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@storybook/codemod": "10.1.0-
|
|
44
|
+
"@storybook/codemod": "10.1.0-beta.1",
|
|
45
45
|
"@types/semver": "^7.3.4",
|
|
46
46
|
"commander": "^14.0.1",
|
|
47
|
-
"create-storybook": "10.1.0-
|
|
48
|
-
"giget": "^2.0.0",
|
|
47
|
+
"create-storybook": "10.1.0-beta.1",
|
|
49
48
|
"jscodeshift": "^0.15.1",
|
|
50
|
-
"storybook": "10.1.0-
|
|
49
|
+
"storybook": "10.1.0-beta.1",
|
|
51
50
|
"ts-dedent": "^2.0.0"
|
|
52
51
|
},
|
|
53
52
|
"devDependencies": {
|
|
54
53
|
"@types/cross-spawn": "^6.0.6",
|
|
55
54
|
"@types/prompts": "^2.0.9",
|
|
56
|
-
"boxen": "^8.0.1",
|
|
57
55
|
"comment-json": "^4.2.5",
|
|
58
56
|
"cross-spawn": "^7.0.6",
|
|
59
57
|
"empathic": "^2.0.0",
|
|
60
58
|
"envinfo": "^7.14.0",
|
|
61
|
-
"execa": "^9.6.0",
|
|
62
59
|
"globby": "^14.0.1",
|
|
63
60
|
"leven": "^4.0.0",
|
|
64
61
|
"p-limit": "^6.2.0",
|
|
65
62
|
"picocolors": "^1.1.0",
|
|
66
|
-
"prompts": "^2.4.0",
|
|
67
63
|
"semver": "^7.7.2",
|
|
68
64
|
"slash": "^5.0.0",
|
|
69
65
|
"tiny-invariant": "^1.3.3",
|
|
@@ -72,5 +68,5 @@
|
|
|
72
68
|
"publishConfig": {
|
|
73
69
|
"access": "public"
|
|
74
70
|
},
|
|
75
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "a8e7fd8a655c69780bc20b9749d2699e45beae1l"
|
|
76
72
|
}
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_i5timqwdlx from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_i5timqwdlx from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_i5timqwdlx from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_i5timqwdlx.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_i5timqwdlx.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_i5timqwdlx.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|
|
12
|
-
import {
|
|
13
|
-
createBlocker
|
|
14
|
-
} from "./chunk-7ZMKNOV3.js";
|
|
15
|
-
import {
|
|
16
|
-
require_semver
|
|
17
|
-
} from "./chunk-KK6KWG7C.js";
|
|
18
|
-
import {
|
|
19
|
-
__name,
|
|
20
|
-
__toESM
|
|
21
|
-
} from "./chunk-5JXVRX4Y.js";
|
|
22
|
-
|
|
23
|
-
// src/autoblock/block-major-version.ts
|
|
24
|
-
var import_semver = __toESM(require_semver(), 1);
|
|
25
|
-
import { versions } from "storybook/internal/common";
|
|
26
|
-
import { CLI_COLORS } from "storybook/internal/node-logger";
|
|
27
|
-
import { dedent } from "ts-dedent";
|
|
28
|
-
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) {
|
|
38
|
-
return "ok";
|
|
39
|
-
}
|
|
40
|
-
if ((0, import_semver.gt)(currentVersion, targetVersion)) {
|
|
41
|
-
return "downgrade";
|
|
42
|
-
}
|
|
43
|
-
const gap = target.major - current.major;
|
|
44
|
-
return gap > 1 ? "gap-too-large" : "ok";
|
|
45
|
-
}
|
|
46
|
-
__name(validateVersionTransition, "validateVersionTransition");
|
|
47
|
-
var blocker = createBlocker({
|
|
48
|
-
id: "major-version-gap",
|
|
49
|
-
async check(options) {
|
|
50
|
-
const { packageManager } = options;
|
|
51
|
-
try {
|
|
52
|
-
const currentStorybookVersion = packageManager.getAllDependencies().storybook;
|
|
53
|
-
if (!currentStorybookVersion) {
|
|
54
|
-
return false;
|
|
55
|
-
}
|
|
56
|
-
const target = versions.storybook;
|
|
57
|
-
const result = validateVersionTransition(currentStorybookVersion, target);
|
|
58
|
-
if (result === "ok") {
|
|
59
|
-
return false;
|
|
60
|
-
}
|
|
61
|
-
return {
|
|
62
|
-
currentVersion: currentStorybookVersion,
|
|
63
|
-
reason: result
|
|
64
|
-
};
|
|
65
|
-
} catch (e) {
|
|
66
|
-
return false;
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
log(data) {
|
|
70
|
-
const coercedVersion = (0, import_semver.coerce)(data.currentVersion);
|
|
71
|
-
if (data.reason === "downgrade") {
|
|
72
|
-
return {
|
|
73
|
-
title: "Downgrade Not Supported",
|
|
74
|
-
message: dedent`
|
|
75
|
-
Your Storybook version (v${data.currentVersion}) is newer than the target release (v${versions.storybook}). Downgrading is not supported.
|
|
76
|
-
`,
|
|
77
|
-
link: "https://storybook.js.org/docs/releases/migration-guide?ref=upgrade"
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
if (coercedVersion) {
|
|
81
|
-
const currentMajor = (0, import_semver.major)(coercedVersion);
|
|
82
|
-
const nextMajor = currentMajor + 1;
|
|
83
|
-
return {
|
|
84
|
-
title: "Major Version Gap Detected",
|
|
85
|
-
message: dedent`
|
|
86
|
-
Your Storybook version (v${data.currentVersion}) is more than one major version behind the target release (v${versions.storybook}). Please upgrade one major version at a time.
|
|
87
|
-
|
|
88
|
-
You can upgrade to version ${nextMajor} by running:
|
|
89
|
-
${CLI_COLORS.info(`npx storybook@${nextMajor} upgrade`)}
|
|
90
|
-
`,
|
|
91
|
-
link: `https://storybook.js.org/docs/${nextMajor}/migration-guide?ref=upgrade`
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
throw new Error("No message found");
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
export {
|
|
98
|
-
blocker,
|
|
99
|
-
validateVersionTransition
|
|
100
|
-
};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_i5timqwdlx from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_i5timqwdlx from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_i5timqwdlx from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_i5timqwdlx.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_i5timqwdlx.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_i5timqwdlx.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|
|
12
|
-
import {
|
|
13
|
-
createBlocker
|
|
14
|
-
} from "./chunk-7ZMKNOV3.js";
|
|
15
|
-
import {
|
|
16
|
-
require_semver
|
|
17
|
-
} from "./chunk-KK6KWG7C.js";
|
|
18
|
-
import {
|
|
19
|
-
__toESM
|
|
20
|
-
} from "./chunk-5JXVRX4Y.js";
|
|
21
|
-
|
|
22
|
-
// src/autoblock/block-node-version.ts
|
|
23
|
-
var import_semver = __toESM(require_semver(), 1);
|
|
24
|
-
var blocker = createBlocker({
|
|
25
|
-
id: "minimumNode20",
|
|
26
|
-
async check() {
|
|
27
|
-
const nodeVersion = process.versions.node;
|
|
28
|
-
if (nodeVersion && (0, import_semver.lt)(nodeVersion, "20.0.0")) {
|
|
29
|
-
return { nodeVersion };
|
|
30
|
-
}
|
|
31
|
-
return false;
|
|
32
|
-
},
|
|
33
|
-
log(data) {
|
|
34
|
-
return {
|
|
35
|
-
title: "Node.js 20 support removed",
|
|
36
|
-
message: `We've detected you're using Node.js v${data.nodeVersion}. Storybook needs Node.js 20 or higher.`,
|
|
37
|
-
link: "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#nodejs--20"
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
export {
|
|
42
|
-
blocker
|
|
43
|
-
};
|