@storybook/cli 11.0.0-alpha.4 → 11.0.0-alpha.6
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-create-react-app-TLUHF4IT.js → block-create-react-app-WKHHADM4.js} +8 -8
- package/dist/_node-chunks/{block-dependencies-versions-LYYCZWML.js → block-dependencies-versions-27KW67SX.js} +22 -11
- package/dist/_node-chunks/{block-experimental-addon-test-B4XO5OJB.js → block-experimental-addon-test-N7KCMWRE.js} +9 -9
- package/dist/_node-chunks/{block-major-version-65KQDEYM.js → block-major-version-J6AVFJZW.js} +9 -9
- package/dist/_node-chunks/{block-node-version-X6H65JCO.js → block-node-version-C2L5XHUW.js} +8 -8
- package/dist/_node-chunks/{block-react-legacy-root-api-JF345D2G.js → block-react-legacy-root-api-ICQ6ZL4I.js} +8 -8
- package/dist/_node-chunks/{block-webpack5-frameworks-LFSI53LP.js → block-webpack5-frameworks-FIWTCLDF.js} +11 -11
- package/dist/_node-chunks/chunk-4ENQP5RB.js +11 -0
- package/dist/_node-chunks/{chunk-WXEOBYYK.js → chunk-FWESDDOE.js} +6 -6
- package/dist/_node-chunks/{chunk-Y43KIKHK.js → chunk-TN7W2H4Z.js} +50 -45
- package/dist/_node-chunks/{chunk-YBPPS4RU.js → chunk-XI7I7UPG.js} +7 -7
- package/dist/_node-chunks/{chunk-A7DKVA5E.js → chunk-ZSKFJUTC.js} +7 -7
- package/dist/_node-chunks/{globby-I74JNCO6.js → globby-QGVHATI2.js} +8 -8
- package/dist/_node-chunks/{p-limit-LF2SB6TM.js → p-limit-TRSAPTRX.js} +7 -7
- package/dist/_node-chunks/{run-SOSXGFEL.js → run-CCGS4PIS.js} +1648 -1496
- package/dist/bin/index.js +7 -7
- package/package.json +4 -4
- package/dist/_node-chunks/chunk-3NH7GMSS.js +0 -11
package/dist/_node-chunks/{block-create-react-app-TLUHF4IT.js → block-create-react-app-WKHHADM4.js}
RENAMED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_vxh3qha62y from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_vxh3qha62y from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_vxh3qha62y from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_vxh3qha62y.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_vxh3qha62y.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_vxh3qha62y.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 "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-4ENQP5RB.js";
|
|
13
|
+
import "./chunk-FWESDDOE.js";
|
|
14
14
|
|
|
15
15
|
// src/autoblock/block-create-react-app.ts
|
|
16
16
|
import { dedent } from "ts-dedent";
|
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_vxh3qha62y from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_vxh3qha62y from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_vxh3qha62y from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_vxh3qha62y.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_vxh3qha62y.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_vxh3qha62y.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 "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-TN7W2H4Z.js";
|
|
15
|
+
import "./chunk-ZSKFJUTC.js";
|
|
16
|
+
import "./chunk-XI7I7UPG.js";
|
|
17
|
+
import "./chunk-4ENQP5RB.js";
|
|
18
|
+
import "./chunk-FWESDDOE.js";
|
|
19
19
|
|
|
20
20
|
// src/autoblock/block-dependencies-versions.ts
|
|
21
21
|
import { dedent } from "ts-dedent";
|
|
22
22
|
var minimalVersionsMap = {
|
|
23
23
|
"@angular/core": "21.0.0",
|
|
24
|
+
"@sveltejs/kit": "3.0.0",
|
|
24
25
|
next: "15.0.0",
|
|
25
26
|
preact: "10.8.0",
|
|
26
27
|
react: "18.0.0",
|
|
@@ -71,6 +72,16 @@ var minimalVersionsMap = {
|
|
|
71
72
|
`,
|
|
72
73
|
link: "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#nextjs-require-v15-and-up"
|
|
73
74
|
};
|
|
75
|
+
case "@sveltejs/kit":
|
|
76
|
+
return {
|
|
77
|
+
title: "Require SvelteKit v3 and up",
|
|
78
|
+
message: dedent`
|
|
79
|
+
Support for SvelteKit < 3 has been removed.
|
|
80
|
+
Run \`npx sv migrate sveltekit-3\` to upgrade SvelteKit first, then upgrade Storybook.
|
|
81
|
+
Please see the migration guide for more information:
|
|
82
|
+
`,
|
|
83
|
+
link: "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#sveltekit-require-v3-and-up"
|
|
84
|
+
};
|
|
74
85
|
case "vitest":
|
|
75
86
|
return {
|
|
76
87
|
title: "Vitest 4 required by @storybook/addon-vitest",
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_vxh3qha62y from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_vxh3qha62y from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_vxh3qha62y from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_vxh3qha62y.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_vxh3qha62y.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_vxh3qha62y.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
|
require_semver
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-XI7I7UPG.js";
|
|
15
|
+
import "./chunk-4ENQP5RB.js";
|
|
16
16
|
import {
|
|
17
17
|
__toESM
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-FWESDDOE.js";
|
|
19
19
|
|
|
20
20
|
// src/autoblock/block-experimental-addon-test.ts
|
|
21
21
|
var import_semver = __toESM(require_semver(), 1);
|
package/dist/_node-chunks/{block-major-version-65KQDEYM.js → block-major-version-J6AVFJZW.js}
RENAMED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_vxh3qha62y from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_vxh3qha62y from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_vxh3qha62y from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_vxh3qha62y.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_vxh3qha62y.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_vxh3qha62y.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
|
require_semver
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-XI7I7UPG.js";
|
|
15
|
+
import "./chunk-4ENQP5RB.js";
|
|
16
16
|
import {
|
|
17
17
|
__toESM
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-FWESDDOE.js";
|
|
19
19
|
|
|
20
20
|
// src/autoblock/block-major-version.ts
|
|
21
21
|
var import_semver = __toESM(require_semver(), 1);
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_vxh3qha62y from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_vxh3qha62y from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_vxh3qha62y from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_vxh3qha62y.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_vxh3qha62y.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_vxh3qha62y.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 "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-4ENQP5RB.js";
|
|
13
|
+
import "./chunk-FWESDDOE.js";
|
|
14
14
|
|
|
15
15
|
// src/autoblock/block-node-version.ts
|
|
16
16
|
import { MIN_SUPPORTED_NODE_DESCRIPTION, isNodeVersionSupported } from "storybook/internal/common";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_vxh3qha62y from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_vxh3qha62y from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_vxh3qha62y from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_vxh3qha62y.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_vxh3qha62y.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_vxh3qha62y.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 "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-4ENQP5RB.js";
|
|
13
|
+
import "./chunk-FWESDDOE.js";
|
|
14
14
|
|
|
15
15
|
// src/autoblock/block-react-legacy-root-api.ts
|
|
16
16
|
import { dedent } from "ts-dedent";
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_vxh3qha62y from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_vxh3qha62y from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_vxh3qha62y from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_vxh3qha62y.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_vxh3qha62y.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_vxh3qha62y.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 "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-TN7W2H4Z.js";
|
|
15
|
+
import "./chunk-ZSKFJUTC.js";
|
|
16
|
+
import "./chunk-XI7I7UPG.js";
|
|
17
|
+
import "./chunk-4ENQP5RB.js";
|
|
18
|
+
import "./chunk-FWESDDOE.js";
|
|
19
19
|
|
|
20
20
|
// src/autoblock/block-webpack5-frameworks.ts
|
|
21
21
|
var minimalVersionsMap = {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_vxh3qha62y from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_vxh3qha62y from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_vxh3qha62y from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_vxh3qha62y.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_vxh3qha62y.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_vxh3qha62y.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_vxh3qha62y from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_vxh3qha62y from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_vxh3qha62y from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_vxh3qha62y.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_vxh3qha62y.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_vxh3qha62y.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_vxh3qha62y from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_vxh3qha62y from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_vxh3qha62y from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_vxh3qha62y.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_vxh3qha62y.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_vxh3qha62y.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -12,14 +12,14 @@ var require = CJS_COMPAT_NODE_MODULE_ahve6ing6uv.createRequire(import.meta.url);
|
|
|
12
12
|
import {
|
|
13
13
|
globby,
|
|
14
14
|
globbySync
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-ZSKFJUTC.js";
|
|
16
16
|
import {
|
|
17
17
|
require_semver
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-XI7I7UPG.js";
|
|
19
19
|
import {
|
|
20
20
|
__commonJS,
|
|
21
21
|
__toESM
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-FWESDDOE.js";
|
|
23
23
|
|
|
24
24
|
// ../../../node_modules/picocolors/picocolors.js
|
|
25
25
|
var require_picocolors = __commonJS({
|
|
@@ -106,6 +106,7 @@ import {
|
|
|
106
106
|
} from "storybook/internal/core-server";
|
|
107
107
|
import { logTracker, logger, prompt } from "storybook/internal/node-logger";
|
|
108
108
|
import {
|
|
109
|
+
UpgradeStorybookConfigDirNotFoundError,
|
|
109
110
|
UpgradeStorybookToLowerVersionError,
|
|
110
111
|
UpgradeStorybookUnknownCurrentVersionError
|
|
111
112
|
} from "storybook/internal/server-errors";
|
|
@@ -133,13 +134,13 @@ var import_picocolors = __toESM(require_picocolors(), 1), import_semver = __toES
|
|
|
133
134
|
// src/autoblock/index.ts
|
|
134
135
|
var blockers = () => [
|
|
135
136
|
// add/remove blockers here
|
|
136
|
-
import("./block-dependencies-versions-
|
|
137
|
-
import("./block-create-react-app-
|
|
138
|
-
import("./block-node-version-
|
|
139
|
-
import("./block-webpack5-frameworks-
|
|
140
|
-
import("./block-major-version-
|
|
141
|
-
import("./block-experimental-addon-test-
|
|
142
|
-
import("./block-react-legacy-root-api-
|
|
137
|
+
import("./block-dependencies-versions-27KW67SX.js"),
|
|
138
|
+
import("./block-create-react-app-WKHHADM4.js"),
|
|
139
|
+
import("./block-node-version-C2L5XHUW.js"),
|
|
140
|
+
import("./block-webpack5-frameworks-FIWTCLDF.js"),
|
|
141
|
+
import("./block-major-version-J6AVFJZW.js"),
|
|
142
|
+
import("./block-experimental-addon-test-N7KCMWRE.js"),
|
|
143
|
+
import("./block-react-legacy-root-api-ICQ6ZL4I.js")
|
|
143
144
|
], autoblock = async (options, list = blockers()) => list.length === 0 ? null : await Promise.all(
|
|
144
145
|
list.map(async (i) => {
|
|
145
146
|
let blocker = (await i).blocker;
|
|
@@ -199,9 +200,7 @@ var validateUpgradeCompatibility = (currentVersion, beforeVersion, isCanary) =>
|
|
|
199
200
|
onlyDirectories: !0,
|
|
200
201
|
followSymbolicLinks: !1
|
|
201
202
|
});
|
|
202
|
-
return logger.debug(`Found ${storybookDirs.length} Storybook projects`), storybookDirs
|
|
203
|
-
message: "No Storybook projects were found. Please enter the path to the .storybook directory for the project you want to upgrade."
|
|
204
|
-
})] : storybookDirs;
|
|
203
|
+
return logger.debug(`Found ${storybookDirs.length} Storybook projects`), storybookDirs;
|
|
205
204
|
} catch (error) {
|
|
206
205
|
throw logger.error("Failed to find Storybook projects"), error;
|
|
207
206
|
}
|
|
@@ -268,7 +267,7 @@ var processProject = async ({
|
|
|
268
267
|
};
|
|
269
268
|
}
|
|
270
269
|
}, collectProjects = async (options, configDirs, onProjectScanStart) => {
|
|
271
|
-
let { default: pLimit } = await import("./p-limit-
|
|
270
|
+
let { default: pLimit } = await import("./p-limit-TRSAPTRX.js"), currentCLIVersion = versions.storybook, limit = pLimit(5), projectPromises = configDirs.map(
|
|
272
271
|
(configDir) => limit(
|
|
273
272
|
() => processProject({
|
|
274
273
|
configDir,
|
|
@@ -307,7 +306,9 @@ var processProject = async ({
|
|
|
307
306
|
try {
|
|
308
307
|
let upgradePromises = satelliteDependencies.map(async (dependency) => {
|
|
309
308
|
try {
|
|
310
|
-
let
|
|
309
|
+
let tags = isCLIPrerelease ? [dependency, `${dependency}@next`] : [dependency], versions2 = await Promise.all(
|
|
310
|
+
tags.map((tag) => packageManager.latestVersion(tag))
|
|
311
|
+
), [mostRecentVersion] = (0, import_semver.rsort)(versions2.filter((version) => version !== null));
|
|
311
312
|
if (!mostRecentVersion)
|
|
312
313
|
return null;
|
|
313
314
|
let { modifier } = getVersionModifier(dependencies[dependency] ?? "");
|
|
@@ -330,28 +331,26 @@ var processProject = async ({
|
|
|
330
331
|
generateUpgradeSpecs(packageJson.devDependencies, config),
|
|
331
332
|
generateUpgradeSpecs(packageJson.peerDependencies, config)
|
|
332
333
|
]);
|
|
333
|
-
logger.debug(JSON.stringify({ upgradedDependencies }, null, 2)), logger.debug(JSON.stringify({ upgradedDevDependencies }, null, 2)), logger.debug(JSON.stringify({ upgradedPeerDependencies }, null, 2))
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
type
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
upgradedPeerDependencies
|
|
354
|
-
);
|
|
334
|
+
logger.debug(JSON.stringify({ upgradedDependencies }, null, 2)), logger.debug(JSON.stringify({ upgradedDevDependencies }, null, 2)), logger.debug(JSON.stringify({ upgradedPeerDependencies }, null, 2));
|
|
335
|
+
let upgrades = [
|
|
336
|
+
["dependencies", upgradedDependencies],
|
|
337
|
+
["devDependencies", upgradedDevDependencies],
|
|
338
|
+
["peerDependencies", upgradedPeerDependencies]
|
|
339
|
+
];
|
|
340
|
+
for (let [type, specifiers] of upgrades) {
|
|
341
|
+
let directSpecifiers = packageManager.writeCatalogUpgrades(
|
|
342
|
+
specifiers,
|
|
343
|
+
packageJson[type] ?? {}
|
|
344
|
+
);
|
|
345
|
+
await packageManager.addDependencies(
|
|
346
|
+
{
|
|
347
|
+
type,
|
|
348
|
+
skipInstall: !0,
|
|
349
|
+
packageJsonInfo: JsPackageManager.getPackageJsonInfo(packageJsonPath)
|
|
350
|
+
},
|
|
351
|
+
directSpecifiers
|
|
352
|
+
);
|
|
353
|
+
}
|
|
355
354
|
}
|
|
356
355
|
}, formatProjectDirectories = (projectData, modifier) => projectData.length === 0 ? "" : projectData.map((project) => project.configDir).map((dir) => `${modifier} ${import_picocolors.default.cyan(shortenPath(dir))}`).join(`
|
|
357
356
|
`), shortenPath = (path) => {
|
|
@@ -391,7 +390,13 @@ ${formatProjectDirectories(errorProjects, logger.SYMBOLS.error)}`,
|
|
|
391
390
|
let task = prompt.spinner({ id: "detect-projects" });
|
|
392
391
|
task.start("Detecting projects...");
|
|
393
392
|
let detectedConfigDirs = options.configDir ?? [];
|
|
394
|
-
(!options.configDir || options.configDir.length === 0) && (detectedConfigDirs = await findStorybookProjects())
|
|
393
|
+
if ((!options.configDir || options.configDir.length === 0) && (detectedConfigDirs = await findStorybookProjects()), detectedConfigDirs.length === 0) {
|
|
394
|
+
if (task.stop("No .storybook directory found"), options.yes)
|
|
395
|
+
throw new UpgradeStorybookConfigDirNotFoundError();
|
|
396
|
+
detectedConfigDirs = [await prompt.text({
|
|
397
|
+
message: "No Storybook projects were found. Please enter the path to the .storybook directory for the project you want to upgrade."
|
|
398
|
+
})], task.start("Detecting projects...");
|
|
399
|
+
}
|
|
395
400
|
let count = 0, projects = await collectProjects(
|
|
396
401
|
options,
|
|
397
402
|
detectedConfigDirs,
|
|
@@ -421,7 +426,7 @@ Please fix the errors and run the upgrade command again.`
|
|
|
421
426
|
);
|
|
422
427
|
return selectedProjects ? { allProjects: validProjects, selectedProjects } : void 0;
|
|
423
428
|
} catch (error) {
|
|
424
|
-
throw error instanceof HandledError || logger.error("Failed to get projects"), error;
|
|
429
|
+
throw error instanceof HandledError || error instanceof UpgradeStorybookConfigDirNotFoundError || logger.error("Failed to get projects"), error;
|
|
425
430
|
}
|
|
426
431
|
}, findFilesUp = (matchers, cwd) => {
|
|
427
432
|
let matchingFiles = [];
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_vxh3qha62y from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_vxh3qha62y from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_vxh3qha62y from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_vxh3qha62y.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_vxh3qha62y.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_vxh3qha62y.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
|
__commonJS
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-FWESDDOE.js";
|
|
15
15
|
|
|
16
16
|
// ../../../node_modules/semver/internal/constants.js
|
|
17
17
|
var require_constants = __commonJS({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_vxh3qha62y from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_vxh3qha62y from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_vxh3qha62y from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_vxh3qha62y.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_vxh3qha62y.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_vxh3qha62y.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
__commonJS,
|
|
14
14
|
__require,
|
|
15
15
|
__toESM
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-FWESDDOE.js";
|
|
17
17
|
|
|
18
18
|
// ../../../node_modules/fast-glob/out/utils/array.js
|
|
19
19
|
var require_array = __commonJS({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_vxh3qha62y from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_vxh3qha62y from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_vxh3qha62y from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_vxh3qha62y.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_vxh3qha62y.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_vxh3qha62y.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -21,8 +21,8 @@ import {
|
|
|
21
21
|
isGitIgnoredSync,
|
|
22
22
|
isIgnoredByIgnoreFiles,
|
|
23
23
|
isIgnoredByIgnoreFilesSync
|
|
24
|
-
} from "./chunk-
|
|
25
|
-
import "./chunk-
|
|
24
|
+
} from "./chunk-ZSKFJUTC.js";
|
|
25
|
+
import "./chunk-FWESDDOE.js";
|
|
26
26
|
export {
|
|
27
27
|
convertPathToPattern,
|
|
28
28
|
generateGlobTasks,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_vxh3qha62y from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_vxh3qha62y from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_vxh3qha62y from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_vxh3qha62y.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_vxh3qha62y.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_vxh3qha62y.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 "./chunk-
|
|
12
|
+
import "./chunk-FWESDDOE.js";
|
|
13
13
|
|
|
14
14
|
// ../../../node_modules/yocto-queue/index.js
|
|
15
15
|
var Node = class {
|