@storybook/cli 0.0.0-pr-31987-sha-64db30c4 → 0.0.0-pr-31819-sha-e4987461
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-TXBSEDV2.js +68 -0
- package/dist/_node-chunks/block-experimental-addon-test-CYEHF4QX.js +50 -0
- package/dist/_node-chunks/block-major-version-SNJ4HP4L.js +79 -0
- package/dist/_node-chunks/block-node-version-7CEO7ULJ.js +37 -0
- package/dist/_node-chunks/block-webpack5-frameworks-VYS4HIQ4.js +66 -0
- package/dist/_node-chunks/chunk-DIYAIJOC.js +43 -0
- package/dist/_node-chunks/chunk-HYSPXQWQ.js +1396 -0
- package/dist/_node-chunks/chunk-L4UXEF6T.js +67 -0
- package/dist/_node-chunks/chunk-T5MTMKK3.js +10 -0
- package/dist/_node-chunks/chunk-VQWHITUU.js +4441 -0
- package/dist/_node-chunks/chunk-Z5JDYKZQ.js +1080 -0
- package/dist/_node-chunks/globby-WBCFFKC4.js +37 -0
- package/dist/_node-chunks/p-limit-5WOIREEI.js +79 -0
- package/dist/_node-chunks/run-7VTYTYQY.js +8715 -0
- package/dist/bin/index.js +21 -0
- package/package.json +8 -23
- package/bin/index.cjs +0 -26
- package/dist/bin/index.cjs +0 -294
- package/dist/bin/index.d.ts +0 -2
- package/dist/index.cjs +0 -1
- package/dist/index.d.ts +0 -2
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE from "node:module";
|
|
4
|
+
|
|
5
|
+
const __filename = CJS_COMPAT_NODE_URL.fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = CJS_COMPAT_NODE_PATH.dirname(__filename);
|
|
7
|
+
const require = CJS_COMPAT_NODE_MODULE.createRequire(import.meta.url);
|
|
8
|
+
// ------------------------------------------------------------
|
|
9
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
10
|
+
// ------------------------------------------------------------
|
|
11
|
+
import {
|
|
12
|
+
b as o
|
|
13
|
+
} from "./chunk-HYSPXQWQ.js";
|
|
14
|
+
import "./chunk-VQWHITUU.js";
|
|
15
|
+
import "./chunk-T5MTMKK3.js";
|
|
16
|
+
import "./chunk-Z5JDYKZQ.js";
|
|
17
|
+
import "./chunk-L4UXEF6T.js";
|
|
18
|
+
import "./chunk-DIYAIJOC.js";
|
|
19
|
+
|
|
20
|
+
// src/autoblock/block-dependencies-versions.ts
|
|
21
|
+
import { dedent as r } from "ts-dedent";
|
|
22
|
+
var i = {
|
|
23
|
+
"@angular/core": "18.0.0",
|
|
24
|
+
"react-scripts": "5.0.0",
|
|
25
|
+
next: "14.1.0",
|
|
26
|
+
preact: "10.0.0",
|
|
27
|
+
svelte: "5.0.0",
|
|
28
|
+
vue: "3.0.0",
|
|
29
|
+
vite: "5.0.0"
|
|
30
|
+
}, m = {
|
|
31
|
+
id: "dependenciesVersions",
|
|
32
|
+
async check({ packageManager: e }) {
|
|
33
|
+
return o(i, { packageManager: e });
|
|
34
|
+
},
|
|
35
|
+
log(e) {
|
|
36
|
+
switch (e.packageName) {
|
|
37
|
+
case "@angular/core":
|
|
38
|
+
return {
|
|
39
|
+
title: "Angular 18 support removed",
|
|
40
|
+
message: r`
|
|
41
|
+
Support for Angular < 18 has been removed.
|
|
42
|
+
Please see the migration guide for more information:
|
|
43
|
+
`,
|
|
44
|
+
link: "https://angular.dev/update-guide"
|
|
45
|
+
};
|
|
46
|
+
case "next":
|
|
47
|
+
return {
|
|
48
|
+
title: "Next.js 14.1 support removed",
|
|
49
|
+
message: r`
|
|
50
|
+
Support for Next.js < 14.1 has been removed.
|
|
51
|
+
Please see the migration guide for more information:
|
|
52
|
+
`,
|
|
53
|
+
link: "https://nextjs.org/docs/pages/building-your-application/upgrading/version-13"
|
|
54
|
+
};
|
|
55
|
+
default:
|
|
56
|
+
return {
|
|
57
|
+
title: `${e.packageName} version < ${e.minimumVersion} support removed`,
|
|
58
|
+
message: r`
|
|
59
|
+
Support for ${e.packageName} version < ${e.minimumVersion} has been removed.
|
|
60
|
+
Storybook needs a minimum version of ${e.minimumVersion}, but you have version ${e.installedVersion}.
|
|
61
|
+
`
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
export {
|
|
67
|
+
m as blocker
|
|
68
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE from "node:module";
|
|
4
|
+
|
|
5
|
+
const __filename = CJS_COMPAT_NODE_URL.fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = CJS_COMPAT_NODE_PATH.dirname(__filename);
|
|
7
|
+
const require = CJS_COMPAT_NODE_MODULE.createRequire(import.meta.url);
|
|
8
|
+
// ------------------------------------------------------------
|
|
9
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
10
|
+
// ------------------------------------------------------------
|
|
11
|
+
import "./chunk-T5MTMKK3.js";
|
|
12
|
+
import {
|
|
13
|
+
a as i
|
|
14
|
+
} from "./chunk-Z5JDYKZQ.js";
|
|
15
|
+
import {
|
|
16
|
+
d as s
|
|
17
|
+
} from "./chunk-DIYAIJOC.js";
|
|
18
|
+
|
|
19
|
+
// src/autoblock/block-experimental-addon-test.ts
|
|
20
|
+
var o = s(i(), 1);
|
|
21
|
+
import { dedent as n } from "ts-dedent";
|
|
22
|
+
var m = {
|
|
23
|
+
id: "experimentalAddonTestVitest",
|
|
24
|
+
async check({ packageManager: e }) {
|
|
25
|
+
if (!await e.getInstalledVersion(
|
|
26
|
+
"@storybook/experimental-addon-test"
|
|
27
|
+
))
|
|
28
|
+
return !1;
|
|
29
|
+
let t = await e.getInstalledVersion("vitest");
|
|
30
|
+
return t ? o.default.lt(t, "3.0.0") : !1;
|
|
31
|
+
},
|
|
32
|
+
log() {
|
|
33
|
+
return {
|
|
34
|
+
title: "Experimental Addon Test Vitest",
|
|
35
|
+
message: n`
|
|
36
|
+
@storybook/experimental-addon-test is being stabilized in Storybook 9.
|
|
37
|
+
|
|
38
|
+
The addon will be renamed to @storybook/addon-vitest and as part of this stabilization, we have dropped support for Vitest 2.
|
|
39
|
+
|
|
40
|
+
You have two options to proceed:
|
|
41
|
+
1. Remove @storybook/experimental-addon-test if you don't need it
|
|
42
|
+
2. Upgrade to Vitest 3 to continue using the addon
|
|
43
|
+
`,
|
|
44
|
+
link: "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#experimental-addon-test-vitest"
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
export {
|
|
49
|
+
m as blocker
|
|
50
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE from "node:module";
|
|
4
|
+
|
|
5
|
+
const __filename = CJS_COMPAT_NODE_URL.fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = CJS_COMPAT_NODE_PATH.dirname(__filename);
|
|
7
|
+
const require = CJS_COMPAT_NODE_MODULE.createRequire(import.meta.url);
|
|
8
|
+
// ------------------------------------------------------------
|
|
9
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
10
|
+
// ------------------------------------------------------------
|
|
11
|
+
import "./chunk-T5MTMKK3.js";
|
|
12
|
+
import {
|
|
13
|
+
a as u
|
|
14
|
+
} from "./chunk-Z5JDYKZQ.js";
|
|
15
|
+
import {
|
|
16
|
+
a as i,
|
|
17
|
+
d as g
|
|
18
|
+
} from "./chunk-DIYAIJOC.js";
|
|
19
|
+
|
|
20
|
+
// src/autoblock/block-major-version.ts
|
|
21
|
+
var t = g(u(), 1);
|
|
22
|
+
import { versions as a } from "storybook/internal/common";
|
|
23
|
+
import { CLI_COLORS as p } from "storybook/internal/node-logger";
|
|
24
|
+
import { dedent as c } from "ts-dedent";
|
|
25
|
+
function d(r, n) {
|
|
26
|
+
if (!r || !n)
|
|
27
|
+
return "ok";
|
|
28
|
+
let o = (0, t.parse)(r), e = (0, t.parse)(n);
|
|
29
|
+
return !o || !e || o.major === 0 || e.major === 0 ? "ok" : (0, t.gt)(r, n) ? "downgrade" : e.major - o.major > 1 ? "gap-too-large" : "ok";
|
|
30
|
+
}
|
|
31
|
+
i(d, "validateVersionTransition");
|
|
32
|
+
var h = {
|
|
33
|
+
id: "major-version-gap",
|
|
34
|
+
async check(r) {
|
|
35
|
+
let { packageManager: n } = r;
|
|
36
|
+
try {
|
|
37
|
+
let o = n.getAllDependencies().storybook;
|
|
38
|
+
if (!o)
|
|
39
|
+
return !1;
|
|
40
|
+
let e = a.storybook, s = d(o, e);
|
|
41
|
+
return s === "ok" ? !1 : {
|
|
42
|
+
currentVersion: o,
|
|
43
|
+
reason: s
|
|
44
|
+
};
|
|
45
|
+
} catch {
|
|
46
|
+
return !1;
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
log(r) {
|
|
50
|
+
let n = (0, t.coerce)(r.currentVersion);
|
|
51
|
+
if (r.reason === "downgrade")
|
|
52
|
+
return {
|
|
53
|
+
title: "Downgrade Not Supported",
|
|
54
|
+
message: c`
|
|
55
|
+
Your Storybook version (v${r.currentVersion}) is newer than the target release (v${a.storybook}).Downgrading is not supported.
|
|
56
|
+
Please follow the 8.0 migration guide to upgrade to v8.0 first.
|
|
57
|
+
`,
|
|
58
|
+
link: "https://storybook.js.org/docs/8/migration-guide"
|
|
59
|
+
};
|
|
60
|
+
if (n) {
|
|
61
|
+
let e = (0, t.major)(n) + 1;
|
|
62
|
+
return {
|
|
63
|
+
title: "Major Version Gap Detected",
|
|
64
|
+
message: c`
|
|
65
|
+
Your Storybook version (v${r.currentVersion}) is more than one major version behind the target release (v${a.storybook}). Please upgrade one major version at a time.
|
|
66
|
+
|
|
67
|
+
You can upgrade to version ${e} by running:
|
|
68
|
+
${p.info(`npx storybook@${e} upgrade`)}
|
|
69
|
+
`,
|
|
70
|
+
link: `https://storybook.js.org/docs/${e}/migration-guide`
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
throw new Error("No message found");
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
export {
|
|
77
|
+
h as blocker,
|
|
78
|
+
d as validateVersionTransition
|
|
79
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE from "node:module";
|
|
4
|
+
|
|
5
|
+
const __filename = CJS_COMPAT_NODE_URL.fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = CJS_COMPAT_NODE_PATH.dirname(__filename);
|
|
7
|
+
const require = CJS_COMPAT_NODE_MODULE.createRequire(import.meta.url);
|
|
8
|
+
// ------------------------------------------------------------
|
|
9
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
10
|
+
// ------------------------------------------------------------
|
|
11
|
+
import "./chunk-T5MTMKK3.js";
|
|
12
|
+
import {
|
|
13
|
+
a as s
|
|
14
|
+
} from "./chunk-Z5JDYKZQ.js";
|
|
15
|
+
import {
|
|
16
|
+
d as r
|
|
17
|
+
} from "./chunk-DIYAIJOC.js";
|
|
18
|
+
|
|
19
|
+
// src/autoblock/block-node-version.ts
|
|
20
|
+
var o = r(s(), 1);
|
|
21
|
+
var d = {
|
|
22
|
+
id: "minimumNode20",
|
|
23
|
+
async check() {
|
|
24
|
+
let e = process.versions.node;
|
|
25
|
+
return e && (0, o.lt)(e, "20.0.0") ? { nodeVersion: e } : !1;
|
|
26
|
+
},
|
|
27
|
+
log(e) {
|
|
28
|
+
return {
|
|
29
|
+
title: "Node.js 20 support removed",
|
|
30
|
+
message: `We've detected you're using Node.js v${e.nodeVersion}. Storybook needs Node.js 20 or higher.`,
|
|
31
|
+
link: "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#nodejs--20"
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
export {
|
|
36
|
+
d as blocker
|
|
37
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE from "node:module";
|
|
4
|
+
|
|
5
|
+
const __filename = CJS_COMPAT_NODE_URL.fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = CJS_COMPAT_NODE_PATH.dirname(__filename);
|
|
7
|
+
const require = CJS_COMPAT_NODE_MODULE.createRequire(import.meta.url);
|
|
8
|
+
// ------------------------------------------------------------
|
|
9
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
10
|
+
// ------------------------------------------------------------
|
|
11
|
+
import {
|
|
12
|
+
b as t
|
|
13
|
+
} from "./chunk-HYSPXQWQ.js";
|
|
14
|
+
import "./chunk-VQWHITUU.js";
|
|
15
|
+
import "./chunk-T5MTMKK3.js";
|
|
16
|
+
import "./chunk-Z5JDYKZQ.js";
|
|
17
|
+
import "./chunk-L4UXEF6T.js";
|
|
18
|
+
import "./chunk-DIYAIJOC.js";
|
|
19
|
+
|
|
20
|
+
// src/autoblock/block-webpack5-frameworks.ts
|
|
21
|
+
var a = {
|
|
22
|
+
"@storybook/preact-webpack5": "9.0.0",
|
|
23
|
+
"@storybook/preset-preact-webpack": "9.0.0",
|
|
24
|
+
"@storybook/vue3-webpack5": "9.0.0",
|
|
25
|
+
"@storybook/preset-vue3-webpack": "9.0.0",
|
|
26
|
+
"@storybook/html-webpack5": "9.0.0",
|
|
27
|
+
"@storybook/preset-html-webpack": "9.0.0",
|
|
28
|
+
"@storybook/web-components-webpack5": "9.0.0",
|
|
29
|
+
"@storybook/svelte-webpack5": "9.0.0"
|
|
30
|
+
}, k = {
|
|
31
|
+
id: "dependenciesVersions",
|
|
32
|
+
async check({ packageManager: o }) {
|
|
33
|
+
return t(a, { packageManager: o });
|
|
34
|
+
},
|
|
35
|
+
log(o) {
|
|
36
|
+
let r = "Please migrate your Webpack5-based frameworks to their Vite equivalents.", s = "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#dropped-webpack5-builder-support-in-favor-of-vite", e;
|
|
37
|
+
switch (o.packageName) {
|
|
38
|
+
case "@storybook/preact-webpack5":
|
|
39
|
+
case "@storybook/preset-preact-webpack":
|
|
40
|
+
e = "Preact Webpack5 support removed";
|
|
41
|
+
break;
|
|
42
|
+
case "@storybook/vue3-webpack5":
|
|
43
|
+
case "@storybook/preset-vue3-webpack":
|
|
44
|
+
e = "Vue3 Webpack5 support removed";
|
|
45
|
+
break;
|
|
46
|
+
case "@storybook/html-webpack5":
|
|
47
|
+
case "@storybook/preset-html-webpack":
|
|
48
|
+
e = "HTML Webpack5 support removed";
|
|
49
|
+
break;
|
|
50
|
+
case "@storybook/web-components-webpack5":
|
|
51
|
+
e = "Web Components Webpack5 support removed";
|
|
52
|
+
break;
|
|
53
|
+
case "@storybook/svelte-webpack5":
|
|
54
|
+
e = "Svelte Webpack5 support removed";
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
title: e,
|
|
59
|
+
message: r,
|
|
60
|
+
link: s
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
export {
|
|
65
|
+
k as blocker
|
|
66
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE from "node:module";
|
|
4
|
+
|
|
5
|
+
const __filename = CJS_COMPAT_NODE_URL.fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = CJS_COMPAT_NODE_PATH.dirname(__filename);
|
|
7
|
+
const require = CJS_COMPAT_NODE_MODULE.createRequire(import.meta.url);
|
|
8
|
+
// ------------------------------------------------------------
|
|
9
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
10
|
+
// ------------------------------------------------------------
|
|
11
|
+
var g = Object.create;
|
|
12
|
+
var e = Object.defineProperty;
|
|
13
|
+
var h = Object.getOwnPropertyDescriptor;
|
|
14
|
+
var i = Object.getOwnPropertyNames;
|
|
15
|
+
var j = Object.getPrototypeOf, k = Object.prototype.hasOwnProperty;
|
|
16
|
+
var m = (a, b) => e(a, "name", { value: b, configurable: !0 }), n = /* @__PURE__ */ ((a) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(a, {
|
|
17
|
+
get: (b, c) => (typeof require < "u" ? require : b)[c]
|
|
18
|
+
}) : a)(function(a) {
|
|
19
|
+
if (typeof require < "u") return require.apply(this, arguments);
|
|
20
|
+
throw Error('Dynamic require of "' + a + '" is not supported');
|
|
21
|
+
});
|
|
22
|
+
var o = (a, b) => () => (b || a((b = { exports: {} }).exports, b), b.exports);
|
|
23
|
+
var l = (a, b, c, f) => {
|
|
24
|
+
if (b && typeof b == "object" || typeof b == "function")
|
|
25
|
+
for (let d of i(b))
|
|
26
|
+
!k.call(a, d) && d !== c && e(a, d, { get: () => b[d], enumerable: !(f = h(b, d)) || f.enumerable });
|
|
27
|
+
return a;
|
|
28
|
+
};
|
|
29
|
+
var p = (a, b, c) => (c = a != null ? g(j(a)) : {}, l(
|
|
30
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
31
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
32
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
33
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
34
|
+
b || !a || !a.__esModule ? e(c, "default", { value: a, enumerable: !0 }) : c,
|
|
35
|
+
a
|
|
36
|
+
));
|
|
37
|
+
|
|
38
|
+
export {
|
|
39
|
+
m as a,
|
|
40
|
+
n as b,
|
|
41
|
+
o as c,
|
|
42
|
+
p as d
|
|
43
|
+
};
|