@storybook/addon-vitest 10.5.0-alpha.1 → 10.5.0-alpha.3
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/_browser-chunks/chunk-O7QECQMH.js +167 -0
- package/dist/_node-chunks/{chunk-YV3RNY6T.js → chunk-5CDW3YI7.js} +6 -6
- package/dist/_node-chunks/{chunk-KQ3RLFRT.js → chunk-6ZJRTJIY.js} +6 -6
- package/dist/_node-chunks/{chunk-JXU5T5S3.js → chunk-AVVPQDU6.js} +6 -6
- package/dist/_node-chunks/{chunk-XOLAT3Q7.js → chunk-DZFPYJ5B.js} +6 -6
- package/dist/_node-chunks/{chunk-OH5RTNGN.js → chunk-G43QU6SH.js} +7 -7
- package/dist/_node-chunks/{chunk-RBGXMEUY.js → chunk-PJNLOP74.js} +7 -7
- package/dist/_node-chunks/{chunk-KPH357JY.js → chunk-RSUQW4CL.js} +7 -7
- package/dist/_node-chunks/{chunk-7LZCOVOW.js → chunk-X6D2YQG4.js} +9 -9
- package/dist/_node-chunks/{vitest.config.3.2.template-IPQM2R6W.js → vitest.config.3.2.template-RGYSIL6N.js} +7 -7
- package/dist/_node-chunks/{vitest.config.4.template-DC24XAJG.js → vitest.config.4.template-V4I6MLZH.js} +7 -7
- package/dist/_node-chunks/{vitest.config.template-GCKJ6JXG.js → vitest.config.template-53OQ4FSJ.js} +7 -7
- package/dist/_node-chunks/{vitest.workspace.template-37PQA3WO.js → vitest.workspace.template-CTWQ5DKT.js} +7 -7
- package/dist/constants.js +8 -8
- package/dist/manager.js +3 -160
- package/dist/node/coverage-reporter.js +8 -8
- package/dist/node/vitest.js +12 -12
- package/dist/postinstall.js +16 -16
- package/dist/preset.js +12 -12
- package/dist/vitest-plugin/global-setup.js +7 -7
- package/dist/vitest-plugin/index.js +21 -12
- package/dist/vitest-plugin/setup-file.js +28 -2
- package/package.json +4 -4
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
// ../../../node_modules/es-toolkit/dist/predicate/isFunction.mjs
|
|
2
|
+
function isFunction(value) {
|
|
3
|
+
return typeof value == "function";
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
// ../../../node_modules/es-toolkit/dist/predicate/isPlainObject.mjs
|
|
7
|
+
function isPlainObject(value) {
|
|
8
|
+
if (!value || typeof value != "object")
|
|
9
|
+
return !1;
|
|
10
|
+
let proto = Object.getPrototypeOf(value);
|
|
11
|
+
return proto === null || proto === Object.prototype || Object.getPrototypeOf(proto) === null ? Object.prototype.toString.call(value) === "[object Object]" : !1;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// ../../../node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs
|
|
15
|
+
function getSymbols(object) {
|
|
16
|
+
return Object.getOwnPropertySymbols(object).filter((symbol) => Object.prototype.propertyIsEnumerable.call(object, symbol));
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// ../../../node_modules/es-toolkit/dist/compat/_internal/getTag.mjs
|
|
20
|
+
function getTag(value) {
|
|
21
|
+
return value == null ? value === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(value);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// ../../../node_modules/es-toolkit/dist/compat/_internal/tags.mjs
|
|
25
|
+
var regexpTag = "[object RegExp]", stringTag = "[object String]", numberTag = "[object Number]", booleanTag = "[object Boolean]", argumentsTag = "[object Arguments]", symbolTag = "[object Symbol]", dateTag = "[object Date]", mapTag = "[object Map]", setTag = "[object Set]", arrayTag = "[object Array]", functionTag = "[object Function]", arrayBufferTag = "[object ArrayBuffer]", objectTag = "[object Object]", errorTag = "[object Error]", dataViewTag = "[object DataView]", uint8ArrayTag = "[object Uint8Array]", uint8ClampedArrayTag = "[object Uint8ClampedArray]", uint16ArrayTag = "[object Uint16Array]", uint32ArrayTag = "[object Uint32Array]", bigUint64ArrayTag = "[object BigUint64Array]", int8ArrayTag = "[object Int8Array]", int16ArrayTag = "[object Int16Array]", int32ArrayTag = "[object Int32Array]", bigInt64ArrayTag = "[object BigInt64Array]", float32ArrayTag = "[object Float32Array]", float64ArrayTag = "[object Float64Array]";
|
|
26
|
+
|
|
27
|
+
// ../../../node_modules/es-toolkit/dist/compat/util/eq.mjs
|
|
28
|
+
function eq(value, other) {
|
|
29
|
+
return value === other || Number.isNaN(value) && Number.isNaN(other);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// ../../../node_modules/es-toolkit/dist/predicate/isEqualWith.mjs
|
|
33
|
+
function isEqualWith(a, b, areValuesEqual) {
|
|
34
|
+
return isEqualWithImpl(a, b, void 0, void 0, void 0, void 0, areValuesEqual);
|
|
35
|
+
}
|
|
36
|
+
function isEqualWithImpl(a, b, property, aParent, bParent, stack, areValuesEqual) {
|
|
37
|
+
let result = areValuesEqual(a, b, property, aParent, bParent, stack);
|
|
38
|
+
if (result !== void 0)
|
|
39
|
+
return result;
|
|
40
|
+
if (typeof a == typeof b)
|
|
41
|
+
switch (typeof a) {
|
|
42
|
+
case "bigint":
|
|
43
|
+
case "string":
|
|
44
|
+
case "boolean":
|
|
45
|
+
case "symbol":
|
|
46
|
+
case "undefined":
|
|
47
|
+
return a === b;
|
|
48
|
+
case "number":
|
|
49
|
+
return a === b || Object.is(a, b);
|
|
50
|
+
case "function":
|
|
51
|
+
return a === b;
|
|
52
|
+
case "object":
|
|
53
|
+
return areObjectsEqual(a, b, stack, areValuesEqual);
|
|
54
|
+
}
|
|
55
|
+
return areObjectsEqual(a, b, stack, areValuesEqual);
|
|
56
|
+
}
|
|
57
|
+
function areObjectsEqual(a, b, stack, areValuesEqual) {
|
|
58
|
+
if (Object.is(a, b))
|
|
59
|
+
return !0;
|
|
60
|
+
let aTag = getTag(a), bTag = getTag(b);
|
|
61
|
+
if (aTag === argumentsTag && (aTag = objectTag), bTag === argumentsTag && (bTag = objectTag), aTag !== bTag)
|
|
62
|
+
return !1;
|
|
63
|
+
switch (aTag) {
|
|
64
|
+
case stringTag:
|
|
65
|
+
return a.toString() === b.toString();
|
|
66
|
+
case numberTag: {
|
|
67
|
+
let x = a.valueOf(), y = b.valueOf();
|
|
68
|
+
return eq(x, y);
|
|
69
|
+
}
|
|
70
|
+
case booleanTag:
|
|
71
|
+
case dateTag:
|
|
72
|
+
case symbolTag:
|
|
73
|
+
return Object.is(a.valueOf(), b.valueOf());
|
|
74
|
+
case regexpTag:
|
|
75
|
+
return a.source === b.source && a.flags === b.flags;
|
|
76
|
+
case functionTag:
|
|
77
|
+
return a === b;
|
|
78
|
+
}
|
|
79
|
+
stack = stack ?? /* @__PURE__ */ new Map();
|
|
80
|
+
let aStack = stack.get(a), bStack = stack.get(b);
|
|
81
|
+
if (aStack != null && bStack != null)
|
|
82
|
+
return aStack === b;
|
|
83
|
+
stack.set(a, b), stack.set(b, a);
|
|
84
|
+
try {
|
|
85
|
+
switch (aTag) {
|
|
86
|
+
case mapTag: {
|
|
87
|
+
if (a.size !== b.size)
|
|
88
|
+
return !1;
|
|
89
|
+
for (let [key, value] of a.entries())
|
|
90
|
+
if (!b.has(key) || !isEqualWithImpl(value, b.get(key), key, a, b, stack, areValuesEqual))
|
|
91
|
+
return !1;
|
|
92
|
+
return !0;
|
|
93
|
+
}
|
|
94
|
+
case setTag: {
|
|
95
|
+
if (a.size !== b.size)
|
|
96
|
+
return !1;
|
|
97
|
+
let aValues = Array.from(a.values()), bValues = Array.from(b.values());
|
|
98
|
+
for (let i = 0; i < aValues.length; i++) {
|
|
99
|
+
let aValue = aValues[i], index = bValues.findIndex((bValue) => isEqualWithImpl(aValue, bValue, void 0, a, b, stack, areValuesEqual));
|
|
100
|
+
if (index === -1)
|
|
101
|
+
return !1;
|
|
102
|
+
bValues.splice(index, 1);
|
|
103
|
+
}
|
|
104
|
+
return !0;
|
|
105
|
+
}
|
|
106
|
+
case arrayTag:
|
|
107
|
+
case uint8ArrayTag:
|
|
108
|
+
case uint8ClampedArrayTag:
|
|
109
|
+
case uint16ArrayTag:
|
|
110
|
+
case uint32ArrayTag:
|
|
111
|
+
case bigUint64ArrayTag:
|
|
112
|
+
case int8ArrayTag:
|
|
113
|
+
case int16ArrayTag:
|
|
114
|
+
case int32ArrayTag:
|
|
115
|
+
case bigInt64ArrayTag:
|
|
116
|
+
case float32ArrayTag:
|
|
117
|
+
case float64ArrayTag: {
|
|
118
|
+
if (typeof Buffer < "u" && Buffer.isBuffer(a) !== Buffer.isBuffer(b) || a.length !== b.length)
|
|
119
|
+
return !1;
|
|
120
|
+
for (let i = 0; i < a.length; i++)
|
|
121
|
+
if (!isEqualWithImpl(a[i], b[i], i, a, b, stack, areValuesEqual))
|
|
122
|
+
return !1;
|
|
123
|
+
return !0;
|
|
124
|
+
}
|
|
125
|
+
case arrayBufferTag:
|
|
126
|
+
return a.byteLength !== b.byteLength ? !1 : areObjectsEqual(new Uint8Array(a), new Uint8Array(b), stack, areValuesEqual);
|
|
127
|
+
case dataViewTag:
|
|
128
|
+
return a.byteLength !== b.byteLength || a.byteOffset !== b.byteOffset ? !1 : areObjectsEqual(new Uint8Array(a), new Uint8Array(b), stack, areValuesEqual);
|
|
129
|
+
case errorTag:
|
|
130
|
+
return a.name === b.name && a.message === b.message;
|
|
131
|
+
case objectTag: {
|
|
132
|
+
if (!(areObjectsEqual(a.constructor, b.constructor, stack, areValuesEqual) || isPlainObject(a) && isPlainObject(b)))
|
|
133
|
+
return !1;
|
|
134
|
+
let aKeys = [...Object.keys(a), ...getSymbols(a)], bKeys = [...Object.keys(b), ...getSymbols(b)];
|
|
135
|
+
if (aKeys.length !== bKeys.length)
|
|
136
|
+
return !1;
|
|
137
|
+
for (let i = 0; i < aKeys.length; i++) {
|
|
138
|
+
let propKey = aKeys[i], aProp = a[propKey];
|
|
139
|
+
if (!Object.hasOwn(b, propKey))
|
|
140
|
+
return !1;
|
|
141
|
+
let bProp = b[propKey];
|
|
142
|
+
if (!isEqualWithImpl(aProp, bProp, propKey, a, b, stack, areValuesEqual))
|
|
143
|
+
return !1;
|
|
144
|
+
}
|
|
145
|
+
return !0;
|
|
146
|
+
}
|
|
147
|
+
default:
|
|
148
|
+
return !1;
|
|
149
|
+
}
|
|
150
|
+
} finally {
|
|
151
|
+
stack.delete(a), stack.delete(b);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// ../../../node_modules/es-toolkit/dist/function/noop.mjs
|
|
156
|
+
function noop() {
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// ../../../node_modules/es-toolkit/dist/predicate/isEqual.mjs
|
|
160
|
+
function isEqual(a, b) {
|
|
161
|
+
return isEqualWith(a, b, noop);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export {
|
|
165
|
+
isEqual,
|
|
166
|
+
isFunction
|
|
167
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_8w9hg092nxf from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_8w9hg092nxf from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_8w9hg092nxf from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_8w9hg092nxf.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_8w9hg092nxf.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_8w9hg092nxf.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_8w9hg092nxf from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_8w9hg092nxf from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_8w9hg092nxf from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_8w9hg092nxf.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_8w9hg092nxf.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_8w9hg092nxf.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_8w9hg092nxf from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_8w9hg092nxf from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_8w9hg092nxf from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_8w9hg092nxf.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_8w9hg092nxf.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_8w9hg092nxf.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_8w9hg092nxf from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_8w9hg092nxf from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_8w9hg092nxf from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_8w9hg092nxf.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_8w9hg092nxf.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_8w9hg092nxf.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_8w9hg092nxf from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_8w9hg092nxf from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_8w9hg092nxf from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_8w9hg092nxf.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_8w9hg092nxf.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_8w9hg092nxf.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-5CDW3YI7.js";
|
|
15
15
|
|
|
16
16
|
// ../../../node_modules/ts-dedent/dist/index.js
|
|
17
17
|
var require_dist = __commonJS({
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_8w9hg092nxf from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_8w9hg092nxf from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_8w9hg092nxf from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_8w9hg092nxf.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_8w9hg092nxf.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_8w9hg092nxf.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-5CDW3YI7.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_8w9hg092nxf from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_8w9hg092nxf from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_8w9hg092nxf from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_8w9hg092nxf.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_8w9hg092nxf.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_8w9hg092nxf.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-5CDW3YI7.js";
|
|
15
15
|
|
|
16
16
|
// ../../../node_modules/picocolors/picocolors.js
|
|
17
17
|
var require_picocolors = __commonJS({
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_8w9hg092nxf from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_8w9hg092nxf from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_8w9hg092nxf from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_8w9hg092nxf.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_8w9hg092nxf.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_8w9hg092nxf.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-RSUQW4CL.js";
|
|
15
15
|
import {
|
|
16
16
|
ADDON_ID2 as ADDON_ID
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-DZFPYJ5B.js";
|
|
18
18
|
import {
|
|
19
19
|
__toESM
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-5CDW3YI7.js";
|
|
21
21
|
|
|
22
22
|
// src/logger.ts
|
|
23
23
|
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_8w9hg092nxf from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_8w9hg092nxf from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_8w9hg092nxf from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_8w9hg092nxf.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_8w9hg092nxf.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_8w9hg092nxf.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-5CDW3YI7.js";
|
|
13
13
|
|
|
14
14
|
// raw:../templates/vitest.config.3.2.template.ts
|
|
15
15
|
var vitest_config_3_2_template_default = `import path from 'node:path';
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_8w9hg092nxf from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_8w9hg092nxf from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_8w9hg092nxf from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_8w9hg092nxf.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_8w9hg092nxf.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_8w9hg092nxf.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-5CDW3YI7.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/_node-chunks/{vitest.config.template-GCKJ6JXG.js → vitest.config.template-53OQ4FSJ.js}
RENAMED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_8w9hg092nxf from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_8w9hg092nxf from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_8w9hg092nxf from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_8w9hg092nxf.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_8w9hg092nxf.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_8w9hg092nxf.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-5CDW3YI7.js";
|
|
13
13
|
|
|
14
14
|
// raw:../templates/vitest.config.template.ts
|
|
15
15
|
var vitest_config_template_default = `import path from 'node:path';
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_8w9hg092nxf from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_8w9hg092nxf from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_8w9hg092nxf from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_8w9hg092nxf.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_8w9hg092nxf.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_8w9hg092nxf.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-5CDW3YI7.js";
|
|
13
13
|
|
|
14
14
|
// raw:../templates/vitest.workspace.template.ts
|
|
15
15
|
var vitest_workspace_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_8w9hg092nxf from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_8w9hg092nxf from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_8w9hg092nxf from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_8w9hg092nxf.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_8w9hg092nxf.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_8w9hg092nxf.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -32,8 +32,8 @@ import {
|
|
|
32
32
|
TRIGGER_TEST_RUN_RESPONSE,
|
|
33
33
|
TUTORIAL_VIDEO_LINK,
|
|
34
34
|
storeOptions
|
|
35
|
-
} from "./_node-chunks/chunk-
|
|
36
|
-
import "./_node-chunks/chunk-
|
|
35
|
+
} from "./_node-chunks/chunk-DZFPYJ5B.js";
|
|
36
|
+
import "./_node-chunks/chunk-5CDW3YI7.js";
|
|
37
37
|
export {
|
|
38
38
|
ADDON_ID as A11Y_ADDON_ID,
|
|
39
39
|
PANEL_ID2 as A11Y_PANEL_ID,
|
package/dist/manager.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isEqual
|
|
3
|
+
} from "./_browser-chunks/chunk-O7QECQMH.js";
|
|
1
4
|
import {
|
|
2
5
|
ADDON_ID,
|
|
3
6
|
ADDON_ID2,
|
|
@@ -86,166 +89,6 @@ import React4 from "react";
|
|
|
86
89
|
|
|
87
90
|
// src/use-test-provider-state.ts
|
|
88
91
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
89
|
-
|
|
90
|
-
// ../../../node_modules/es-toolkit/dist/predicate/isPlainObject.mjs
|
|
91
|
-
function isPlainObject(value) {
|
|
92
|
-
if (!value || typeof value != "object")
|
|
93
|
-
return !1;
|
|
94
|
-
let proto = Object.getPrototypeOf(value);
|
|
95
|
-
return proto === null || proto === Object.prototype || Object.getPrototypeOf(proto) === null ? Object.prototype.toString.call(value) === "[object Object]" : !1;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
// ../../../node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs
|
|
99
|
-
function getSymbols(object) {
|
|
100
|
-
return Object.getOwnPropertySymbols(object).filter((symbol) => Object.prototype.propertyIsEnumerable.call(object, symbol));
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
// ../../../node_modules/es-toolkit/dist/compat/_internal/getTag.mjs
|
|
104
|
-
function getTag(value) {
|
|
105
|
-
return value == null ? value === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(value);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
// ../../../node_modules/es-toolkit/dist/compat/_internal/tags.mjs
|
|
109
|
-
var regexpTag = "[object RegExp]", stringTag = "[object String]", numberTag = "[object Number]", booleanTag = "[object Boolean]", argumentsTag = "[object Arguments]", symbolTag = "[object Symbol]", dateTag = "[object Date]", mapTag = "[object Map]", setTag = "[object Set]", arrayTag = "[object Array]", functionTag = "[object Function]", arrayBufferTag = "[object ArrayBuffer]", objectTag = "[object Object]", errorTag = "[object Error]", dataViewTag = "[object DataView]", uint8ArrayTag = "[object Uint8Array]", uint8ClampedArrayTag = "[object Uint8ClampedArray]", uint16ArrayTag = "[object Uint16Array]", uint32ArrayTag = "[object Uint32Array]", bigUint64ArrayTag = "[object BigUint64Array]", int8ArrayTag = "[object Int8Array]", int16ArrayTag = "[object Int16Array]", int32ArrayTag = "[object Int32Array]", bigInt64ArrayTag = "[object BigInt64Array]", float32ArrayTag = "[object Float32Array]", float64ArrayTag = "[object Float64Array]";
|
|
110
|
-
|
|
111
|
-
// ../../../node_modules/es-toolkit/dist/compat/util/eq.mjs
|
|
112
|
-
function eq(value, other) {
|
|
113
|
-
return value === other || Number.isNaN(value) && Number.isNaN(other);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
// ../../../node_modules/es-toolkit/dist/predicate/isEqualWith.mjs
|
|
117
|
-
function isEqualWith(a, b, areValuesEqual) {
|
|
118
|
-
return isEqualWithImpl(a, b, void 0, void 0, void 0, void 0, areValuesEqual);
|
|
119
|
-
}
|
|
120
|
-
function isEqualWithImpl(a, b, property, aParent, bParent, stack, areValuesEqual) {
|
|
121
|
-
let result = areValuesEqual(a, b, property, aParent, bParent, stack);
|
|
122
|
-
if (result !== void 0)
|
|
123
|
-
return result;
|
|
124
|
-
if (typeof a == typeof b)
|
|
125
|
-
switch (typeof a) {
|
|
126
|
-
case "bigint":
|
|
127
|
-
case "string":
|
|
128
|
-
case "boolean":
|
|
129
|
-
case "symbol":
|
|
130
|
-
case "undefined":
|
|
131
|
-
return a === b;
|
|
132
|
-
case "number":
|
|
133
|
-
return a === b || Object.is(a, b);
|
|
134
|
-
case "function":
|
|
135
|
-
return a === b;
|
|
136
|
-
case "object":
|
|
137
|
-
return areObjectsEqual(a, b, stack, areValuesEqual);
|
|
138
|
-
}
|
|
139
|
-
return areObjectsEqual(a, b, stack, areValuesEqual);
|
|
140
|
-
}
|
|
141
|
-
function areObjectsEqual(a, b, stack, areValuesEqual) {
|
|
142
|
-
if (Object.is(a, b))
|
|
143
|
-
return !0;
|
|
144
|
-
let aTag = getTag(a), bTag = getTag(b);
|
|
145
|
-
if (aTag === argumentsTag && (aTag = objectTag), bTag === argumentsTag && (bTag = objectTag), aTag !== bTag)
|
|
146
|
-
return !1;
|
|
147
|
-
switch (aTag) {
|
|
148
|
-
case stringTag:
|
|
149
|
-
return a.toString() === b.toString();
|
|
150
|
-
case numberTag: {
|
|
151
|
-
let x = a.valueOf(), y = b.valueOf();
|
|
152
|
-
return eq(x, y);
|
|
153
|
-
}
|
|
154
|
-
case booleanTag:
|
|
155
|
-
case dateTag:
|
|
156
|
-
case symbolTag:
|
|
157
|
-
return Object.is(a.valueOf(), b.valueOf());
|
|
158
|
-
case regexpTag:
|
|
159
|
-
return a.source === b.source && a.flags === b.flags;
|
|
160
|
-
case functionTag:
|
|
161
|
-
return a === b;
|
|
162
|
-
}
|
|
163
|
-
stack = stack ?? /* @__PURE__ */ new Map();
|
|
164
|
-
let aStack = stack.get(a), bStack = stack.get(b);
|
|
165
|
-
if (aStack != null && bStack != null)
|
|
166
|
-
return aStack === b;
|
|
167
|
-
stack.set(a, b), stack.set(b, a);
|
|
168
|
-
try {
|
|
169
|
-
switch (aTag) {
|
|
170
|
-
case mapTag: {
|
|
171
|
-
if (a.size !== b.size)
|
|
172
|
-
return !1;
|
|
173
|
-
for (let [key, value] of a.entries())
|
|
174
|
-
if (!b.has(key) || !isEqualWithImpl(value, b.get(key), key, a, b, stack, areValuesEqual))
|
|
175
|
-
return !1;
|
|
176
|
-
return !0;
|
|
177
|
-
}
|
|
178
|
-
case setTag: {
|
|
179
|
-
if (a.size !== b.size)
|
|
180
|
-
return !1;
|
|
181
|
-
let aValues = Array.from(a.values()), bValues = Array.from(b.values());
|
|
182
|
-
for (let i = 0; i < aValues.length; i++) {
|
|
183
|
-
let aValue = aValues[i], index = bValues.findIndex((bValue) => isEqualWithImpl(aValue, bValue, void 0, a, b, stack, areValuesEqual));
|
|
184
|
-
if (index === -1)
|
|
185
|
-
return !1;
|
|
186
|
-
bValues.splice(index, 1);
|
|
187
|
-
}
|
|
188
|
-
return !0;
|
|
189
|
-
}
|
|
190
|
-
case arrayTag:
|
|
191
|
-
case uint8ArrayTag:
|
|
192
|
-
case uint8ClampedArrayTag:
|
|
193
|
-
case uint16ArrayTag:
|
|
194
|
-
case uint32ArrayTag:
|
|
195
|
-
case bigUint64ArrayTag:
|
|
196
|
-
case int8ArrayTag:
|
|
197
|
-
case int16ArrayTag:
|
|
198
|
-
case int32ArrayTag:
|
|
199
|
-
case bigInt64ArrayTag:
|
|
200
|
-
case float32ArrayTag:
|
|
201
|
-
case float64ArrayTag: {
|
|
202
|
-
if (typeof Buffer < "u" && Buffer.isBuffer(a) !== Buffer.isBuffer(b) || a.length !== b.length)
|
|
203
|
-
return !1;
|
|
204
|
-
for (let i = 0; i < a.length; i++)
|
|
205
|
-
if (!isEqualWithImpl(a[i], b[i], i, a, b, stack, areValuesEqual))
|
|
206
|
-
return !1;
|
|
207
|
-
return !0;
|
|
208
|
-
}
|
|
209
|
-
case arrayBufferTag:
|
|
210
|
-
return a.byteLength !== b.byteLength ? !1 : areObjectsEqual(new Uint8Array(a), new Uint8Array(b), stack, areValuesEqual);
|
|
211
|
-
case dataViewTag:
|
|
212
|
-
return a.byteLength !== b.byteLength || a.byteOffset !== b.byteOffset ? !1 : areObjectsEqual(new Uint8Array(a), new Uint8Array(b), stack, areValuesEqual);
|
|
213
|
-
case errorTag:
|
|
214
|
-
return a.name === b.name && a.message === b.message;
|
|
215
|
-
case objectTag: {
|
|
216
|
-
if (!(areObjectsEqual(a.constructor, b.constructor, stack, areValuesEqual) || isPlainObject(a) && isPlainObject(b)))
|
|
217
|
-
return !1;
|
|
218
|
-
let aKeys = [...Object.keys(a), ...getSymbols(a)], bKeys = [...Object.keys(b), ...getSymbols(b)];
|
|
219
|
-
if (aKeys.length !== bKeys.length)
|
|
220
|
-
return !1;
|
|
221
|
-
for (let i = 0; i < aKeys.length; i++) {
|
|
222
|
-
let propKey = aKeys[i], aProp = a[propKey];
|
|
223
|
-
if (!Object.hasOwn(b, propKey))
|
|
224
|
-
return !1;
|
|
225
|
-
let bProp = b[propKey];
|
|
226
|
-
if (!isEqualWithImpl(aProp, bProp, propKey, a, b, stack, areValuesEqual))
|
|
227
|
-
return !1;
|
|
228
|
-
}
|
|
229
|
-
return !0;
|
|
230
|
-
}
|
|
231
|
-
default:
|
|
232
|
-
return !1;
|
|
233
|
-
}
|
|
234
|
-
} finally {
|
|
235
|
-
stack.delete(a), stack.delete(b);
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
// ../../../node_modules/es-toolkit/dist/function/noop.mjs
|
|
240
|
-
function noop() {
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
// ../../../node_modules/es-toolkit/dist/predicate/isEqual.mjs
|
|
244
|
-
function isEqual(a, b) {
|
|
245
|
-
return isEqualWith(a, b, noop);
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
// src/use-test-provider-state.ts
|
|
249
92
|
import {
|
|
250
93
|
experimental_useStatusStore,
|
|
251
94
|
experimental_useTestProviderStore,
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_8w9hg092nxf from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_8w9hg092nxf from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_8w9hg092nxf from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_8w9hg092nxf.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_8w9hg092nxf.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_8w9hg092nxf.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-PJNLOP74.js";
|
|
15
15
|
import {
|
|
16
16
|
__commonJS,
|
|
17
17
|
__require,
|
|
18
18
|
__toESM
|
|
19
|
-
} from "../_node-chunks/chunk-
|
|
19
|
+
} from "../_node-chunks/chunk-5CDW3YI7.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_8w9hg092nxf from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_8w9hg092nxf from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_8w9hg092nxf from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_8w9hg092nxf.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_8w9hg092nxf.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_8w9hg092nxf.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -12,19 +12,19 @@ var require = CJS_COMPAT_NODE_MODULE_5uy8vjo787f.createRequire(import.meta.url);
|
|
|
12
12
|
import {
|
|
13
13
|
errorToErrorLike,
|
|
14
14
|
log
|
|
15
|
-
} from "../_node-chunks/chunk-
|
|
15
|
+
} from "../_node-chunks/chunk-X6D2YQG4.js";
|
|
16
16
|
import {
|
|
17
17
|
any,
|
|
18
18
|
up
|
|
19
|
-
} from "../_node-chunks/chunk-
|
|
20
|
-
import "../_node-chunks/chunk-
|
|
19
|
+
} from "../_node-chunks/chunk-AVVPQDU6.js";
|
|
20
|
+
import "../_node-chunks/chunk-RSUQW4CL.js";
|
|
21
21
|
import {
|
|
22
22
|
dirname,
|
|
23
23
|
join,
|
|
24
24
|
normalize,
|
|
25
25
|
path,
|
|
26
26
|
resolve
|
|
27
|
-
} from "../_node-chunks/chunk-
|
|
27
|
+
} from "../_node-chunks/chunk-6ZJRTJIY.js";
|
|
28
28
|
import {
|
|
29
29
|
ADDON_ID2 as ADDON_ID,
|
|
30
30
|
COVERAGE_DIRECTORY,
|
|
@@ -32,8 +32,8 @@ import {
|
|
|
32
32
|
STATUS_TYPE_ID_COMPONENT_TEST,
|
|
33
33
|
STORYBOOK_TEST_PROVIDE_KEY,
|
|
34
34
|
storeOptions
|
|
35
|
-
} from "../_node-chunks/chunk-
|
|
36
|
-
import "../_node-chunks/chunk-
|
|
35
|
+
} from "../_node-chunks/chunk-DZFPYJ5B.js";
|
|
36
|
+
import "../_node-chunks/chunk-5CDW3YI7.js";
|
|
37
37
|
|
|
38
38
|
// src/node/vitest.ts
|
|
39
39
|
import process2 from "node:process";
|
package/dist/postinstall.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_8w9hg092nxf from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_8w9hg092nxf from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_8w9hg092nxf from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_8w9hg092nxf.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_8w9hg092nxf.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_8w9hg092nxf.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-AVVPQDU6.js";
|
|
15
15
|
import {
|
|
16
16
|
require_dist
|
|
17
|
-
} from "./_node-chunks/chunk-
|
|
17
|
+
} from "./_node-chunks/chunk-G43QU6SH.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-6ZJRTJIY.js";
|
|
24
24
|
import {
|
|
25
25
|
DOCUMENTATION_LINK
|
|
26
|
-
} from "./_node-chunks/chunk-
|
|
26
|
+
} from "./_node-chunks/chunk-DZFPYJ5B.js";
|
|
27
27
|
import {
|
|
28
28
|
require_compare,
|
|
29
29
|
require_constants,
|
|
@@ -33,11 +33,11 @@ import {
|
|
|
33
33
|
require_parse_options,
|
|
34
34
|
require_re,
|
|
35
35
|
require_semver
|
|
36
|
-
} from "./_node-chunks/chunk-
|
|
36
|
+
} from "./_node-chunks/chunk-PJNLOP74.js";
|
|
37
37
|
import {
|
|
38
38
|
__commonJS,
|
|
39
39
|
__toESM
|
|
40
|
-
} from "./_node-chunks/chunk-
|
|
40
|
+
} from "./_node-chunks/chunk-5CDW3YI7.js";
|
|
41
41
|
|
|
42
42
|
// ../../../node_modules/semver/functions/parse.js
|
|
43
43
|
var require_parse = __commonJS({
|
|
@@ -902,13 +902,13 @@ import {
|
|
|
902
902
|
async function getTemplatePath(name) {
|
|
903
903
|
switch (name) {
|
|
904
904
|
case "vitest.config.template":
|
|
905
|
-
return import("./_node-chunks/vitest.config.template-
|
|
905
|
+
return import("./_node-chunks/vitest.config.template-53OQ4FSJ.js");
|
|
906
906
|
case "vitest.config.4.template":
|
|
907
|
-
return import("./_node-chunks/vitest.config.4.template-
|
|
907
|
+
return import("./_node-chunks/vitest.config.4.template-V4I6MLZH.js");
|
|
908
908
|
case "vitest.config.3.2.template":
|
|
909
|
-
return import("./_node-chunks/vitest.config.3.2.template-
|
|
909
|
+
return import("./_node-chunks/vitest.config.3.2.template-RGYSIL6N.js");
|
|
910
910
|
case "vitest.workspace.template":
|
|
911
|
-
return import("./_node-chunks/vitest.workspace.template-
|
|
911
|
+
return import("./_node-chunks/vitest.workspace.template-CTWQ5DKT.js");
|
|
912
912
|
default:
|
|
913
913
|
throw new Error(`Unknown template: ${name}`);
|
|
914
914
|
}
|
package/dist/preset.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_8w9hg092nxf from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_8w9hg092nxf from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_8w9hg092nxf from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_8w9hg092nxf.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_8w9hg092nxf.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_8w9hg092nxf.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -13,16 +13,16 @@ import {
|
|
|
13
13
|
errorToErrorLike,
|
|
14
14
|
log,
|
|
15
15
|
noop
|
|
16
|
-
} from "./_node-chunks/chunk-
|
|
16
|
+
} from "./_node-chunks/chunk-X6D2YQG4.js";
|
|
17
17
|
import {
|
|
18
18
|
require_picocolors
|
|
19
|
-
} from "./_node-chunks/chunk-
|
|
19
|
+
} from "./_node-chunks/chunk-RSUQW4CL.js";
|
|
20
20
|
import {
|
|
21
21
|
require_dist
|
|
22
|
-
} from "./_node-chunks/chunk-
|
|
22
|
+
} from "./_node-chunks/chunk-G43QU6SH.js";
|
|
23
23
|
import {
|
|
24
24
|
normalize
|
|
25
|
-
} from "./_node-chunks/chunk-
|
|
25
|
+
} from "./_node-chunks/chunk-6ZJRTJIY.js";
|
|
26
26
|
import {
|
|
27
27
|
ADDON_ID2 as ADDON_ID,
|
|
28
28
|
COVERAGE_DIRECTORY,
|
|
@@ -33,10 +33,10 @@ import {
|
|
|
33
33
|
TRIGGER_TEST_RUN_REQUEST,
|
|
34
34
|
TRIGGER_TEST_RUN_RESPONSE,
|
|
35
35
|
storeOptions
|
|
36
|
-
} from "./_node-chunks/chunk-
|
|
36
|
+
} from "./_node-chunks/chunk-DZFPYJ5B.js";
|
|
37
37
|
import {
|
|
38
38
|
__toESM
|
|
39
|
-
} from "./_node-chunks/chunk-
|
|
39
|
+
} from "./_node-chunks/chunk-5CDW3YI7.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_8w9hg092nxf from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_8w9hg092nxf from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_8w9hg092nxf from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_8w9hg092nxf.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_8w9hg092nxf.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_8w9hg092nxf.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-5CDW3YI7.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_8w9hg092nxf from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_8w9hg092nxf from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_8w9hg092nxf from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_8w9hg092nxf.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_8w9hg092nxf.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_8w9hg092nxf.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-RSUQW4CL.js";
|
|
15
15
|
import {
|
|
16
16
|
require_dist
|
|
17
|
-
} from "../_node-chunks/chunk-
|
|
17
|
+
} from "../_node-chunks/chunk-G43QU6SH.js";
|
|
18
18
|
import {
|
|
19
19
|
dirname,
|
|
20
20
|
join,
|
|
@@ -23,16 +23,16 @@ import {
|
|
|
23
23
|
relative,
|
|
24
24
|
resolve,
|
|
25
25
|
sep
|
|
26
|
-
} from "../_node-chunks/chunk-
|
|
26
|
+
} from "../_node-chunks/chunk-6ZJRTJIY.js";
|
|
27
27
|
import {
|
|
28
28
|
STORYBOOK_CORE_GHOST_STORIES_PROVIDE_KEY,
|
|
29
29
|
STORYBOOK_CORE_RENDER_ANALYSIS_PROVIDE_KEY
|
|
30
|
-
} from "../_node-chunks/chunk-
|
|
30
|
+
} from "../_node-chunks/chunk-DZFPYJ5B.js";
|
|
31
31
|
import {
|
|
32
32
|
__commonJS,
|
|
33
33
|
__require,
|
|
34
34
|
__toESM
|
|
35
|
-
} from "../_node-chunks/chunk-
|
|
35
|
+
} from "../_node-chunks/chunk-5CDW3YI7.js";
|
|
36
36
|
|
|
37
37
|
// ../../../node_modules/braces/lib/utils.js
|
|
38
38
|
var require_utils = __commonJS({
|
|
@@ -2664,7 +2664,16 @@ var WORKING_DIR = process.cwd(), defaultOptions = {
|
|
|
2664
2664
|
// if there is a test.browser config AND test.browser.screenshotFailures is not explicitly set, we set it to false
|
|
2665
2665
|
...nonMutableInputConfig.test?.browser && nonMutableInputConfig.test.browser.screenshotFailures === void 0 ? {
|
|
2666
2666
|
screenshotFailures: !1
|
|
2667
|
-
} : {}
|
|
2667
|
+
} : {},
|
|
2668
|
+
// Inject the cursor reset command we use to prevent accidental hover states when running
|
|
2669
|
+
// Storybook tests in Chromium on Linux. There is a known race condition / special code path
|
|
2670
|
+
// in Chromium causing it to sometimes apply :hover to the element under the mouse cursor even
|
|
2671
|
+
// when there was no mouse movement.
|
|
2672
|
+
commands: {
|
|
2673
|
+
async resetMousePosition(ctx) {
|
|
2674
|
+
ctx.provider.name === "playwright" && await (await ctx.frame()).page().mouse.move(-1e3, -1e3);
|
|
2675
|
+
}
|
|
2676
|
+
}
|
|
2668
2677
|
}
|
|
2669
2678
|
},
|
|
2670
2679
|
optimizeDeps: {
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isFunction
|
|
3
|
+
} from "../_browser-chunks/chunk-O7QECQMH.js";
|
|
1
4
|
import {
|
|
2
5
|
PANEL_ID
|
|
3
6
|
} from "../_browser-chunks/chunk-OHAJYSSA.js";
|
|
4
7
|
|
|
5
8
|
// src/vitest-plugin/setup-file.ts
|
|
6
|
-
import { afterEach, beforeAll, vi } from "vitest";
|
|
9
|
+
import { beforeEach, afterEach, beforeAll, vi } from "vitest";
|
|
7
10
|
import { Channel } from "storybook/internal/channels";
|
|
8
11
|
var transport = { setHandler: vi.fn(), send: vi.fn() };
|
|
9
12
|
globalThis.__STORYBOOK_ADDONS_CHANNEL__ ??= new Channel({ transport });
|
|
@@ -16,12 +19,35 @@ var modifyErrorMessage = ({ task }) => {
|
|
|
16
19
|
|
|
17
20
|
${currentError.message}`;
|
|
18
21
|
}
|
|
22
|
+
}, resetMousePositionBeforeTests = async () => {
|
|
23
|
+
try {
|
|
24
|
+
let browserCommands = await import("vitest/browser").then((module) => module.commands);
|
|
25
|
+
"resetMousePosition" in browserCommands && isFunction(browserCommands.resetMousePosition) && await browserCommands.resetMousePosition();
|
|
26
|
+
} catch (error) {
|
|
27
|
+
if (error instanceof Error && error.message.includes("Cannot find module 'vitest/browser'"))
|
|
28
|
+
try {
|
|
29
|
+
let browserCommands = await import("@vitest/browser/context").then(
|
|
30
|
+
(module) => module.commands
|
|
31
|
+
);
|
|
32
|
+
"resetMousePosition" in browserCommands && isFunction(browserCommands.resetMousePosition) && await browserCommands.resetMousePosition();
|
|
33
|
+
return;
|
|
34
|
+
} catch (vitest3Error) {
|
|
35
|
+
if (vitest3Error instanceof Error && vitest3Error.message.includes("Cannot find module '@vitest/browser/context'") || vitest3Error instanceof Error && vitest3Error.message.includes("can be imported only inside the Browser Mode"))
|
|
36
|
+
return;
|
|
37
|
+
throw vitest3Error;
|
|
38
|
+
}
|
|
39
|
+
if (error instanceof Error && error.message.includes("can be imported only inside the Browser Mode"))
|
|
40
|
+
return;
|
|
41
|
+
throw error;
|
|
42
|
+
}
|
|
19
43
|
};
|
|
20
44
|
beforeAll(() => {
|
|
21
45
|
if (globalThis.globalProjectAnnotations)
|
|
22
46
|
return globalThis.globalProjectAnnotations.beforeAll();
|
|
23
47
|
});
|
|
48
|
+
beforeEach(resetMousePositionBeforeTests);
|
|
24
49
|
afterEach(modifyErrorMessage);
|
|
25
50
|
export {
|
|
26
|
-
modifyErrorMessage
|
|
51
|
+
modifyErrorMessage,
|
|
52
|
+
resetMousePositionBeforeTests
|
|
27
53
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/addon-vitest",
|
|
3
|
-
"version": "10.5.0-alpha.
|
|
3
|
+
"version": "10.5.0-alpha.3",
|
|
4
4
|
"description": "Storybook Vitest addon: Blazing fast component testing using stories",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -80,8 +80,8 @@
|
|
|
80
80
|
"@storybook/icons": "^2.0.2"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
|
-
"@storybook/addon-a11y": "10.5.0-alpha.
|
|
84
|
-
"@storybook/builder-vite": "10.5.0-alpha.
|
|
83
|
+
"@storybook/addon-a11y": "10.5.0-alpha.3",
|
|
84
|
+
"@storybook/builder-vite": "10.5.0-alpha.3",
|
|
85
85
|
"@types/istanbul-lib-report": "^3.0.3",
|
|
86
86
|
"@types/micromatch": "^4.0.0",
|
|
87
87
|
"@types/node": "^22.19.1",
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
"@vitest/browser": "^3.0.0 || ^4.0.0",
|
|
110
110
|
"@vitest/browser-playwright": "^4.0.0",
|
|
111
111
|
"@vitest/runner": "^3.0.0 || ^4.0.0",
|
|
112
|
-
"storybook": "^10.5.0-alpha.
|
|
112
|
+
"storybook": "^10.5.0-alpha.3",
|
|
113
113
|
"vitest": "^3.0.0 || ^4.0.0"
|
|
114
114
|
},
|
|
115
115
|
"peerDependenciesMeta": {
|