@storybook/addon-vitest 10.2.0-alpha.0 → 10.2.0-alpha.2
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-TXOIMDNC.js → chunk-4EVO7BNQ.js} +6 -6
- package/dist/_node-chunks/{chunk-OSKARTMP.js → chunk-4HEYL5QI.js} +9 -9
- package/dist/_node-chunks/{chunk-Z23XHALJ.js → chunk-4LBJMPSA.js} +8 -8
- package/dist/_node-chunks/{chunk-NDUNUMOP.js → chunk-G46UBKFY.js} +9 -9
- package/dist/_node-chunks/{chunk-XQYIMFPS.js → chunk-ISAP32HL.js} +10 -10
- package/dist/_node-chunks/{chunk-EB23O76S.js → chunk-JCSFLSIG.js} +7 -7
- package/dist/_node-chunks/{chunk-SXSP3R47.js → chunk-JOXCTSZJ.js} +6 -6
- package/dist/_node-chunks/{chunk-22KW6U6M.js → chunk-RFRSA2NQ.js} +11 -11
- package/dist/_node-chunks/{chunk-YQVL2342.js → chunk-T3VNIUA5.js} +23 -23
- package/dist/manager.js +8 -8
- package/dist/node/coverage-reporter.js +44 -44
- package/dist/node/vitest.js +20 -20
- package/dist/postinstall.js +87 -87
- package/dist/preset.js +20 -20
- package/dist/vitest-plugin/global-setup.js +9 -9
- package/dist/vitest-plugin/index.js +54 -54
- package/package.json +2 -6
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_pxsfxj9du6e from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_pxsfxj9du6e from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_pxsfxj9du6e from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_pxsfxj9du6e.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_pxsfxj9du6e.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_pxsfxj9du6e.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-T3VNIUA5.js";
|
|
15
15
|
import {
|
|
16
16
|
__commonJS,
|
|
17
17
|
__require,
|
|
18
18
|
__toESM
|
|
19
|
-
} from "../_node-chunks/chunk-
|
|
19
|
+
} from "../_node-chunks/chunk-4EVO7BNQ.js";
|
|
20
20
|
|
|
21
|
-
//
|
|
21
|
+
// ../../../node_modules/istanbul-lib-report/node_modules/make-dir/index.js
|
|
22
22
|
var require_make_dir = __commonJS({
|
|
23
|
-
"
|
|
23
|
+
"../../../node_modules/istanbul-lib-report/node_modules/make-dir/index.js"(exports, module) {
|
|
24
24
|
"use strict";
|
|
25
25
|
var fs = __require("fs"), path = __require("path"), { promisify } = __require("util"), semverGte = require_gte(), useNativeRecursiveOption = semverGte(process.version, "10.12.0"), checkPath = (pth) => {
|
|
26
26
|
if (process.platform === "win32" && /[<>:"|?*]/.test(pth.replace(path.parse(pth).root, ""))) {
|
|
@@ -106,9 +106,9 @@ var require_make_dir = __commonJS({
|
|
|
106
106
|
}
|
|
107
107
|
});
|
|
108
108
|
|
|
109
|
-
//
|
|
109
|
+
// ../../../node_modules/has-flag/index.js
|
|
110
110
|
var require_has_flag = __commonJS({
|
|
111
|
-
"
|
|
111
|
+
"../../../node_modules/has-flag/index.js"(exports, module) {
|
|
112
112
|
"use strict";
|
|
113
113
|
module.exports = (flag, argv = process.argv) => {
|
|
114
114
|
let prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--", position = argv.indexOf(prefix + flag), terminatorPosition = argv.indexOf("--");
|
|
@@ -117,9 +117,9 @@ var require_has_flag = __commonJS({
|
|
|
117
117
|
}
|
|
118
118
|
});
|
|
119
119
|
|
|
120
|
-
//
|
|
120
|
+
// ../../../node_modules/supports-color/index.js
|
|
121
121
|
var require_supports_color = __commonJS({
|
|
122
|
-
"
|
|
122
|
+
"../../../node_modules/supports-color/index.js"(exports, module) {
|
|
123
123
|
"use strict";
|
|
124
124
|
var os = __require("os"), tty = __require("tty"), hasFlag = require_has_flag(), { env } = process, forceColor;
|
|
125
125
|
hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never") ? forceColor = 0 : (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) && (forceColor = 1);
|
|
@@ -177,9 +177,9 @@ var require_supports_color = __commonJS({
|
|
|
177
177
|
}
|
|
178
178
|
});
|
|
179
179
|
|
|
180
|
-
//
|
|
180
|
+
// ../../../node_modules/istanbul-lib-report/lib/file-writer.js
|
|
181
181
|
var require_file_writer = __commonJS({
|
|
182
|
-
"
|
|
182
|
+
"../../../node_modules/istanbul-lib-report/lib/file-writer.js"(exports, module) {
|
|
183
183
|
"use strict";
|
|
184
184
|
var path = __require("path"), fs = __require("fs"), mkdirp = require_make_dir(), supportsColor = require_supports_color(), ContentWriter = class {
|
|
185
185
|
/**
|
|
@@ -296,9 +296,9 @@ var require_file_writer = __commonJS({
|
|
|
296
296
|
}
|
|
297
297
|
});
|
|
298
298
|
|
|
299
|
-
//
|
|
299
|
+
// ../../../node_modules/istanbul-lib-report/lib/xml-writer.js
|
|
300
300
|
var require_xml_writer = __commonJS({
|
|
301
|
-
"
|
|
301
|
+
"../../../node_modules/istanbul-lib-report/lib/xml-writer.js"(exports, module) {
|
|
302
302
|
"use strict";
|
|
303
303
|
function attrString(attrs) {
|
|
304
304
|
return Object.entries(attrs || {}).map(([k, v]) => ` ${k}="${v}"`).join("");
|
|
@@ -357,9 +357,9 @@ var require_xml_writer = __commonJS({
|
|
|
357
357
|
}
|
|
358
358
|
});
|
|
359
359
|
|
|
360
|
-
//
|
|
360
|
+
// ../../../node_modules/istanbul-lib-report/lib/tree.js
|
|
361
361
|
var require_tree = __commonJS({
|
|
362
|
-
"
|
|
362
|
+
"../../../node_modules/istanbul-lib-report/lib/tree.js"(exports, module) {
|
|
363
363
|
"use strict";
|
|
364
364
|
var Visitor = class {
|
|
365
365
|
constructor(delegate) {
|
|
@@ -432,9 +432,9 @@ var require_tree = __commonJS({
|
|
|
432
432
|
}
|
|
433
433
|
});
|
|
434
434
|
|
|
435
|
-
//
|
|
435
|
+
// ../../../node_modules/istanbul-lib-report/lib/watermarks.js
|
|
436
436
|
var require_watermarks = __commonJS({
|
|
437
|
-
"
|
|
437
|
+
"../../../node_modules/istanbul-lib-report/lib/watermarks.js"(exports, module) {
|
|
438
438
|
"use strict";
|
|
439
439
|
module.exports = {
|
|
440
440
|
getDefault() {
|
|
@@ -449,9 +449,9 @@ var require_watermarks = __commonJS({
|
|
|
449
449
|
}
|
|
450
450
|
});
|
|
451
451
|
|
|
452
|
-
//
|
|
452
|
+
// ../../../node_modules/istanbul-lib-coverage/lib/percent.js
|
|
453
453
|
var require_percent = __commonJS({
|
|
454
|
-
"
|
|
454
|
+
"../../../node_modules/istanbul-lib-coverage/lib/percent.js"(exports, module) {
|
|
455
455
|
"use strict";
|
|
456
456
|
module.exports = function(covered, total) {
|
|
457
457
|
let tmp;
|
|
@@ -460,9 +460,9 @@ var require_percent = __commonJS({
|
|
|
460
460
|
}
|
|
461
461
|
});
|
|
462
462
|
|
|
463
|
-
//
|
|
463
|
+
// ../../../node_modules/istanbul-lib-coverage/lib/data-properties.js
|
|
464
464
|
var require_data_properties = __commonJS({
|
|
465
|
-
"
|
|
465
|
+
"../../../node_modules/istanbul-lib-coverage/lib/data-properties.js"(exports, module) {
|
|
466
466
|
"use strict";
|
|
467
467
|
module.exports = function(klass, properties) {
|
|
468
468
|
properties.forEach((p) => {
|
|
@@ -477,9 +477,9 @@ var require_data_properties = __commonJS({
|
|
|
477
477
|
}
|
|
478
478
|
});
|
|
479
479
|
|
|
480
|
-
//
|
|
480
|
+
// ../../../node_modules/istanbul-lib-coverage/lib/coverage-summary.js
|
|
481
481
|
var require_coverage_summary = __commonJS({
|
|
482
|
-
"
|
|
482
|
+
"../../../node_modules/istanbul-lib-coverage/lib/coverage-summary.js"(exports, module) {
|
|
483
483
|
"use strict";
|
|
484
484
|
var percent = require_percent(), dataProperties = require_data_properties();
|
|
485
485
|
function blankSummary() {
|
|
@@ -554,9 +554,9 @@ var require_coverage_summary = __commonJS({
|
|
|
554
554
|
}
|
|
555
555
|
});
|
|
556
556
|
|
|
557
|
-
//
|
|
557
|
+
// ../../../node_modules/istanbul-lib-coverage/lib/file-coverage.js
|
|
558
558
|
var require_file_coverage = __commonJS({
|
|
559
|
-
"
|
|
559
|
+
"../../../node_modules/istanbul-lib-coverage/lib/file-coverage.js"(exports, module) {
|
|
560
560
|
"use strict";
|
|
561
561
|
var percent = require_percent(), dataProperties = require_data_properties(), { CoverageSummary } = require_coverage_summary();
|
|
562
562
|
function emptyCoverage(filePath, reportLogic) {
|
|
@@ -800,9 +800,9 @@ var require_file_coverage = __commonJS({
|
|
|
800
800
|
}
|
|
801
801
|
});
|
|
802
802
|
|
|
803
|
-
//
|
|
803
|
+
// ../../../node_modules/istanbul-lib-coverage/lib/coverage-map.js
|
|
804
804
|
var require_coverage_map = __commonJS({
|
|
805
|
-
"
|
|
805
|
+
"../../../node_modules/istanbul-lib-coverage/lib/coverage-map.js"(exports, module) {
|
|
806
806
|
"use strict";
|
|
807
807
|
var { FileCoverage } = require_file_coverage(), { CoverageSummary } = require_coverage_summary();
|
|
808
808
|
function maybeConstruct(obj, klass) {
|
|
@@ -898,9 +898,9 @@ var require_coverage_map = __commonJS({
|
|
|
898
898
|
}
|
|
899
899
|
});
|
|
900
900
|
|
|
901
|
-
//
|
|
901
|
+
// ../../../node_modules/istanbul-lib-coverage/index.js
|
|
902
902
|
var require_istanbul_lib_coverage = __commonJS({
|
|
903
|
-
"
|
|
903
|
+
"../../../node_modules/istanbul-lib-coverage/index.js"(exports, module) {
|
|
904
904
|
"use strict";
|
|
905
905
|
var { FileCoverage } = require_file_coverage(), { CoverageMap } = require_coverage_map(), { CoverageSummary } = require_coverage_summary();
|
|
906
906
|
module.exports = {
|
|
@@ -941,9 +941,9 @@ var require_istanbul_lib_coverage = __commonJS({
|
|
|
941
941
|
}
|
|
942
942
|
});
|
|
943
943
|
|
|
944
|
-
//
|
|
944
|
+
// ../../../node_modules/istanbul-lib-report/lib/path.js
|
|
945
945
|
var require_path = __commonJS({
|
|
946
|
-
"
|
|
946
|
+
"../../../node_modules/istanbul-lib-report/lib/path.js"(exports, module) {
|
|
947
947
|
"use strict";
|
|
948
948
|
var path = __require("path"), parsePath = path.parse, SEP = path.sep, origParser = parsePath, origSep = SEP;
|
|
949
949
|
function makeRelativeNormalizedPath(str, sep) {
|
|
@@ -1035,9 +1035,9 @@ var require_path = __commonJS({
|
|
|
1035
1035
|
}
|
|
1036
1036
|
});
|
|
1037
1037
|
|
|
1038
|
-
//
|
|
1038
|
+
// ../../../node_modules/istanbul-lib-report/lib/summarizer-factory.js
|
|
1039
1039
|
var require_summarizer_factory = __commonJS({
|
|
1040
|
-
"
|
|
1040
|
+
"../../../node_modules/istanbul-lib-report/lib/summarizer-factory.js"(exports, module) {
|
|
1041
1041
|
"use strict";
|
|
1042
1042
|
var coverage = require_istanbul_lib_coverage(), Path = require_path(), { BaseNode, BaseTree } = require_tree(), ReportNode = class _ReportNode extends BaseNode {
|
|
1043
1043
|
constructor(path, fileCoverage) {
|
|
@@ -1198,9 +1198,9 @@ var require_summarizer_factory = __commonJS({
|
|
|
1198
1198
|
}
|
|
1199
1199
|
});
|
|
1200
1200
|
|
|
1201
|
-
//
|
|
1201
|
+
// ../../../node_modules/istanbul-lib-report/lib/context.js
|
|
1202
1202
|
var require_context = __commonJS({
|
|
1203
|
-
"
|
|
1203
|
+
"../../../node_modules/istanbul-lib-report/lib/context.js"(exports, module) {
|
|
1204
1204
|
"use strict";
|
|
1205
1205
|
var fs = __require("fs"), FileWriter = require_file_writer(), XMLWriter = require_xml_writer(), tree = require_tree(), watermarks = require_watermarks(), SummarizerFactory = require_summarizer_factory();
|
|
1206
1206
|
function defaultSourceLookup(path) {
|
|
@@ -1285,9 +1285,9 @@ var require_context = __commonJS({
|
|
|
1285
1285
|
}
|
|
1286
1286
|
});
|
|
1287
1287
|
|
|
1288
|
-
//
|
|
1288
|
+
// ../../../node_modules/istanbul-lib-report/lib/report-base.js
|
|
1289
1289
|
var require_report_base = __commonJS({
|
|
1290
|
-
"
|
|
1290
|
+
"../../../node_modules/istanbul-lib-report/lib/report-base.js"(exports, module) {
|
|
1291
1291
|
"use strict";
|
|
1292
1292
|
var _summarizer = Symbol("ReportBase.#summarizer"), ReportBase2 = class {
|
|
1293
1293
|
constructor(opts = {}) {
|
|
@@ -1301,9 +1301,9 @@ var require_report_base = __commonJS({
|
|
|
1301
1301
|
}
|
|
1302
1302
|
});
|
|
1303
1303
|
|
|
1304
|
-
//
|
|
1304
|
+
// ../../../node_modules/istanbul-lib-report/index.js
|
|
1305
1305
|
var require_istanbul_lib_report = __commonJS({
|
|
1306
|
-
"
|
|
1306
|
+
"../../../node_modules/istanbul-lib-report/index.js"(exports, module) {
|
|
1307
1307
|
"use strict";
|
|
1308
1308
|
var Context = require_context(), watermarks = require_watermarks(), ReportBase2 = require_report_base();
|
|
1309
1309
|
module.exports = {
|
package/dist/node/vitest.js
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_pxsfxj9du6e from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_pxsfxj9du6e from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_pxsfxj9du6e from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_pxsfxj9du6e.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_pxsfxj9du6e.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_pxsfxj9du6e.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-ISAP32HL.js";
|
|
15
15
|
import {
|
|
16
16
|
any
|
|
17
|
-
} from "../_node-chunks/chunk-
|
|
17
|
+
} from "../_node-chunks/chunk-RFRSA2NQ.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-JOXCTSZJ.js";
|
|
25
|
+
import "../_node-chunks/chunk-4HEYL5QI.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-JCSFLSIG.js";
|
|
32
|
+
import "../_node-chunks/chunk-4EVO7BNQ.js";
|
|
33
33
|
|
|
34
34
|
// src/node/vitest.ts
|
|
35
35
|
import process2 from "node:process";
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
experimental_getTestProviderStore
|
|
41
41
|
} from "storybook/internal/core-server";
|
|
42
42
|
|
|
43
|
-
//
|
|
43
|
+
// ../../../node_modules/es-toolkit/dist/function/debounce.mjs
|
|
44
44
|
function debounce(func, debounceMs, { signal, edges } = {}) {
|
|
45
45
|
let pendingThis, pendingArgs = null, leading = edges != null && edges.includes("leading"), trailing = edges == null || edges.includes("trailing"), invoke = () => {
|
|
46
46
|
pendingArgs !== null && (func.apply(pendingThis, pendingArgs), pendingThis = void 0, pendingArgs = null);
|
|
@@ -55,7 +55,7 @@ function debounce(func, debounceMs, { signal, edges } = {}) {
|
|
|
55
55
|
}, cancel = () => {
|
|
56
56
|
cancelTimer(), pendingThis = void 0, pendingArgs = null;
|
|
57
57
|
}, flush = () => {
|
|
58
|
-
invoke();
|
|
58
|
+
cancelTimer(), invoke();
|
|
59
59
|
}, debounced = function(...args) {
|
|
60
60
|
if (signal?.aborted)
|
|
61
61
|
return;
|
|
@@ -66,7 +66,7 @@ function debounce(func, debounceMs, { signal, edges } = {}) {
|
|
|
66
66
|
return debounced.schedule = schedule, debounced.cancel = cancel, debounced.flush = flush, signal?.addEventListener("abort", cancel, { once: !0 }), debounced;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
//
|
|
69
|
+
// ../../../node_modules/es-toolkit/dist/function/partial.mjs
|
|
70
70
|
function partial(func, ...partialArgs) {
|
|
71
71
|
return partialImpl(func, placeholderSymbol, ...partialArgs);
|
|
72
72
|
}
|
|
@@ -80,7 +80,7 @@ function partialImpl(func, placeholder, ...partialArgs) {
|
|
|
80
80
|
var placeholderSymbol = Symbol("partial.placeholder");
|
|
81
81
|
partial.placeholder = placeholderSymbol;
|
|
82
82
|
|
|
83
|
-
//
|
|
83
|
+
// ../../../node_modules/es-toolkit/dist/function/partialRight.mjs
|
|
84
84
|
function partialRight(func, ...partialArgs) {
|
|
85
85
|
return partialRightImpl(func, placeholderSymbol2, ...partialArgs);
|
|
86
86
|
}
|
|
@@ -94,13 +94,13 @@ function partialRightImpl(func, placeholder, ...partialArgs) {
|
|
|
94
94
|
var placeholderSymbol2 = Symbol("partialRight.placeholder");
|
|
95
95
|
partialRight.placeholder = placeholderSymbol2;
|
|
96
96
|
|
|
97
|
-
//
|
|
97
|
+
// ../../../node_modules/es-toolkit/dist/function/retry.mjs
|
|
98
98
|
var DEFAULT_RETRIES = Number.POSITIVE_INFINITY;
|
|
99
99
|
|
|
100
|
-
//
|
|
100
|
+
// ../../../node_modules/es-toolkit/dist/function/throttle.mjs
|
|
101
101
|
function throttle(func, throttleMs, { signal, edges = ["leading", "trailing"] } = {}) {
|
|
102
102
|
let pendingAt = null, debounced = debounce(func, throttleMs, { signal, edges }), throttled = function(...args) {
|
|
103
|
-
pendingAt == null ? pendingAt = Date.now() : Date.now() - pendingAt >= throttleMs && (pendingAt = Date.now(), debounced.cancel()), debounced
|
|
103
|
+
pendingAt == null ? pendingAt = Date.now() : Date.now() - pendingAt >= throttleMs && (pendingAt = Date.now(), debounced.cancel()), debounced(...args);
|
|
104
104
|
};
|
|
105
105
|
return throttled.cancel = debounced.cancel, throttled.flush = debounced.flush, throttled;
|
|
106
106
|
}
|
|
@@ -120,7 +120,7 @@ function errorToErrorLike(error) {
|
|
|
120
120
|
import { existsSync } from "node:fs";
|
|
121
121
|
import { getProjectRoot, resolvePathInStorybookCache } from "storybook/internal/common";
|
|
122
122
|
|
|
123
|
-
//
|
|
123
|
+
// ../../../node_modules/slash/index.js
|
|
124
124
|
function slash(path2) {
|
|
125
125
|
return path2.startsWith("\\\\?\\") ? path2 : path2.replace(/\\/g, "/");
|
|
126
126
|
}
|