@storybook/cli 10.1.0-alpha.8 → 10.1.0-beta.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-HTRZA7NK.js → block-dependencies-versions-3PIVQXIU.js} +13 -16
- package/dist/_node-chunks/{block-experimental-addon-test-RCEI7ZNN.js → block-experimental-addon-test-KE2C4JGB.js} +16 -23
- package/dist/_node-chunks/block-major-version-KRIJK2YQ.js +77 -0
- package/dist/_node-chunks/block-node-version-L6HENKCD.js +38 -0
- package/dist/_node-chunks/{block-webpack5-frameworks-T3V3TWUF.js → block-webpack5-frameworks-OMXLUWQP.js} +14 -19
- package/dist/_node-chunks/chunk-72NUUKPO.js +591 -0
- package/dist/_node-chunks/chunk-BHESI2CN.js +4375 -0
- package/dist/_node-chunks/chunk-PG6QB7FH.js +11 -0
- package/dist/_node-chunks/chunk-RYVNNZMV.js +45 -0
- package/dist/_node-chunks/chunk-XARGUZ3T.js +1160 -0
- package/dist/_node-chunks/{globby-2OFECE6D.js → globby-5YY2Y7DB.js} +8 -8
- package/dist/_node-chunks/p-limit-IDS5JGBQ.js +116 -0
- package/dist/_node-chunks/run-SE5SJ4IO.js +9627 -0
- package/dist/bin/index.js +10 -13
- package/package.json +5 -9
- package/dist/_node-chunks/block-major-version-5EWJKQ37.js +0 -100
- package/dist/_node-chunks/block-node-version-G56GAL3A.js +0 -43
- package/dist/_node-chunks/chunk-3SQ32WLK.js +0 -50
- package/dist/_node-chunks/chunk-BJB5ZHE4.js +0 -1939
- package/dist/_node-chunks/chunk-HL6AJJ6S.js +0 -6737
- package/dist/_node-chunks/chunk-IWMIPYGD.js +0 -24
- package/dist/_node-chunks/chunk-N52FW6OW.js +0 -1770
- package/dist/_node-chunks/p-limit-QY5RPRLQ.js +0 -168
- package/dist/_node-chunks/run-FI4DEZHJ.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_s47ofujcb4 from 'node:url';
|
|
3
|
+
import CJS_COMPAT_NODE_PATH_s47ofujcb4 from 'node:path';
|
|
4
|
+
import CJS_COMPAT_NODE_MODULE_s47ofujcb4 from "node:module";
|
|
5
5
|
|
|
6
|
-
var __filename =
|
|
7
|
-
var __dirname =
|
|
8
|
-
var require =
|
|
6
|
+
var __filename = CJS_COMPAT_NODE_URL_s47ofujcb4.fileURLToPath(import.meta.url);
|
|
7
|
+
var __dirname = CJS_COMPAT_NODE_PATH_s47ofujcb4.dirname(__filename);
|
|
8
|
+
var require = CJS_COMPAT_NODE_MODULE_s47ofujcb4.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_eqzh0h3j61h.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-FI4DEZHJ.js");
|
|
21
|
+
), process.exit(1));
|
|
22
|
+
import("../_node-chunks/run-SE5SJ4IO.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.0",
|
|
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.0",
|
|
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.0",
|
|
49
48
|
"jscodeshift": "^0.15.1",
|
|
50
|
-
"storybook": "10.1.0-
|
|
49
|
+
"storybook": "10.1.0-beta.0",
|
|
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_eqzh0h3j61h from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_eqzh0h3j61h from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_eqzh0h3j61h from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_eqzh0h3j61h.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_eqzh0h3j61h.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_eqzh0h3j61h.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-IWMIPYGD.js";
|
|
15
|
-
import {
|
|
16
|
-
require_semver
|
|
17
|
-
} from "./chunk-BJB5ZHE4.js";
|
|
18
|
-
import {
|
|
19
|
-
__name,
|
|
20
|
-
__toESM
|
|
21
|
-
} from "./chunk-3SQ32WLK.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_eqzh0h3j61h from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_eqzh0h3j61h from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_eqzh0h3j61h from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_eqzh0h3j61h.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_eqzh0h3j61h.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_eqzh0h3j61h.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-IWMIPYGD.js";
|
|
15
|
-
import {
|
|
16
|
-
require_semver
|
|
17
|
-
} from "./chunk-BJB5ZHE4.js";
|
|
18
|
-
import {
|
|
19
|
-
__toESM
|
|
20
|
-
} from "./chunk-3SQ32WLK.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
|
-
};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_eqzh0h3j61h from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_eqzh0h3j61h from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_eqzh0h3j61h from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_eqzh0h3j61h.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_eqzh0h3j61h.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_eqzh0h3j61h.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|
|
12
|
-
var __create = Object.create;
|
|
13
|
-
var __defProp = Object.defineProperty;
|
|
14
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
15
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
16
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
17
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
18
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
19
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
20
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
21
|
-
}) : x)(function(x) {
|
|
22
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
23
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
24
|
-
});
|
|
25
|
-
var __commonJS = (cb, mod) => function __require2() {
|
|
26
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
27
|
-
};
|
|
28
|
-
var __copyProps = (to, from, except, desc) => {
|
|
29
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
30
|
-
for (let key of __getOwnPropNames(from))
|
|
31
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
32
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
33
|
-
}
|
|
34
|
-
return to;
|
|
35
|
-
};
|
|
36
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
37
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
38
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
39
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
40
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
41
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
42
|
-
mod
|
|
43
|
-
));
|
|
44
|
-
|
|
45
|
-
export {
|
|
46
|
-
__name,
|
|
47
|
-
__require,
|
|
48
|
-
__commonJS,
|
|
49
|
-
__toESM
|
|
50
|
-
};
|