@storybook/addon-vitest 10.2.0-alpha.16 → 10.2.0-alpha.18
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-AVXPOAW5.js → chunk-2XBJOD6M.js} +7 -7
- package/dist/_node-chunks/{chunk-6B7F4LF2.js → chunk-5SLLAI3Z.js} +6 -6
- package/dist/_node-chunks/{chunk-OB3WB2D6.js → chunk-AP4NMVOZ.js} +6 -6
- package/dist/_node-chunks/{chunk-A4PIAKC2.js → chunk-CBBAJJI2.js} +6 -6
- package/dist/_node-chunks/{chunk-ZVYSYO3X.js → chunk-KJ4CMXUR.js} +9 -9
- package/dist/_node-chunks/{chunk-JYLW6C6H.js → chunk-MIGPAHM2.js} +7 -7
- package/dist/_node-chunks/{chunk-BQ4LP6SO.js → chunk-SNEOL6TF.js} +7 -7
- package/dist/_node-chunks/{chunk-UPL3M37S.js → chunk-V5BVTG4R.js} +6 -6
- package/dist/_node-chunks/{chunk-MWYKFNCB.js → chunk-YSBRSSWQ.js} +7 -7
- package/dist/node/coverage-reporter.js +8 -8
- package/dist/node/vitest.js +12 -12
- package/dist/postinstall.js +13 -13
- package/dist/preset.js +13 -13
- package/dist/vitest-plugin/global-setup.js +7 -7
- package/dist/vitest-plugin/index.js +53 -25
- package/dist/vitest-plugin/test-utils.js +11 -2
- package/package.json +2 -2
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_9665igqy8a from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_9665igqy8a from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_9665igqy8a from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_9665igqy8a.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_9665igqy8a.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_9665igqy8a.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-5SLLAI3Z.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_9665igqy8a from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_9665igqy8a from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_9665igqy8a from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_9665igqy8a.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_9665igqy8a.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_9665igqy8a.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_9665igqy8a from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_9665igqy8a from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_9665igqy8a from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_9665igqy8a.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_9665igqy8a.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_9665igqy8a.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_9665igqy8a from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_9665igqy8a from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_9665igqy8a from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_9665igqy8a.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_9665igqy8a.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_9665igqy8a.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_9665igqy8a from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_9665igqy8a from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_9665igqy8a from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_9665igqy8a.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_9665igqy8a.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_9665igqy8a.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
|
ADDON_ID
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-CBBAJJI2.js";
|
|
15
15
|
import {
|
|
16
16
|
require_picocolors
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-2XBJOD6M.js";
|
|
18
18
|
import {
|
|
19
19
|
__toESM
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-5SLLAI3Z.js";
|
|
21
21
|
|
|
22
22
|
// src/logger.ts
|
|
23
23
|
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_9665igqy8a from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_9665igqy8a from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_9665igqy8a from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_9665igqy8a.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_9665igqy8a.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_9665igqy8a.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -12,7 +12,7 @@ var require = CJS_COMPAT_NODE_MODULE_kvn3cdpo489.createRequire(import.meta.url);
|
|
|
12
12
|
import {
|
|
13
13
|
dirname,
|
|
14
14
|
join
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-V5BVTG4R.js";
|
|
16
16
|
|
|
17
17
|
// ../../core/src/shared/utils/module.ts
|
|
18
18
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_9665igqy8a from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_9665igqy8a from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_9665igqy8a from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_9665igqy8a.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_9665igqy8a.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_9665igqy8a.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-5SLLAI3Z.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_9665igqy8a from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_9665igqy8a from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_9665igqy8a from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_9665igqy8a.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_9665igqy8a.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_9665igqy8a.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_9665igqy8a from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_9665igqy8a from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_9665igqy8a from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_9665igqy8a.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_9665igqy8a.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_9665igqy8a.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-5SLLAI3Z.js";
|
|
15
15
|
|
|
16
16
|
// ../../../node_modules/semver/internal/constants.js
|
|
17
17
|
var require_constants = __commonJS({
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_9665igqy8a from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_9665igqy8a from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_9665igqy8a from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_9665igqy8a.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_9665igqy8a.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_9665igqy8a.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-YSBRSSWQ.js";
|
|
15
15
|
import {
|
|
16
16
|
__commonJS,
|
|
17
17
|
__require,
|
|
18
18
|
__toESM
|
|
19
|
-
} from "../_node-chunks/chunk-
|
|
19
|
+
} from "../_node-chunks/chunk-5SLLAI3Z.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,35 +1,35 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_9665igqy8a from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_9665igqy8a from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_9665igqy8a from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_9665igqy8a.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_9665igqy8a.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_9665igqy8a.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
|
log
|
|
14
|
-
} from "../_node-chunks/chunk-
|
|
14
|
+
} from "../_node-chunks/chunk-KJ4CMXUR.js";
|
|
15
15
|
import {
|
|
16
16
|
any
|
|
17
|
-
} from "../_node-chunks/chunk-
|
|
17
|
+
} from "../_node-chunks/chunk-AP4NMVOZ.js";
|
|
18
18
|
import {
|
|
19
19
|
ADDON_ID,
|
|
20
20
|
COVERAGE_DIRECTORY,
|
|
21
21
|
STATUS_TYPE_ID_A11Y,
|
|
22
22
|
STATUS_TYPE_ID_COMPONENT_TEST,
|
|
23
23
|
storeOptions
|
|
24
|
-
} from "../_node-chunks/chunk-
|
|
25
|
-
import "../_node-chunks/chunk-
|
|
24
|
+
} from "../_node-chunks/chunk-CBBAJJI2.js";
|
|
25
|
+
import "../_node-chunks/chunk-2XBJOD6M.js";
|
|
26
26
|
import {
|
|
27
27
|
dirname,
|
|
28
28
|
join,
|
|
29
29
|
normalize,
|
|
30
30
|
path
|
|
31
|
-
} from "../_node-chunks/chunk-
|
|
32
|
-
import "../_node-chunks/chunk-
|
|
31
|
+
} from "../_node-chunks/chunk-V5BVTG4R.js";
|
|
32
|
+
import "../_node-chunks/chunk-5SLLAI3Z.js";
|
|
33
33
|
|
|
34
34
|
// src/node/vitest.ts
|
|
35
35
|
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_9665igqy8a from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_9665igqy8a from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_9665igqy8a from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_9665igqy8a.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_9665igqy8a.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_9665igqy8a.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
|
resolvePackageDir
|
|
14
|
-
} from "./_node-chunks/chunk-
|
|
14
|
+
} from "./_node-chunks/chunk-MIGPAHM2.js";
|
|
15
15
|
import {
|
|
16
16
|
any
|
|
17
|
-
} from "./_node-chunks/chunk-
|
|
17
|
+
} from "./_node-chunks/chunk-AP4NMVOZ.js";
|
|
18
18
|
import {
|
|
19
19
|
DOCUMENTATION_LINK
|
|
20
|
-
} from "./_node-chunks/chunk-
|
|
20
|
+
} from "./_node-chunks/chunk-CBBAJJI2.js";
|
|
21
21
|
import {
|
|
22
22
|
require_dist
|
|
23
|
-
} from "./_node-chunks/chunk-
|
|
23
|
+
} from "./_node-chunks/chunk-SNEOL6TF.js";
|
|
24
24
|
import {
|
|
25
25
|
dirname,
|
|
26
26
|
join,
|
|
27
27
|
relative,
|
|
28
28
|
resolve
|
|
29
|
-
} from "./_node-chunks/chunk-
|
|
29
|
+
} from "./_node-chunks/chunk-V5BVTG4R.js";
|
|
30
30
|
import {
|
|
31
31
|
require_compare,
|
|
32
32
|
require_constants,
|
|
@@ -36,11 +36,11 @@ import {
|
|
|
36
36
|
require_parse_options,
|
|
37
37
|
require_re,
|
|
38
38
|
require_semver
|
|
39
|
-
} from "./_node-chunks/chunk-
|
|
39
|
+
} from "./_node-chunks/chunk-YSBRSSWQ.js";
|
|
40
40
|
import {
|
|
41
41
|
__commonJS,
|
|
42
42
|
__toESM
|
|
43
|
-
} from "./_node-chunks/chunk-
|
|
43
|
+
} from "./_node-chunks/chunk-5SLLAI3Z.js";
|
|
44
44
|
|
|
45
45
|
// ../../../node_modules/semver/functions/parse.js
|
|
46
46
|
var require_parse = __commonJS({
|
package/dist/preset.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_9665igqy8a from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_9665igqy8a from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_9665igqy8a from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_9665igqy8a.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_9665igqy8a.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_9665igqy8a.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -12,10 +12,10 @@ var require = CJS_COMPAT_NODE_MODULE_kvn3cdpo489.createRequire(import.meta.url);
|
|
|
12
12
|
import {
|
|
13
13
|
log,
|
|
14
14
|
noop
|
|
15
|
-
} from "./_node-chunks/chunk-
|
|
15
|
+
} from "./_node-chunks/chunk-KJ4CMXUR.js";
|
|
16
16
|
import {
|
|
17
17
|
importMetaResolve
|
|
18
|
-
} from "./_node-chunks/chunk-
|
|
18
|
+
} from "./_node-chunks/chunk-MIGPAHM2.js";
|
|
19
19
|
import {
|
|
20
20
|
ADDON_ID,
|
|
21
21
|
COVERAGE_DIRECTORY,
|
|
@@ -24,19 +24,19 @@ import {
|
|
|
24
24
|
STORYBOOK_ADDON_TEST_CHANNEL,
|
|
25
25
|
TEST_PROVIDER_STORE_CHANNEL_EVENT_NAME,
|
|
26
26
|
storeOptions
|
|
27
|
-
} from "./_node-chunks/chunk-
|
|
27
|
+
} from "./_node-chunks/chunk-CBBAJJI2.js";
|
|
28
28
|
import {
|
|
29
29
|
require_picocolors
|
|
30
|
-
} from "./_node-chunks/chunk-
|
|
30
|
+
} from "./_node-chunks/chunk-2XBJOD6M.js";
|
|
31
31
|
import {
|
|
32
32
|
require_dist
|
|
33
|
-
} from "./_node-chunks/chunk-
|
|
33
|
+
} from "./_node-chunks/chunk-SNEOL6TF.js";
|
|
34
34
|
import {
|
|
35
35
|
normalize
|
|
36
|
-
} from "./_node-chunks/chunk-
|
|
36
|
+
} from "./_node-chunks/chunk-V5BVTG4R.js";
|
|
37
37
|
import {
|
|
38
38
|
__toESM
|
|
39
|
-
} from "./_node-chunks/chunk-
|
|
39
|
+
} from "./_node-chunks/chunk-5SLLAI3Z.js";
|
|
40
40
|
|
|
41
41
|
// src/preset.ts
|
|
42
42
|
import { mkdir } from "node:fs/promises";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_9665igqy8a from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_9665igqy8a from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_9665igqy8a from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_9665igqy8a.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_9665igqy8a.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_9665igqy8a.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-5SLLAI3Z.js";
|
|
17
17
|
|
|
18
18
|
// ../../../node_modules/tree-kill/index.js
|
|
19
19
|
var require_tree_kill = __commonJS({
|
|
@@ -1,32 +1,33 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_9665igqy8a from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_9665igqy8a from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_9665igqy8a from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_9665igqy8a.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_9665igqy8a.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_9665igqy8a.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-2XBJOD6M.js";
|
|
15
15
|
import {
|
|
16
16
|
require_dist
|
|
17
|
-
} from "../_node-chunks/chunk-
|
|
17
|
+
} from "../_node-chunks/chunk-SNEOL6TF.js";
|
|
18
18
|
import {
|
|
19
19
|
join,
|
|
20
20
|
normalize,
|
|
21
|
+
path,
|
|
21
22
|
relative,
|
|
22
23
|
resolve,
|
|
23
24
|
sep
|
|
24
|
-
} from "../_node-chunks/chunk-
|
|
25
|
+
} from "../_node-chunks/chunk-V5BVTG4R.js";
|
|
25
26
|
import {
|
|
26
27
|
__commonJS,
|
|
27
28
|
__require,
|
|
28
29
|
__toESM
|
|
29
|
-
} from "../_node-chunks/chunk-
|
|
30
|
+
} from "../_node-chunks/chunk-5SLLAI3Z.js";
|
|
30
31
|
|
|
31
32
|
// ../../../node_modules/braces/lib/utils.js
|
|
32
33
|
var require_utils = __commonJS({
|
|
@@ -704,7 +705,7 @@ var require_braces = __commonJS({
|
|
|
704
705
|
var require_constants2 = __commonJS({
|
|
705
706
|
"../../../node_modules/picomatch/lib/constants.js"(exports, module) {
|
|
706
707
|
"use strict";
|
|
707
|
-
var
|
|
708
|
+
var path2 = __require("path"), WIN_SLASH = "\\\\/", WIN_NO_SLASH = `[^${WIN_SLASH}]`, DOT_LITERAL = "\\.", PLUS_LITERAL = "\\+", QMARK_LITERAL = "\\?", SLASH_LITERAL = "\\/", ONE_CHAR = "(?=.)", QMARK = "[^/]", END_ANCHOR = `(?:${SLASH_LITERAL}|$)`, START_ANCHOR = `(?:^|${SLASH_LITERAL})`, DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`, NO_DOT = `(?!${DOT_LITERAL})`, NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`, NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`, NO_DOTS_SLASH = `(?!${DOTS_SLASH})`, QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`, STAR = `${QMARK}*?`, POSIX_CHARS = {
|
|
708
709
|
DOT_LITERAL,
|
|
709
710
|
PLUS_LITERAL,
|
|
710
711
|
QMARK_LITERAL,
|
|
@@ -854,7 +855,7 @@ var require_constants2 = __commonJS({
|
|
|
854
855
|
/* | */
|
|
855
856
|
CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
|
|
856
857
|
/* \uFEFF */
|
|
857
|
-
SEP:
|
|
858
|
+
SEP: path2.sep,
|
|
858
859
|
/**
|
|
859
860
|
* Create EXTGLOB_CHARS
|
|
860
861
|
*/
|
|
@@ -881,7 +882,7 @@ var require_constants2 = __commonJS({
|
|
|
881
882
|
var require_utils2 = __commonJS({
|
|
882
883
|
"../../../node_modules/picomatch/lib/utils.js"(exports) {
|
|
883
884
|
"use strict";
|
|
884
|
-
var
|
|
885
|
+
var path2 = __require("path"), win32 = process.platform === "win32", {
|
|
885
886
|
REGEX_BACKSLASH,
|
|
886
887
|
REGEX_REMOVE_BACKSLASH,
|
|
887
888
|
REGEX_SPECIAL_CHARS,
|
|
@@ -897,7 +898,7 @@ var require_utils2 = __commonJS({
|
|
|
897
898
|
let segs = process.version.slice(1).split(".").map(Number);
|
|
898
899
|
return segs.length === 3 && segs[0] >= 9 || segs[0] === 8 && segs[1] >= 10;
|
|
899
900
|
};
|
|
900
|
-
exports.isWindows = (options) => options && typeof options.windows == "boolean" ? options.windows : win32 === !0 ||
|
|
901
|
+
exports.isWindows = (options) => options && typeof options.windows == "boolean" ? options.windows : win32 === !0 || path2.sep === "\\";
|
|
901
902
|
exports.escapeLast = (input, char, lastIdx) => {
|
|
902
903
|
let idx = input.lastIndexOf(char, lastIdx);
|
|
903
904
|
return idx === -1 ? input : input[idx - 1] === "\\" ? exports.escapeLast(input, char, idx - 1) : `${input.slice(0, idx)}\\${input.slice(idx)}`;
|
|
@@ -1548,7 +1549,7 @@ var require_parse2 = __commonJS({
|
|
|
1548
1549
|
var require_picomatch = __commonJS({
|
|
1549
1550
|
"../../../node_modules/picomatch/lib/picomatch.js"(exports, module) {
|
|
1550
1551
|
"use strict";
|
|
1551
|
-
var
|
|
1552
|
+
var path2 = __require("path"), scan = require_scan(), parse = require_parse2(), utils = require_utils2(), constants = require_constants2(), isObject = (val) => val && typeof val == "object" && !Array.isArray(val), picomatch = (glob, options, returnState = !1) => {
|
|
1552
1553
|
if (Array.isArray(glob)) {
|
|
1553
1554
|
let fns = glob.map((input) => picomatch(input, options, returnState));
|
|
1554
1555
|
return (str) => {
|
|
@@ -1583,7 +1584,7 @@ var require_picomatch = __commonJS({
|
|
|
1583
1584
|
let opts = options || {}, format = opts.format || (posix ? utils.toPosixSlashes : null), match2 = input === glob, output = match2 && format ? format(input) : input;
|
|
1584
1585
|
return match2 === !1 && (output = format ? format(input) : input, match2 = output === glob), (match2 === !1 || opts.capture === !0) && (opts.matchBase === !0 || opts.basename === !0 ? match2 = picomatch.matchBase(input, regex, options, posix) : match2 = regex.exec(output)), { isMatch: !!match2, match: match2, output };
|
|
1585
1586
|
};
|
|
1586
|
-
picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => (glob instanceof RegExp ? glob : picomatch.makeRe(glob, options)).test(
|
|
1587
|
+
picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => (glob instanceof RegExp ? glob : picomatch.makeRe(glob, options)).test(path2.basename(input));
|
|
1587
1588
|
picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
|
|
1588
1589
|
picomatch.parse = (pattern, options) => Array.isArray(pattern) ? pattern.map((p) => picomatch.parse(p, options)) : parse(pattern, { ...options, fastpaths: !1 });
|
|
1589
1590
|
picomatch.scan = (input, options) => scan(input, options);
|
|
@@ -2337,7 +2338,7 @@ import {
|
|
|
2337
2338
|
experimental_loadStorybook,
|
|
2338
2339
|
mapStaticDir
|
|
2339
2340
|
} from "storybook/internal/core-server";
|
|
2340
|
-
import { readConfig, vitestTransform } from "storybook/internal/csf-tools";
|
|
2341
|
+
import { componentTransform, readConfig, vitestTransform } from "storybook/internal/csf-tools";
|
|
2341
2342
|
import { MainFileMissingError } from "storybook/internal/server-errors";
|
|
2342
2343
|
import { telemetry } from "storybook/internal/telemetry";
|
|
2343
2344
|
import { oneWayHash } from "storybook/internal/telemetry";
|
|
@@ -2383,6 +2384,33 @@ var WORKING_DIR = process.cwd(), defaultOptions = {
|
|
|
2383
2384
|
load(id) {
|
|
2384
2385
|
return id.endsWith(".mdx") ? "export default {};" : null;
|
|
2385
2386
|
}
|
|
2387
|
+
}, getComponentTestPaths = () => {
|
|
2388
|
+
let envPaths = process.env.STORYBOOK_COMPONENT_PATHS;
|
|
2389
|
+
return envPaths ? envPaths.split(";").filter(Boolean) : [];
|
|
2390
|
+
}, createComponentTestTransformPlugin = (presets, configDir) => {
|
|
2391
|
+
let storybookComponentTestPaths = getComponentTestPaths();
|
|
2392
|
+
return {
|
|
2393
|
+
name: "storybook:component-test-transform-plugin",
|
|
2394
|
+
transform: {
|
|
2395
|
+
order: "pre",
|
|
2396
|
+
async handler(code, id) {
|
|
2397
|
+
if (!optionalEnvToBoolean(process.env.VITEST) || storybookComponentTestPaths.length === 0)
|
|
2398
|
+
return code;
|
|
2399
|
+
let resolvedId = path.resolve(id);
|
|
2400
|
+
return storybookComponentTestPaths.some(
|
|
2401
|
+
(testPath) => resolvedId === testPath || resolvedId.startsWith(testPath + path.sep) || resolvedId.endsWith(testPath)
|
|
2402
|
+
) ? (await componentTransform({
|
|
2403
|
+
code,
|
|
2404
|
+
fileName: id,
|
|
2405
|
+
getComponentArgTypes: async ({ componentName, fileName }) => presets.apply("internal_getArgTypesData", null, {
|
|
2406
|
+
componentFilePath: fileName,
|
|
2407
|
+
componentExportName: componentName,
|
|
2408
|
+
configDir
|
|
2409
|
+
})
|
|
2410
|
+
})).code : code;
|
|
2411
|
+
}
|
|
2412
|
+
}
|
|
2413
|
+
};
|
|
2386
2414
|
}, storybookTest = async (options) => {
|
|
2387
2415
|
if (!optionalEnvToBoolean(process.env.VITEST))
|
|
2388
2416
|
return [];
|
|
@@ -2489,7 +2517,7 @@ var WORKING_DIR = process.cwd(), defaultOptions = {
|
|
|
2489
2517
|
__VITEST_EXCLUDE_TAGS__: finalOptions.tags.exclude.join(","),
|
|
2490
2518
|
__VITEST_SKIP_TAGS__: finalOptions.tags.skip.join(",")
|
|
2491
2519
|
},
|
|
2492
|
-
include: includeStories,
|
|
2520
|
+
include: [...includeStories, ...getComponentTestPaths()],
|
|
2493
2521
|
exclude: [
|
|
2494
2522
|
...nonMutableInputConfig.test?.exclude ?? [],
|
|
2495
2523
|
join(relative(finalOptions.vitestRoot, process.cwd()), "**/*.mdx").replaceAll(sep, "/")
|
|
@@ -2506,12 +2534,12 @@ var WORKING_DIR = process.cwd(), defaultOptions = {
|
|
|
2506
2534
|
browser: {
|
|
2507
2535
|
commands: {
|
|
2508
2536
|
getInitialGlobals: () => {
|
|
2509
|
-
let envConfig = JSON.parse(process.env.VITEST_STORYBOOK_CONFIG ?? "{}");
|
|
2510
|
-
return {
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
};
|
|
2537
|
+
let envConfig = JSON.parse(process.env.VITEST_STORYBOOK_CONFIG ?? "{}"), shouldRunA11yTests = isVitestStorybook ? envConfig.a11y ?? !1 : !0, globals = {};
|
|
2538
|
+
return globals.a11y = {
|
|
2539
|
+
manual: !shouldRunA11yTests
|
|
2540
|
+
}, process.env.STORYBOOK_COMPONENT_PATHS && (globals.ghostStories = {
|
|
2541
|
+
enabled: !0
|
|
2542
|
+
}), globals;
|
|
2515
2543
|
}
|
|
2516
2544
|
},
|
|
2517
2545
|
// if there is a test.browser config AND test.browser.screenshotFailures is not explicitly set, we set it to false
|
|
@@ -2603,7 +2631,7 @@ var WORKING_DIR = process.cwd(), defaultOptions = {
|
|
|
2603
2631
|
});
|
|
2604
2632
|
}
|
|
2605
2633
|
};
|
|
2606
|
-
if (plugins.push(storybookTestPlugin), isVitestStorybook) {
|
|
2634
|
+
if (getComponentTestPaths().length > 0 && plugins.push(createComponentTestTransformPlugin(presets, finalOptions.configDir)), plugins.push(storybookTestPlugin), isVitestStorybook) {
|
|
2607
2635
|
let projectName = `storybook:${normalize(finalOptions.configDir)}`;
|
|
2608
2636
|
plugins.push({
|
|
2609
2637
|
name: "storybook:workspace-name-override",
|
|
@@ -50,7 +50,16 @@ var DEFAULT_VIEWPORT_DIMENSIONS = {
|
|
|
50
50
|
};
|
|
51
51
|
|
|
52
52
|
// src/vitest-plugin/test-utils.ts
|
|
53
|
-
var { getInitialGlobals } = server.commands, convertToFilePath = (url) => url.replace(/^file:\/\//, "").replace(/^\/+([a-zA-Z]:)/, "$1").replace(/%20/g, " "), testStory = (
|
|
53
|
+
var { getInitialGlobals } = server.commands, convertToFilePath = (url) => url.replace(/^file:\/\//, "").replace(/^\/+([a-zA-Z]:)/, "$1").replace(/%20/g, " "), testStory = ({
|
|
54
|
+
exportName,
|
|
55
|
+
story,
|
|
56
|
+
meta,
|
|
57
|
+
skipTags,
|
|
58
|
+
storyId,
|
|
59
|
+
componentPath,
|
|
60
|
+
testName,
|
|
61
|
+
componentName
|
|
62
|
+
}) => async (context) => {
|
|
54
63
|
let annotations = getCsfFactoryAnnotations(story, meta), test = isStory(story) && testName ? getStoryChildren(story).find((child) => child.input.name === testName) : void 0, storyAnnotations = test ? test.input : annotations.story, composedStory = composeStory(
|
|
55
64
|
storyAnnotations,
|
|
56
65
|
annotations.meta,
|
|
@@ -60,7 +69,7 @@ var { getInitialGlobals } = server.commands, convertToFilePath = (url) => url.re
|
|
|
60
69
|
);
|
|
61
70
|
(composedStory === void 0 || skipTags?.some((tag) => composedStory.tags.includes(tag))) && context.skip(), context.story = composedStory;
|
|
62
71
|
let _task = context.task;
|
|
63
|
-
_task.meta.storyId = storyId, await setViewport(composedStory.parameters, composedStory.globals), await composedStory.run(void 0), _task.meta.reports = composedStory.reporting.reports;
|
|
72
|
+
_task.meta.storyId = storyId, _task.meta.componentPath = componentPath, _task.meta.componentName = componentName, await setViewport(composedStory.parameters, composedStory.globals), await composedStory.run(void 0), _task.meta.reports = composedStory.reporting.reports;
|
|
64
73
|
};
|
|
65
74
|
export {
|
|
66
75
|
convertToFilePath,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/addon-vitest",
|
|
3
|
-
"version": "10.2.0-alpha.
|
|
3
|
+
"version": "10.2.0-alpha.18",
|
|
4
4
|
"description": "Storybook Vitest addon: Blazing fast component testing using stories",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"@vitest/browser": "^3.0.0 || ^4.0.0",
|
|
100
100
|
"@vitest/browser-playwright": "^4.0.0",
|
|
101
101
|
"@vitest/runner": "^3.0.0 || ^4.0.0",
|
|
102
|
-
"storybook": "^10.2.0-alpha.
|
|
102
|
+
"storybook": "^10.2.0-alpha.18",
|
|
103
103
|
"vitest": "^3.0.0 || ^4.0.0"
|
|
104
104
|
},
|
|
105
105
|
"peerDependenciesMeta": {
|