@storybook/addon-vitest 11.0.0-alpha.8 → 11.0.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/{chunk-6NTJLCDE.js → chunk-3BHG7ERW.js} +6 -6
- package/dist/_node-chunks/{chunk-ZGTRYRYR.js → chunk-3W3XGTQZ.js} +7 -7
- package/dist/_node-chunks/{chunk-PYGCQ2XJ.js → chunk-4GNOAC4E.js} +6 -6
- package/dist/_node-chunks/{chunk-BHE6WXVW.js → chunk-ATRY5NRC.js} +9 -9
- package/dist/_node-chunks/{chunk-ZS2H7IJD.js → chunk-GSEDOCKO.js} +7 -7
- package/dist/_node-chunks/{chunk-UKLH76WC.js → chunk-RNV4WF5A.js} +7 -7
- package/dist/_node-chunks/{chunk-2KSL6GBQ.js → chunk-U6IN5TYZ.js} +6 -6
- package/dist/_node-chunks/{chunk-LRDGLC63.js → chunk-YGNVYBQM.js} +6 -6
- package/dist/_node-chunks/{vitest.config.4.template-CWGQLSCP.js → vitest.config.4.template-QLM53UPV.js} +7 -7
- package/dist/constants.js +8 -8
- package/dist/manager.js +5 -5
- package/dist/node/coverage-reporter.js +8 -8
- package/dist/node/vitest.js +12 -12
- package/dist/postinstall.js +48 -24
- package/dist/preset.js +16 -14
- package/dist/vitest-plugin/global-setup.js +7 -7
- package/dist/vitest-plugin/index.js +11 -11
- package/package.json +4 -4
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_q65v6j674l from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_q65v6j674l from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_q65v6j674l from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_q65v6j674l.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_q65v6j674l.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_q65v6j674l.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_q65v6j674l from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_q65v6j674l from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_q65v6j674l from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_q65v6j674l.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_q65v6j674l.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_q65v6j674l.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-4GNOAC4E.js";
|
|
15
15
|
|
|
16
16
|
// ../../../node_modules/ts-dedent/dist/index.js
|
|
17
17
|
var require_dist = __commonJS({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_q65v6j674l from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_q65v6j674l from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_q65v6j674l from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_q65v6j674l.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_q65v6j674l.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_q65v6j674l.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_q65v6j674l from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_q65v6j674l from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_q65v6j674l from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_q65v6j674l.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_q65v6j674l.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_q65v6j674l.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_picocolors
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-RNV4WF5A.js";
|
|
15
15
|
import {
|
|
16
16
|
ADDON_ID2 as ADDON_ID
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-U6IN5TYZ.js";
|
|
18
18
|
import {
|
|
19
19
|
__toESM
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-4GNOAC4E.js";
|
|
21
21
|
|
|
22
22
|
// src/logger.ts
|
|
23
23
|
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_q65v6j674l from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_q65v6j674l from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_q65v6j674l from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_q65v6j674l.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_q65v6j674l.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_q65v6j674l.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-4GNOAC4E.js";
|
|
15
15
|
|
|
16
16
|
// ../../../node_modules/semver/internal/constants.js
|
|
17
17
|
var require_constants = __commonJS({
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_q65v6j674l from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_q65v6j674l from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_q65v6j674l from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_q65v6j674l.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_q65v6j674l.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_q65v6j674l.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-4GNOAC4E.js";
|
|
15
15
|
|
|
16
16
|
// ../../../node_modules/picocolors/picocolors.js
|
|
17
17
|
var require_picocolors = __commonJS({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_q65v6j674l from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_q65v6j674l from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_q65v6j674l from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_q65v6j674l.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_q65v6j674l.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_q65v6j674l.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_q65v6j674l from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_q65v6j674l from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_q65v6j674l from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_q65v6j674l.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_q65v6j674l.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_q65v6j674l.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_q65v6j674l from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_q65v6j674l from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_q65v6j674l from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_q65v6j674l.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_q65v6j674l.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_q65v6j674l.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-4GNOAC4E.js";
|
|
13
13
|
|
|
14
14
|
// raw:../templates/vitest.config.4.template.ts
|
|
15
15
|
var vitest_config_4_template_default = `import path from 'node:path';
|
package/dist/constants.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_q65v6j674l from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_q65v6j674l from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_q65v6j674l from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_q65v6j674l.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_q65v6j674l.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_q65v6j674l.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -35,8 +35,8 @@ import {
|
|
|
35
35
|
TRIGGER_TEST_RUN_RESPONSE,
|
|
36
36
|
TUTORIAL_VIDEO_LINK,
|
|
37
37
|
storeOptions
|
|
38
|
-
} from "./_node-chunks/chunk-
|
|
39
|
-
import "./_node-chunks/chunk-
|
|
38
|
+
} from "./_node-chunks/chunk-U6IN5TYZ.js";
|
|
39
|
+
import "./_node-chunks/chunk-4GNOAC4E.js";
|
|
40
40
|
export {
|
|
41
41
|
ADDON_ID as A11Y_ADDON_ID,
|
|
42
42
|
PANEL_ID2 as A11Y_PANEL_ID,
|
package/dist/manager.js
CHANGED
|
@@ -38,7 +38,7 @@ import React, { useContext } from "react";
|
|
|
38
38
|
import { Button, Modal } from "storybook/internal/components";
|
|
39
39
|
import { SyncIcon } from "@storybook/icons";
|
|
40
40
|
import { useStorybookApi } from "storybook/manager-api";
|
|
41
|
-
import { styled } from "storybook/theming";
|
|
41
|
+
import { styled } from "storybook/theming/emotion";
|
|
42
42
|
var ModalBar = styled.div({
|
|
43
43
|
display: "flex",
|
|
44
44
|
justifyContent: "space-between",
|
|
@@ -197,12 +197,12 @@ var $a46cf152bb926da5$var$LiveAnnouncer = class {
|
|
|
197
197
|
|
|
198
198
|
// src/components/TestProviderRender.tsx
|
|
199
199
|
import { addons } from "storybook/manager-api";
|
|
200
|
-
import { styled as styled4 } from "storybook/theming";
|
|
200
|
+
import { styled as styled4 } from "storybook/theming/emotion";
|
|
201
201
|
|
|
202
202
|
// src/components/Description.tsx
|
|
203
203
|
import React2 from "react";
|
|
204
204
|
import { Link as LinkComponent } from "storybook/internal/components";
|
|
205
|
-
import { styled as styled2 } from "storybook/theming";
|
|
205
|
+
import { styled as styled2 } from "storybook/theming/emotion";
|
|
206
206
|
|
|
207
207
|
// src/components/RelativeTime.tsx
|
|
208
208
|
import { useEffect as useEffect2, useState as useState2 } from "react";
|
|
@@ -261,7 +261,7 @@ function Description({
|
|
|
261
261
|
}
|
|
262
262
|
|
|
263
263
|
// src/components/TestStatusIcon.tsx
|
|
264
|
-
import { styled as styled3 } from "storybook/theming";
|
|
264
|
+
import { styled as styled3 } from "storybook/theming/emotion";
|
|
265
265
|
var TestStatusIcon = styled3.div(
|
|
266
266
|
({ percentage }) => ({
|
|
267
267
|
width: percentage ? 12 : 6,
|
|
@@ -440,7 +440,7 @@ var Container = styled4.div(({ inContextMenu }) => ({
|
|
|
440
440
|
}
|
|
441
441
|
},
|
|
442
442
|
React3.createElement(PlayHollowIcon, null)
|
|
443
|
-
))), React3.createElement(StyledActionList, null, React3.createElement(ActionList.Item, null, entry ? React3.createElement(ActionList.Text, null, "Interactions") : React3.createElement(ActionList.Action, { as: "label", readOnly: !0 }, React3.createElement(ActionList.Icon, null, React3.createElement(Form.Checkbox, { name: "Interactions", checked: !0, disabled: !0 })), React3.createElement(ActionList.Text, null, "Interactions")), React3.createElement(
|
|
443
|
+
))), React3.createElement(StyledActionList, null, React3.createElement(ActionList.Item, null, entry ? React3.createElement(ActionList.Text, null, "Interactions") : React3.createElement(ActionList.Action, { as: "label", readOnly: !0, ariaLabel: !1 }, React3.createElement(ActionList.Icon, null, React3.createElement(Form.Checkbox, { name: "Interactions", checked: !0, disabled: !0 })), React3.createElement(ActionList.Text, null, "Interactions")), React3.createElement(
|
|
444
444
|
ActionList.Button,
|
|
445
445
|
{
|
|
446
446
|
ariaLabel: `${componentTestStatusLabel}${componentTestStatusValueToStoryIds["status-value:error"].length + componentTestStatusValueToStoryIds["status-value:warning"].length > 0 ? ` (${componentTestStatusValueToStoryIds["status-value:error"].length + componentTestStatusValueToStoryIds["status-value:warning"].length} errors or warnings so far)` : ""}`,
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_q65v6j674l from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_q65v6j674l from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_q65v6j674l from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_q65v6j674l.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_q65v6j674l.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_q65v6j674l.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_gte
|
|
14
|
-
} from "../_node-chunks/chunk-
|
|
14
|
+
} from "../_node-chunks/chunk-GSEDOCKO.js";
|
|
15
15
|
import {
|
|
16
16
|
__commonJS,
|
|
17
17
|
__require,
|
|
18
18
|
__toESM
|
|
19
|
-
} from "../_node-chunks/chunk-
|
|
19
|
+
} from "../_node-chunks/chunk-4GNOAC4E.js";
|
|
20
20
|
|
|
21
21
|
// ../../../node_modules/istanbul-lib-report/node_modules/make-dir/index.js
|
|
22
22
|
var require_make_dir = __commonJS({
|
package/dist/node/vitest.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_q65v6j674l from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_q65v6j674l from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_q65v6j674l from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_q65v6j674l.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_q65v6j674l.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_q65v6j674l.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -13,19 +13,19 @@ import {
|
|
|
13
13
|
errorToErrorLike,
|
|
14
14
|
globalThis_,
|
|
15
15
|
log
|
|
16
|
-
} from "../_node-chunks/chunk-
|
|
16
|
+
} from "../_node-chunks/chunk-ATRY5NRC.js";
|
|
17
17
|
import {
|
|
18
18
|
any,
|
|
19
19
|
up
|
|
20
|
-
} from "../_node-chunks/chunk-
|
|
21
|
-
import "../_node-chunks/chunk-
|
|
20
|
+
} from "../_node-chunks/chunk-3BHG7ERW.js";
|
|
21
|
+
import "../_node-chunks/chunk-RNV4WF5A.js";
|
|
22
22
|
import {
|
|
23
23
|
dirname,
|
|
24
24
|
join,
|
|
25
25
|
normalize,
|
|
26
26
|
path,
|
|
27
27
|
resolve
|
|
28
|
-
} from "../_node-chunks/chunk-
|
|
28
|
+
} from "../_node-chunks/chunk-YGNVYBQM.js";
|
|
29
29
|
import {
|
|
30
30
|
ADDON_ID2 as ADDON_ID,
|
|
31
31
|
COVERAGE_DIRECTORY,
|
|
@@ -34,8 +34,8 @@ import {
|
|
|
34
34
|
STORYBOOK_TEST_PROVIDE_KEY,
|
|
35
35
|
STORY_INDEX_CHANNEL_EVENT_NAME,
|
|
36
36
|
storeOptions
|
|
37
|
-
} from "../_node-chunks/chunk-
|
|
38
|
-
import "../_node-chunks/chunk-
|
|
37
|
+
} from "../_node-chunks/chunk-U6IN5TYZ.js";
|
|
38
|
+
import "../_node-chunks/chunk-4GNOAC4E.js";
|
|
39
39
|
|
|
40
40
|
// src/node/vitest.ts
|
|
41
41
|
import process2 from "node:process";
|
package/dist/postinstall.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_q65v6j674l from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_q65v6j674l from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_q65v6j674l from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_q65v6j674l.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_q65v6j674l.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_q65v6j674l.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
|
any
|
|
14
|
-
} from "./_node-chunks/chunk-
|
|
14
|
+
} from "./_node-chunks/chunk-3BHG7ERW.js";
|
|
15
15
|
import {
|
|
16
16
|
require_dist
|
|
17
|
-
} from "./_node-chunks/chunk-
|
|
17
|
+
} from "./_node-chunks/chunk-3W3XGTQZ.js";
|
|
18
18
|
import {
|
|
19
19
|
dirname,
|
|
20
20
|
normalize,
|
|
21
21
|
relative,
|
|
22
22
|
resolve
|
|
23
|
-
} from "./_node-chunks/chunk-
|
|
23
|
+
} from "./_node-chunks/chunk-YGNVYBQM.js";
|
|
24
24
|
import {
|
|
25
25
|
DOCUMENTATION_LINK
|
|
26
|
-
} from "./_node-chunks/chunk-
|
|
26
|
+
} from "./_node-chunks/chunk-U6IN5TYZ.js";
|
|
27
27
|
import {
|
|
28
28
|
__toESM
|
|
29
|
-
} from "./_node-chunks/chunk-
|
|
29
|
+
} from "./_node-chunks/chunk-4GNOAC4E.js";
|
|
30
30
|
|
|
31
31
|
// src/postinstall.ts
|
|
32
32
|
import * as fs from "node:fs/promises";
|
|
@@ -130,7 +130,7 @@ import {
|
|
|
130
130
|
staticKey
|
|
131
131
|
} from "storybook/internal/csf-tools";
|
|
132
132
|
async function getTemplatePath() {
|
|
133
|
-
return import("./_node-chunks/vitest.config.4.template-
|
|
133
|
+
return import("./_node-chunks/vitest.config.4.template-QLM53UPV.js");
|
|
134
134
|
}
|
|
135
135
|
var loadTemplate = async (name, replacements) => {
|
|
136
136
|
let template = (await getTemplatePath()).default;
|
|
@@ -221,7 +221,7 @@ var loadTemplate = async (name, replacements) => {
|
|
|
221
221
|
(name) => findNamedProp(testObject.properties, name)
|
|
222
222
|
).filter((member) => member !== void 0), projectMembers = testObject.properties.filter(
|
|
223
223
|
(member) => !hoisted.includes(member)
|
|
224
|
-
), projectTest = printMembers(memberTexts(target, testObject, projectMembers),
|
|
224
|
+
), layout = { indent: source.indent, trailingComma: !0 }, projectTest = printMembers(memberTexts(target, testObject, projectMembers), layout), project = printMembers(["extends: true", `test: ${projectTest}`], layout);
|
|
225
225
|
prependToList2(source, arrayList2(source, templateProjects.value), [project]), hoisted.length > 0 && prependToList2(
|
|
226
226
|
source,
|
|
227
227
|
objectList(source, templateTestObject),
|
|
@@ -242,11 +242,33 @@ var loadTemplate = async (name, replacements) => {
|
|
|
242
242
|
targetConfig,
|
|
243
243
|
config.properties.filter((member) => member !== templateTest)
|
|
244
244
|
);
|
|
245
|
+
}, findWritableConfigObject = (program, exportDefault) => {
|
|
246
|
+
let configObject = getTargetConfigObject(program, exportDefault);
|
|
247
|
+
if (configObject)
|
|
248
|
+
return configObject;
|
|
249
|
+
let mergeConfigCall = getEffectiveMergeConfigCall(exportDefault.declaration, program);
|
|
250
|
+
if (!mergeConfigCall || mergeConfigCall.arguments.length < 2)
|
|
251
|
+
return null;
|
|
252
|
+
let candidates = mergeConfigCall.arguments.map((arg) => getConfigObjectFromMergeArg(arg, program)).filter((object) => object !== null);
|
|
253
|
+
return candidates.find((object) => findNamedProp(object.properties, "test")) ?? candidates[0] ?? null;
|
|
254
|
+
}, normalizeProjectsValue = (merge, projectsProp) => {
|
|
255
|
+
let { target } = merge, value = projectsProp.value, valueText = target.source(value), replacement = value.type === "Literal" || value.type === "TemplateLiteral" ? `[${valueText}]` : resolveExpression(value, target.program)?.type === "ArrayExpression" ? `[...${valueText}]` : `[...((${valueText}) ?? [{ extends: true }])]`;
|
|
256
|
+
target.edits.overwrite(
|
|
257
|
+
value.start,
|
|
258
|
+
value.end,
|
|
259
|
+
projectsProp.shorthand ? `projects: ${replacement}` : replacement
|
|
260
|
+
), target.commit();
|
|
261
|
+
let exportDefault = findExportDefault(target.program), freshConfig = exportDefault ? findWritableConfigObject(target.program, exportDefault) : null, freshTest = freshConfig && findNamedProp(freshConfig.properties, "test"), freshTestObject = freshTest ? resolveExpression(freshTest.value, target.program) : null, freshProjects = freshTestObject?.type === "ObjectExpression" ? findNamedProp(freshTestObject.properties, "projects") : void 0;
|
|
262
|
+
if (!freshConfig || !freshTest || freshTestObject?.type !== "ObjectExpression" || !freshProjects || !isProjectsArrayProp(freshProjects))
|
|
263
|
+
throw new Error(
|
|
264
|
+
"Could not re-resolve the config object after normalizing a non-array projects value"
|
|
265
|
+
);
|
|
266
|
+
return { targetConfig: freshConfig, testObject: freshTestObject, projects: freshProjects.value };
|
|
245
267
|
}, mergeTemplateIntoConfigObject = (merge, targetConfig, templateConfig) => {
|
|
246
268
|
let existingTest = findNamedProp(targetConfig.properties, "test"), testObject = existingTest ? resolveExpression(existingTest.value, merge.target.program) : null;
|
|
247
269
|
if (existingTest && testObject?.type === "ObjectExpression") {
|
|
248
|
-
let existingProjects = testObject.properties
|
|
249
|
-
if (existingProjects) {
|
|
270
|
+
let existingProjects = findNamedProp(testObject.properties, "projects");
|
|
271
|
+
if (existingProjects && isProjectsArrayProp(existingProjects)) {
|
|
250
272
|
appendToExistingProjects(
|
|
251
273
|
merge,
|
|
252
274
|
existingProjects.value,
|
|
@@ -256,21 +278,23 @@ var loadTemplate = async (name, replacements) => {
|
|
|
256
278
|
);
|
|
257
279
|
return;
|
|
258
280
|
}
|
|
281
|
+
if (existingProjects) {
|
|
282
|
+
let normalized = normalizeProjectsValue(merge, existingProjects);
|
|
283
|
+
appendToExistingProjects(
|
|
284
|
+
merge,
|
|
285
|
+
normalized.projects,
|
|
286
|
+
normalized.testObject,
|
|
287
|
+
templateConfig(),
|
|
288
|
+
normalized.targetConfig
|
|
289
|
+
);
|
|
290
|
+
return;
|
|
291
|
+
}
|
|
259
292
|
if (findNamedProp(templateConfig().properties, "test")?.value.type === "ObjectExpression") {
|
|
260
293
|
wrapTestConfigAsProject(merge, existingTest, testObject, templateConfig, targetConfig);
|
|
261
294
|
return;
|
|
262
295
|
}
|
|
263
296
|
}
|
|
264
297
|
mergeProperties(merge, templateConfig(), targetConfig);
|
|
265
|
-
}, findWritableConfigObject = (program, exportDefault) => {
|
|
266
|
-
let configObject = getTargetConfigObject(program, exportDefault);
|
|
267
|
-
if (configObject)
|
|
268
|
-
return configObject;
|
|
269
|
-
let mergeConfigCall = getEffectiveMergeConfigCall(exportDefault.declaration, program);
|
|
270
|
-
if (!mergeConfigCall || mergeConfigCall.arguments.length < 2)
|
|
271
|
-
return null;
|
|
272
|
-
let candidates = mergeConfigCall.arguments.map((arg) => getConfigObjectFromMergeArg(arg, program)).filter((object) => object !== null);
|
|
273
|
-
return candidates.find((object) => findNamedProp(object.properties, "test")) ?? candidates[0] ?? null;
|
|
274
298
|
}, importedExport = (binding) => {
|
|
275
299
|
if (binding.kind !== "import" || binding.declaration?.type !== "ImportDeclaration")
|
|
276
300
|
return;
|
package/dist/preset.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_q65v6j674l from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_q65v6j674l from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_q65v6j674l from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_q65v6j674l.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_q65v6j674l.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_q65v6j674l.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -14,16 +14,16 @@ import {
|
|
|
14
14
|
globalThis_,
|
|
15
15
|
log,
|
|
16
16
|
noop
|
|
17
|
-
} from "./_node-chunks/chunk-
|
|
17
|
+
} from "./_node-chunks/chunk-ATRY5NRC.js";
|
|
18
18
|
import {
|
|
19
19
|
require_picocolors
|
|
20
|
-
} from "./_node-chunks/chunk-
|
|
20
|
+
} from "./_node-chunks/chunk-RNV4WF5A.js";
|
|
21
21
|
import {
|
|
22
22
|
require_dist
|
|
23
|
-
} from "./_node-chunks/chunk-
|
|
23
|
+
} from "./_node-chunks/chunk-3W3XGTQZ.js";
|
|
24
24
|
import {
|
|
25
25
|
normalize
|
|
26
|
-
} from "./_node-chunks/chunk-
|
|
26
|
+
} from "./_node-chunks/chunk-YGNVYBQM.js";
|
|
27
27
|
import {
|
|
28
28
|
ADDON_ID2 as ADDON_ID,
|
|
29
29
|
COVERAGE_DIRECTORY,
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
TRIGGER_TEST_RUN_REQUEST,
|
|
36
36
|
TRIGGER_TEST_RUN_RESPONSE,
|
|
37
37
|
storeOptions
|
|
38
|
-
} from "./_node-chunks/chunk-
|
|
38
|
+
} from "./_node-chunks/chunk-U6IN5TYZ.js";
|
|
39
39
|
import {
|
|
40
40
|
require_compare,
|
|
41
41
|
require_constants,
|
|
@@ -45,11 +45,11 @@ import {
|
|
|
45
45
|
require_parse_options,
|
|
46
46
|
require_re,
|
|
47
47
|
require_semver
|
|
48
|
-
} from "./_node-chunks/chunk-
|
|
48
|
+
} from "./_node-chunks/chunk-GSEDOCKO.js";
|
|
49
49
|
import {
|
|
50
50
|
__commonJS,
|
|
51
51
|
__toESM
|
|
52
|
-
} from "./_node-chunks/chunk-
|
|
52
|
+
} from "./_node-chunks/chunk-4GNOAC4E.js";
|
|
53
53
|
|
|
54
54
|
// ../../../node_modules/semver/functions/parse.js
|
|
55
55
|
var require_parse = __commonJS({
|
|
@@ -1123,7 +1123,9 @@ var MAX_START_TIME = 3e4, vitestModulePath = fileURLToPath2(importMetaResolve("@
|
|
|
1123
1123
|
STORYBOOK_CONFIG_LOADER: configLoader,
|
|
1124
1124
|
STORYBOOK_PREVIEW_ANNOTATIONS: JSON.stringify(previewAnnotations)
|
|
1125
1125
|
},
|
|
1126
|
-
extendEnv: !0
|
|
1126
|
+
extendEnv: !0,
|
|
1127
|
+
// Execa's ipcOutput would otherwise retain reports from every previous test run.
|
|
1128
|
+
buffer: { ipc: !1 }
|
|
1127
1129
|
}
|
|
1128
1130
|
}), sentStoryIndex = void 0, stderr = [];
|
|
1129
1131
|
let spawnedChild = child;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_q65v6j674l from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_q65v6j674l from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_q65v6j674l from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_q65v6j674l.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_q65v6j674l.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_q65v6j674l.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 "../_node-chunks/chunk-
|
|
16
|
+
} from "../_node-chunks/chunk-4GNOAC4E.js";
|
|
17
17
|
|
|
18
18
|
// ../../../node_modules/tree-kill/index.js
|
|
19
19
|
var require_tree_kill = __commonJS({
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_q65v6j674l from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_q65v6j674l from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_q65v6j674l from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_q65v6j674l.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_q65v6j674l.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_q65v6j674l.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_picocolors
|
|
14
|
-
} from "../_node-chunks/chunk-
|
|
14
|
+
} from "../_node-chunks/chunk-RNV4WF5A.js";
|
|
15
15
|
import {
|
|
16
16
|
require_dist
|
|
17
|
-
} from "../_node-chunks/chunk-
|
|
17
|
+
} from "../_node-chunks/chunk-3W3XGTQZ.js";
|
|
18
18
|
import {
|
|
19
19
|
join,
|
|
20
20
|
normalize,
|
|
@@ -22,13 +22,13 @@ import {
|
|
|
22
22
|
relative,
|
|
23
23
|
resolve,
|
|
24
24
|
sep
|
|
25
|
-
} from "../_node-chunks/chunk-
|
|
25
|
+
} from "../_node-chunks/chunk-YGNVYBQM.js";
|
|
26
26
|
import {
|
|
27
27
|
STORYBOOK_CORE_GHOST_STORIES_PROVIDE_KEY,
|
|
28
28
|
STORYBOOK_CORE_RENDER_ANALYSIS_PROVIDE_KEY,
|
|
29
29
|
STORYBOOK_TEST_FEATURES_PROVIDE_KEY,
|
|
30
30
|
STORYBOOK_TEST_INITIAL_GLOBALS_PROVIDE_KEY
|
|
31
|
-
} from "../_node-chunks/chunk-
|
|
31
|
+
} from "../_node-chunks/chunk-U6IN5TYZ.js";
|
|
32
32
|
import {
|
|
33
33
|
__commonJS,
|
|
34
34
|
__esm,
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
__require,
|
|
37
37
|
__toCommonJS,
|
|
38
38
|
__toESM
|
|
39
|
-
} from "../_node-chunks/chunk-
|
|
39
|
+
} from "../_node-chunks/chunk-4GNOAC4E.js";
|
|
40
40
|
|
|
41
41
|
// ../../../node_modules/braces/lib/utils.js
|
|
42
42
|
var require_utils = __commonJS({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/addon-vitest",
|
|
3
|
-
"version": "11.0.0-
|
|
3
|
+
"version": "11.0.0-beta.0",
|
|
4
4
|
"description": "Storybook Vitest addon: Blazing fast component testing using stories",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -81,8 +81,8 @@
|
|
|
81
81
|
"@storybook/icons": "^2.0.2"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
|
-
"@storybook/addon-a11y": "11.0.0-
|
|
85
|
-
"@storybook/builder-vite": "11.0.0-
|
|
84
|
+
"@storybook/addon-a11y": "11.0.0-beta.0",
|
|
85
|
+
"@storybook/builder-vite": "11.0.0-beta.0",
|
|
86
86
|
"@types/istanbul-lib-report": "^3.0.3",
|
|
87
87
|
"@types/micromatch": "^4.0.0",
|
|
88
88
|
"@types/node": "^22.19.1",
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"peerDependencies": {
|
|
111
111
|
"@vitest/browser": "^4.0.0 || ^5.0.0",
|
|
112
112
|
"@vitest/browser-playwright": "^4.0.0 || ^5.0.0",
|
|
113
|
-
"storybook": "^11.0.0-
|
|
113
|
+
"storybook": "^11.0.0-beta.0",
|
|
114
114
|
"vitest": "^4.0.0 || ^5.0.0"
|
|
115
115
|
},
|
|
116
116
|
"peerDependenciesMeta": {
|