create-storybook 10.0.0-beta.5 → 10.0.0-beta.7
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/{chunk-WQMUYXH4.js → chunk-JARQLY2R.js} +6 -6
- package/dist/_node-chunks/{chunk-MYVMEZ5O.js → chunk-QGFZBIJ2.js} +39 -46
- package/dist/_node-chunks/{run-AD6IQZZF.js → run-RNZF3DUD.js} +9 -9
- package/dist/bin/index.js +8 -8
- package/dist/index.js +8 -8
- package/package.json +2 -2
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_foukqg23woq from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_foukqg23woq from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_foukqg23woq from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_foukqg23woq.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_foukqg23woq.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_foukqg23woq.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_foukqg23woq from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_foukqg23woq from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_foukqg23woq from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_foukqg23woq.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_foukqg23woq.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_foukqg23woq.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
__require,
|
|
17
17
|
__toESM,
|
|
18
18
|
require_dist
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-JARQLY2R.js";
|
|
20
20
|
|
|
21
21
|
// ../../node_modules/boxen/node_modules/emoji-regex/index.js
|
|
22
22
|
var require_emoji_regex = __commonJS({
|
|
@@ -17182,50 +17182,43 @@ var isValidWorkspaceConfigFile = /* @__PURE__ */ __name((fileContents) => {
|
|
|
17182
17182
|
return isValidWorkspaceConfig;
|
|
17183
17183
|
}, "isValidWorkspaceConfigFile");
|
|
17184
17184
|
var vitestConfigFiles = {
|
|
17185
|
-
condition: /* @__PURE__ */ __name(async (
|
|
17186
|
-
const
|
|
17187
|
-
|
|
17188
|
-
|
|
17189
|
-
|
|
17190
|
-
|
|
17191
|
-
|
|
17192
|
-
|
|
17193
|
-
);
|
|
17194
|
-
|
|
17195
|
-
|
|
17196
|
-
|
|
17197
|
-
|
|
17198
|
-
if (!isValidWorkspaceConfigFile(fileContents, babel)) {
|
|
17199
|
-
reasons.push(`Found an invalid workspace config file: ${vitestWorkspaceFile}`);
|
|
17200
|
-
}
|
|
17185
|
+
condition: /* @__PURE__ */ __name(async (_context, state) => {
|
|
17186
|
+
const reasons = [];
|
|
17187
|
+
const projectRoot = getProjectRoot();
|
|
17188
|
+
const vitestWorkspaceFile = any(
|
|
17189
|
+
["ts", "js", "json"].flatMap((ex) => [`vitest.workspace.${ex}`, `vitest.projects.${ex}`]),
|
|
17190
|
+
{ cwd: state.directory, last: projectRoot }
|
|
17191
|
+
);
|
|
17192
|
+
if (vitestWorkspaceFile?.endsWith(".json")) {
|
|
17193
|
+
reasons.push(`Cannot auto-update JSON workspace file: ${vitestWorkspaceFile}`);
|
|
17194
|
+
} else if (vitestWorkspaceFile) {
|
|
17195
|
+
const fileContents = await fs.readFile(vitestWorkspaceFile, "utf8");
|
|
17196
|
+
if (!isValidWorkspaceConfigFile(fileContents, babel)) {
|
|
17197
|
+
reasons.push(`Found an invalid workspace config file: ${vitestWorkspaceFile}`);
|
|
17201
17198
|
}
|
|
17202
|
-
|
|
17203
|
-
|
|
17204
|
-
|
|
17205
|
-
|
|
17206
|
-
|
|
17207
|
-
|
|
17208
|
-
|
|
17209
|
-
|
|
17210
|
-
|
|
17211
|
-
|
|
17212
|
-
|
|
17213
|
-
|
|
17214
|
-
|
|
17215
|
-
|
|
17216
|
-
|
|
17199
|
+
}
|
|
17200
|
+
const vitestConfigFile = any(
|
|
17201
|
+
["ts", "js", "tsx", "jsx", "cts", "cjs", "mts", "mjs"].map((ex) => `vitest.config.${ex}`),
|
|
17202
|
+
{ cwd: state.directory, last: projectRoot }
|
|
17203
|
+
);
|
|
17204
|
+
if (vitestConfigFile?.endsWith(".cts") || vitestConfigFile?.endsWith(".cjs")) {
|
|
17205
|
+
reasons.push(`Cannot auto-update CommonJS config file: ${vitestConfigFile}`);
|
|
17206
|
+
} else if (vitestConfigFile) {
|
|
17207
|
+
let isValidVitestConfig = false;
|
|
17208
|
+
const configContent = await fs.readFile(vitestConfigFile, "utf8");
|
|
17209
|
+
const parsedConfig = babel.babelParse(configContent);
|
|
17210
|
+
babel.traverse(parsedConfig, {
|
|
17211
|
+
ExportDefaultDeclaration(path) {
|
|
17212
|
+
if (isDefineConfigExpression(path.node.declaration) && isSafeToExtendWorkspace(path.node.declaration)) {
|
|
17213
|
+
isValidVitestConfig = true;
|
|
17217
17214
|
}
|
|
17218
|
-
});
|
|
17219
|
-
if (!isValidVitestConfig) {
|
|
17220
|
-
reasons.push(`Found an invalid Vitest config file: ${vitestConfigFile}`);
|
|
17221
17215
|
}
|
|
17216
|
+
});
|
|
17217
|
+
if (!isValidVitestConfig) {
|
|
17218
|
+
reasons.push(`Found an invalid Vitest config file: ${vitestConfigFile}`);
|
|
17222
17219
|
}
|
|
17223
|
-
return reasons.length ? { type: CompatibilityType.INCOMPATIBLE, reasons } : { type: CompatibilityType.COMPATIBLE };
|
|
17224
17220
|
}
|
|
17225
|
-
return {
|
|
17226
|
-
type: CompatibilityType.INCOMPATIBLE,
|
|
17227
|
-
reasons: deps.filter((p) => !context[p]).map((p) => `Missing ${p} on context`)
|
|
17228
|
-
};
|
|
17221
|
+
return reasons.length ? { type: CompatibilityType.INCOMPATIBLE, reasons } : { type: CompatibilityType.COMPATIBLE };
|
|
17229
17222
|
}, "condition")
|
|
17230
17223
|
};
|
|
17231
17224
|
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_foukqg23woq from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_foukqg23woq from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_foukqg23woq from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_foukqg23woq.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_foukqg23woq.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_foukqg23woq.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
|
initiate
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-QGFZBIJ2.js";
|
|
15
15
|
import {
|
|
16
16
|
__commonJS,
|
|
17
17
|
__name,
|
|
18
18
|
__require,
|
|
19
19
|
__toESM
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-JARQLY2R.js";
|
|
21
21
|
|
|
22
22
|
// ../../node_modules/commander/lib/error.js
|
|
23
23
|
var require_error = __commonJS({
|
|
@@ -3499,7 +3499,7 @@ var {
|
|
|
3499
3499
|
} = import_index.default;
|
|
3500
3500
|
|
|
3501
3501
|
// package.json
|
|
3502
|
-
var version = "10.0.0-beta.
|
|
3502
|
+
var version = "10.0.0-beta.7";
|
|
3503
3503
|
|
|
3504
3504
|
// src/bin/run.ts
|
|
3505
3505
|
addToGlobalContext("cliVersion", version);
|
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_foukqg23woq from 'node:url';
|
|
3
|
+
import CJS_COMPAT_NODE_PATH_foukqg23woq from 'node:path';
|
|
4
|
+
import CJS_COMPAT_NODE_MODULE_foukqg23woq from "node:module";
|
|
5
5
|
|
|
6
|
-
var __filename =
|
|
7
|
-
var __dirname =
|
|
8
|
-
var require =
|
|
6
|
+
var __filename = CJS_COMPAT_NODE_URL_foukqg23woq.fileURLToPath(import.meta.url);
|
|
7
|
+
var __dirname = CJS_COMPAT_NODE_PATH_foukqg23woq.dirname(__filename);
|
|
8
|
+
var require = CJS_COMPAT_NODE_MODULE_foukqg23woq.createRequire(import.meta.url);
|
|
9
9
|
|
|
10
10
|
// ------------------------------------------------------------
|
|
11
11
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -13,7 +13,7 @@ var require = CJS_COMPAT_NODE_MODULE_7jnjfkx8y.createRequire(import.meta.url);
|
|
|
13
13
|
import {
|
|
14
14
|
__toESM,
|
|
15
15
|
require_dist
|
|
16
|
-
} from "../_node-chunks/chunk-
|
|
16
|
+
} from "../_node-chunks/chunk-JARQLY2R.js";
|
|
17
17
|
|
|
18
18
|
// src/bin/index.ts
|
|
19
19
|
var import_ts_dedent = __toESM(require_dist(), 1);
|
|
@@ -26,4 +26,4 @@ if (majorNodeVersion < 20 || majorNodeVersion === 20 && minorNodeVersion < 19 ||
|
|
|
26
26
|
);
|
|
27
27
|
process.exit(1);
|
|
28
28
|
}
|
|
29
|
-
import("../_node-chunks/run-
|
|
29
|
+
import("../_node-chunks/run-RNZF3DUD.js");
|
package/dist/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_foukqg23woq from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_foukqg23woq from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_foukqg23woq from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_foukqg23woq.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_foukqg23woq.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_foukqg23woq.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
|
doInitiate
|
|
14
|
-
} from "./_node-chunks/chunk-
|
|
15
|
-
import "./_node-chunks/chunk-
|
|
14
|
+
} from "./_node-chunks/chunk-QGFZBIJ2.js";
|
|
15
|
+
import "./_node-chunks/chunk-JARQLY2R.js";
|
|
16
16
|
export {
|
|
17
17
|
doInitiate as initiate
|
|
18
18
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-storybook",
|
|
3
|
-
"version": "10.0.0-beta.
|
|
3
|
+
"version": "10.0.0-beta.7",
|
|
4
4
|
"description": "Storybook installer: Develop, document, and test UI components in isolation",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"semver": "^7.6.2",
|
|
46
|
-
"storybook": "10.0.0-beta.
|
|
46
|
+
"storybook": "10.0.0-beta.7"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@types/prompts": "^2.0.9",
|