@storybook/cli 9.2.0-alpha.3 → 10.0.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.
@@ -0,0 +1,25 @@
1
+ #!/usr/bin/env node
2
+ import CJS_COMPAT_NODE_URL_vh9lpte9xjr from 'node:url';
3
+ import CJS_COMPAT_NODE_PATH_vh9lpte9xjr from 'node:path';
4
+ import CJS_COMPAT_NODE_MODULE_vh9lpte9xjr from "node:module";
5
+
6
+ var __filename = CJS_COMPAT_NODE_URL_vh9lpte9xjr.fileURLToPath(import.meta.url);
7
+ var __dirname = CJS_COMPAT_NODE_PATH_vh9lpte9xjr.dirname(__filename);
8
+ var require = CJS_COMPAT_NODE_MODULE_vh9lpte9xjr.createRequire(import.meta.url);
9
+
10
+ // ------------------------------------------------------------
11
+ // end of CJS compatibility banner, injected by Storybook's esbuild configuration
12
+ // ------------------------------------------------------------
13
+
14
+ // src/bin/index.ts
15
+ import { logger } from "storybook/internal/node-logger";
16
+ import { dedent } from "ts-dedent";
17
+ var [majorNodeVersion, minorNodeVersion] = process.versions.node.split(".").map(Number);
18
+ if (majorNodeVersion < 20 || majorNodeVersion === 20 && minorNodeVersion < 19 || majorNodeVersion === 22 && minorNodeVersion < 12) {
19
+ logger.error(
20
+ dedent`To run Storybook, you need Node.js version 20.19+ or 22.12+.
21
+ You are currently running Node.js ${process.version}. Please upgrade your Node.js installation.`
22
+ );
23
+ process.exit(1);
24
+ }
25
+ import("../_node-chunks/run-3WIAHA4V.js");
package/package.json CHANGED
@@ -1,9 +1,14 @@
1
1
  {
2
2
  "name": "@storybook/cli",
3
- "version": "9.2.0-alpha.3",
4
- "description": "Storybook CLI",
3
+ "version": "10.0.0-beta.1",
4
+ "description": "Storybook CLI: Develop, document, and test UI components in isolation",
5
5
  "keywords": [
6
- "storybook"
6
+ "storybook",
7
+ "cli",
8
+ "dev",
9
+ "build",
10
+ "upgrade",
11
+ "init"
7
12
  ],
8
13
  "homepage": "https://github.com/storybookjs/storybook/tree/next/code/lib/cli-storybook",
9
14
  "bugs": {
@@ -22,14 +27,9 @@
22
27
  "author": "Storybook Team",
23
28
  "type": "module",
24
29
  "exports": {
25
- ".": {
26
- "types": "./dist/index.d.ts",
27
- "import": "./dist/index.js"
28
- },
29
- "./bin/index.cjs": "./bin/index.cjs",
30
30
  "./package.json": "./package.json"
31
31
  },
32
- "bin": "./bin/index.cjs",
32
+ "bin": "./dist/bin/index.js",
33
33
  "files": [
34
34
  "bin/**/*",
35
35
  "dist/**/*",
@@ -37,17 +37,17 @@
37
37
  "!src/**/*"
38
38
  ],
39
39
  "scripts": {
40
- "check": "jiti ../../../scripts/prepare/check.ts",
41
- "prep": "jiti ../../../scripts/prepare/bundle.ts"
40
+ "check": "jiti ../../../scripts/check/check-package.ts",
41
+ "prep": "jiti ../../../scripts/build/build-package.ts"
42
42
  },
43
43
  "dependencies": {
44
- "@storybook/codemod": "9.2.0-alpha.3",
44
+ "@storybook/codemod": "10.0.0-beta.1",
45
45
  "@types/semver": "^7.3.4",
46
46
  "commander": "^12.1.0",
47
- "create-storybook": "9.2.0-alpha.3",
47
+ "create-storybook": "10.0.0-beta.1",
48
48
  "giget": "^1.0.0",
49
49
  "jscodeshift": "^0.15.1",
50
- "storybook": "9.2.0-alpha.3",
50
+ "storybook": "10.0.0-beta.1",
51
51
  "ts-dedent": "^2.0.0"
52
52
  },
53
53
  "devDependencies": {
@@ -72,15 +72,5 @@
72
72
  "publishConfig": {
73
73
  "access": "public"
74
74
  },
75
- "bundler": {
76
- "entries": [
77
- "./src/index.ts",
78
- "./src/bin/index.ts"
79
- ],
80
- "formats": [
81
- "cjs"
82
- ],
83
- "platform": "node"
84
- },
85
- "gitHead": "ce6a1e4a8d5ad69c699021a0b183df89cfc7b684"
75
+ "gitHead": "a8e7fd8a655c69780bc20b9749d2699e45beae16"
86
76
  }
package/bin/index.cjs DELETED
@@ -1,26 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- const majorNodeVersion = parseInt(process.versions.node, 10);
4
- if (majorNodeVersion < 20) {
5
- console.error('To run Storybook you need to have Node.js 20 or higher');
6
- process.exit(1);
7
- }
8
-
9
- // The Storybook CLI has a catch block for all of its commands, but if an error
10
- // occurs before the command even runs, for instance, if an import fails, then
11
- // such error will fall under the uncaughtException handler.
12
- // This is the earliest moment we can catch such errors.
13
- process.once('uncaughtException', (error) => {
14
- if (error.message.includes('string-width')) {
15
- console.error(
16
- [
17
- '🔴 Error: It looks like you are having a known issue with package hoisting.',
18
- 'Please check the following issue for details and solutions: https://github.com/storybookjs/storybook/issues/22431#issuecomment-1630086092\n\n',
19
- ].join('\n')
20
- );
21
- }
22
-
23
- throw error;
24
- });
25
-
26
- require('../dist/bin/index.cjs');