@storybook/addon-vitest 10.2.0-alpha.1 → 10.2.0-alpha.11
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-TJXI7EIW.js → chunk-26KZTIUQ.js} +2 -1
- package/dist/_node-chunks/{chunk-GYW6H727.js → chunk-BTRRB3AO.js} +9 -9
- package/dist/_node-chunks/{chunk-VNE6XYUJ.js → chunk-D2ZUAJQP.js} +8 -7
- package/dist/_node-chunks/{chunk-W4J4CLIT.js → chunk-IB5IAFQF.js} +7 -7
- package/dist/_node-chunks/{chunk-H55ZHNTN.js → chunk-KGWSAXJM.js} +6 -6
- package/dist/_node-chunks/{chunk-5XBMJ6BR.js → chunk-KTLRCBAA.js} +9 -9
- package/dist/_node-chunks/{chunk-RP5ZG6OB.js → chunk-MYPG5LVV.js} +8 -8
- package/dist/_node-chunks/{chunk-5AFMPCE3.js → chunk-TQSNPH3N.js} +10 -10
- package/dist/_node-chunks/{chunk-A2X7447W.js → chunk-Y3YX44MN.js} +11 -11
- package/dist/_node-chunks/{chunk-PTQW7LVH.js → chunk-Y6VGPPSD.js} +23 -23
- package/dist/manager.js +15 -15
- package/dist/node/coverage-reporter.js +44 -44
- package/dist/node/vitest.js +26 -20
- package/dist/postinstall.js +114 -116
- package/dist/preset.js +22 -22
- package/dist/vitest-plugin/global-setup.js +17 -12
- package/dist/vitest-plugin/index.js +54 -54
- package/dist/vitest-plugin/setup-file.js +1 -1
- package/package.json +11 -15
package/dist/postinstall.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_okg5h9pn0ag from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_okg5h9pn0ag from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_okg5h9pn0ag from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_okg5h9pn0ag.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_okg5h9pn0ag.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_okg5h9pn0ag.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-MYPG5LVV.js";
|
|
15
15
|
import {
|
|
16
16
|
any
|
|
17
|
-
} from "./_node-chunks/chunk-
|
|
17
|
+
} from "./_node-chunks/chunk-Y3YX44MN.js";
|
|
18
18
|
import {
|
|
19
19
|
DOCUMENTATION_LINK
|
|
20
|
-
} from "./_node-chunks/chunk-
|
|
20
|
+
} from "./_node-chunks/chunk-D2ZUAJQP.js";
|
|
21
21
|
import {
|
|
22
22
|
require_dist
|
|
23
|
-
} from "./_node-chunks/chunk-
|
|
23
|
+
} from "./_node-chunks/chunk-BTRRB3AO.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-IB5IAFQF.js";
|
|
30
30
|
import {
|
|
31
31
|
require_compare,
|
|
32
32
|
require_constants,
|
|
@@ -36,15 +36,15 @@ import {
|
|
|
36
36
|
require_parse_options,
|
|
37
37
|
require_re,
|
|
38
38
|
require_semver
|
|
39
|
-
} from "./_node-chunks/chunk-
|
|
39
|
+
} from "./_node-chunks/chunk-Y6VGPPSD.js";
|
|
40
40
|
import {
|
|
41
41
|
__commonJS,
|
|
42
42
|
__toESM
|
|
43
|
-
} from "./_node-chunks/chunk-
|
|
43
|
+
} from "./_node-chunks/chunk-KGWSAXJM.js";
|
|
44
44
|
|
|
45
|
-
//
|
|
45
|
+
// ../../../node_modules/semver/functions/parse.js
|
|
46
46
|
var require_parse = __commonJS({
|
|
47
|
-
"
|
|
47
|
+
"../../../node_modules/semver/functions/parse.js"(exports, module) {
|
|
48
48
|
"use strict";
|
|
49
49
|
var SemVer = require_semver(), parse = (version, options, throwErrors = !1) => {
|
|
50
50
|
if (version instanceof SemVer)
|
|
@@ -61,9 +61,9 @@ var require_parse = __commonJS({
|
|
|
61
61
|
}
|
|
62
62
|
});
|
|
63
63
|
|
|
64
|
-
//
|
|
64
|
+
// ../../../node_modules/semver/functions/valid.js
|
|
65
65
|
var require_valid = __commonJS({
|
|
66
|
-
"
|
|
66
|
+
"../../../node_modules/semver/functions/valid.js"(exports, module) {
|
|
67
67
|
"use strict";
|
|
68
68
|
var parse = require_parse(), valid = (version, options) => {
|
|
69
69
|
let v = parse(version, options);
|
|
@@ -73,9 +73,9 @@ var require_valid = __commonJS({
|
|
|
73
73
|
}
|
|
74
74
|
});
|
|
75
75
|
|
|
76
|
-
//
|
|
76
|
+
// ../../../node_modules/semver/functions/clean.js
|
|
77
77
|
var require_clean = __commonJS({
|
|
78
|
-
"
|
|
78
|
+
"../../../node_modules/semver/functions/clean.js"(exports, module) {
|
|
79
79
|
"use strict";
|
|
80
80
|
var parse = require_parse(), clean = (version, options) => {
|
|
81
81
|
let s = parse(version.trim().replace(/^[=v]+/, ""), options);
|
|
@@ -85,9 +85,9 @@ var require_clean = __commonJS({
|
|
|
85
85
|
}
|
|
86
86
|
});
|
|
87
87
|
|
|
88
|
-
//
|
|
88
|
+
// ../../../node_modules/semver/functions/inc.js
|
|
89
89
|
var require_inc = __commonJS({
|
|
90
|
-
"
|
|
90
|
+
"../../../node_modules/semver/functions/inc.js"(exports, module) {
|
|
91
91
|
"use strict";
|
|
92
92
|
var SemVer = require_semver(), inc = (version, release, options, identifier, identifierBase) => {
|
|
93
93
|
typeof options == "string" && (identifierBase = identifier, identifier = options, options = void 0);
|
|
@@ -104,9 +104,9 @@ var require_inc = __commonJS({
|
|
|
104
104
|
}
|
|
105
105
|
});
|
|
106
106
|
|
|
107
|
-
//
|
|
107
|
+
// ../../../node_modules/semver/functions/diff.js
|
|
108
108
|
var require_diff = __commonJS({
|
|
109
|
-
"
|
|
109
|
+
"../../../node_modules/semver/functions/diff.js"(exports, module) {
|
|
110
110
|
"use strict";
|
|
111
111
|
var parse = require_parse(), diff = (version1, version2) => {
|
|
112
112
|
let v1 = parse(version1, null, !0), v2 = parse(version2, null, !0), comparison = v1.compare(v2);
|
|
@@ -126,36 +126,36 @@ var require_diff = __commonJS({
|
|
|
126
126
|
}
|
|
127
127
|
});
|
|
128
128
|
|
|
129
|
-
//
|
|
129
|
+
// ../../../node_modules/semver/functions/major.js
|
|
130
130
|
var require_major = __commonJS({
|
|
131
|
-
"
|
|
131
|
+
"../../../node_modules/semver/functions/major.js"(exports, module) {
|
|
132
132
|
"use strict";
|
|
133
133
|
var SemVer = require_semver(), major = (a, loose) => new SemVer(a, loose).major;
|
|
134
134
|
module.exports = major;
|
|
135
135
|
}
|
|
136
136
|
});
|
|
137
137
|
|
|
138
|
-
//
|
|
138
|
+
// ../../../node_modules/semver/functions/minor.js
|
|
139
139
|
var require_minor = __commonJS({
|
|
140
|
-
"
|
|
140
|
+
"../../../node_modules/semver/functions/minor.js"(exports, module) {
|
|
141
141
|
"use strict";
|
|
142
142
|
var SemVer = require_semver(), minor = (a, loose) => new SemVer(a, loose).minor;
|
|
143
143
|
module.exports = minor;
|
|
144
144
|
}
|
|
145
145
|
});
|
|
146
146
|
|
|
147
|
-
//
|
|
147
|
+
// ../../../node_modules/semver/functions/patch.js
|
|
148
148
|
var require_patch = __commonJS({
|
|
149
|
-
"
|
|
149
|
+
"../../../node_modules/semver/functions/patch.js"(exports, module) {
|
|
150
150
|
"use strict";
|
|
151
151
|
var SemVer = require_semver(), patch = (a, loose) => new SemVer(a, loose).patch;
|
|
152
152
|
module.exports = patch;
|
|
153
153
|
}
|
|
154
154
|
});
|
|
155
155
|
|
|
156
|
-
//
|
|
156
|
+
// ../../../node_modules/semver/functions/prerelease.js
|
|
157
157
|
var require_prerelease = __commonJS({
|
|
158
|
-
"
|
|
158
|
+
"../../../node_modules/semver/functions/prerelease.js"(exports, module) {
|
|
159
159
|
"use strict";
|
|
160
160
|
var parse = require_parse(), prerelease = (version, options) => {
|
|
161
161
|
let parsed = parse(version, options);
|
|
@@ -165,27 +165,27 @@ var require_prerelease = __commonJS({
|
|
|
165
165
|
}
|
|
166
166
|
});
|
|
167
167
|
|
|
168
|
-
//
|
|
168
|
+
// ../../../node_modules/semver/functions/rcompare.js
|
|
169
169
|
var require_rcompare = __commonJS({
|
|
170
|
-
"
|
|
170
|
+
"../../../node_modules/semver/functions/rcompare.js"(exports, module) {
|
|
171
171
|
"use strict";
|
|
172
172
|
var compare = require_compare(), rcompare = (a, b, loose) => compare(b, a, loose);
|
|
173
173
|
module.exports = rcompare;
|
|
174
174
|
}
|
|
175
175
|
});
|
|
176
176
|
|
|
177
|
-
//
|
|
177
|
+
// ../../../node_modules/semver/functions/compare-loose.js
|
|
178
178
|
var require_compare_loose = __commonJS({
|
|
179
|
-
"
|
|
179
|
+
"../../../node_modules/semver/functions/compare-loose.js"(exports, module) {
|
|
180
180
|
"use strict";
|
|
181
181
|
var compare = require_compare(), compareLoose = (a, b) => compare(a, b, !0);
|
|
182
182
|
module.exports = compareLoose;
|
|
183
183
|
}
|
|
184
184
|
});
|
|
185
185
|
|
|
186
|
-
//
|
|
186
|
+
// ../../../node_modules/semver/functions/compare-build.js
|
|
187
187
|
var require_compare_build = __commonJS({
|
|
188
|
-
"
|
|
188
|
+
"../../../node_modules/semver/functions/compare-build.js"(exports, module) {
|
|
189
189
|
"use strict";
|
|
190
190
|
var SemVer = require_semver(), compareBuild = (a, b, loose) => {
|
|
191
191
|
let versionA = new SemVer(a, loose), versionB = new SemVer(b, loose);
|
|
@@ -195,72 +195,72 @@ var require_compare_build = __commonJS({
|
|
|
195
195
|
}
|
|
196
196
|
});
|
|
197
197
|
|
|
198
|
-
//
|
|
198
|
+
// ../../../node_modules/semver/functions/sort.js
|
|
199
199
|
var require_sort = __commonJS({
|
|
200
|
-
"
|
|
200
|
+
"../../../node_modules/semver/functions/sort.js"(exports, module) {
|
|
201
201
|
"use strict";
|
|
202
202
|
var compareBuild = require_compare_build(), sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose));
|
|
203
203
|
module.exports = sort;
|
|
204
204
|
}
|
|
205
205
|
});
|
|
206
206
|
|
|
207
|
-
//
|
|
207
|
+
// ../../../node_modules/semver/functions/rsort.js
|
|
208
208
|
var require_rsort = __commonJS({
|
|
209
|
-
"
|
|
209
|
+
"../../../node_modules/semver/functions/rsort.js"(exports, module) {
|
|
210
210
|
"use strict";
|
|
211
211
|
var compareBuild = require_compare_build(), rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose));
|
|
212
212
|
module.exports = rsort;
|
|
213
213
|
}
|
|
214
214
|
});
|
|
215
215
|
|
|
216
|
-
//
|
|
216
|
+
// ../../../node_modules/semver/functions/gt.js
|
|
217
217
|
var require_gt = __commonJS({
|
|
218
|
-
"
|
|
218
|
+
"../../../node_modules/semver/functions/gt.js"(exports, module) {
|
|
219
219
|
"use strict";
|
|
220
220
|
var compare = require_compare(), gt = (a, b, loose) => compare(a, b, loose) > 0;
|
|
221
221
|
module.exports = gt;
|
|
222
222
|
}
|
|
223
223
|
});
|
|
224
224
|
|
|
225
|
-
//
|
|
225
|
+
// ../../../node_modules/semver/functions/lt.js
|
|
226
226
|
var require_lt = __commonJS({
|
|
227
|
-
"
|
|
227
|
+
"../../../node_modules/semver/functions/lt.js"(exports, module) {
|
|
228
228
|
"use strict";
|
|
229
229
|
var compare = require_compare(), lt = (a, b, loose) => compare(a, b, loose) < 0;
|
|
230
230
|
module.exports = lt;
|
|
231
231
|
}
|
|
232
232
|
});
|
|
233
233
|
|
|
234
|
-
//
|
|
234
|
+
// ../../../node_modules/semver/functions/eq.js
|
|
235
235
|
var require_eq = __commonJS({
|
|
236
|
-
"
|
|
236
|
+
"../../../node_modules/semver/functions/eq.js"(exports, module) {
|
|
237
237
|
"use strict";
|
|
238
238
|
var compare = require_compare(), eq = (a, b, loose) => compare(a, b, loose) === 0;
|
|
239
239
|
module.exports = eq;
|
|
240
240
|
}
|
|
241
241
|
});
|
|
242
242
|
|
|
243
|
-
//
|
|
243
|
+
// ../../../node_modules/semver/functions/neq.js
|
|
244
244
|
var require_neq = __commonJS({
|
|
245
|
-
"
|
|
245
|
+
"../../../node_modules/semver/functions/neq.js"(exports, module) {
|
|
246
246
|
"use strict";
|
|
247
247
|
var compare = require_compare(), neq = (a, b, loose) => compare(a, b, loose) !== 0;
|
|
248
248
|
module.exports = neq;
|
|
249
249
|
}
|
|
250
250
|
});
|
|
251
251
|
|
|
252
|
-
//
|
|
252
|
+
// ../../../node_modules/semver/functions/lte.js
|
|
253
253
|
var require_lte = __commonJS({
|
|
254
|
-
"
|
|
254
|
+
"../../../node_modules/semver/functions/lte.js"(exports, module) {
|
|
255
255
|
"use strict";
|
|
256
256
|
var compare = require_compare(), lte = (a, b, loose) => compare(a, b, loose) <= 0;
|
|
257
257
|
module.exports = lte;
|
|
258
258
|
}
|
|
259
259
|
});
|
|
260
260
|
|
|
261
|
-
//
|
|
261
|
+
// ../../../node_modules/semver/functions/cmp.js
|
|
262
262
|
var require_cmp = __commonJS({
|
|
263
|
-
"
|
|
263
|
+
"../../../node_modules/semver/functions/cmp.js"(exports, module) {
|
|
264
264
|
"use strict";
|
|
265
265
|
var eq = require_eq(), neq = require_neq(), gt = require_gt(), gte = require_gte(), lt = require_lt(), lte = require_lte(), cmp = (a, op, b, loose) => {
|
|
266
266
|
switch (op) {
|
|
@@ -290,11 +290,11 @@ var require_cmp = __commonJS({
|
|
|
290
290
|
}
|
|
291
291
|
});
|
|
292
292
|
|
|
293
|
-
//
|
|
293
|
+
// ../../../node_modules/semver/functions/coerce.js
|
|
294
294
|
var require_coerce = __commonJS({
|
|
295
|
-
"
|
|
295
|
+
"../../../node_modules/semver/functions/coerce.js"(exports, module) {
|
|
296
296
|
"use strict";
|
|
297
|
-
var SemVer = require_semver(), parse = require_parse(), { safeRe: re, t } = require_re(),
|
|
297
|
+
var SemVer = require_semver(), parse = require_parse(), { safeRe: re, t } = require_re(), coerce2 = (version, options) => {
|
|
298
298
|
if (version instanceof SemVer)
|
|
299
299
|
return version;
|
|
300
300
|
if (typeof version == "number" && (version = String(version)), typeof version != "string")
|
|
@@ -314,13 +314,13 @@ var require_coerce = __commonJS({
|
|
|
314
314
|
let major = match[2], minor = match[3] || "0", patch = match[4] || "0", prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : "", build = options.includePrerelease && match[6] ? `+${match[6]}` : "";
|
|
315
315
|
return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options);
|
|
316
316
|
};
|
|
317
|
-
module.exports =
|
|
317
|
+
module.exports = coerce2;
|
|
318
318
|
}
|
|
319
319
|
});
|
|
320
320
|
|
|
321
|
-
//
|
|
321
|
+
// ../../../node_modules/semver/internal/lrucache.js
|
|
322
322
|
var require_lrucache = __commonJS({
|
|
323
|
-
"
|
|
323
|
+
"../../../node_modules/semver/internal/lrucache.js"(exports, module) {
|
|
324
324
|
"use strict";
|
|
325
325
|
var LRUCache = class {
|
|
326
326
|
constructor() {
|
|
@@ -349,9 +349,9 @@ var require_lrucache = __commonJS({
|
|
|
349
349
|
}
|
|
350
350
|
});
|
|
351
351
|
|
|
352
|
-
//
|
|
352
|
+
// ../../../node_modules/semver/classes/range.js
|
|
353
353
|
var require_range = __commonJS({
|
|
354
|
-
"
|
|
354
|
+
"../../../node_modules/semver/classes/range.js"(exports, module) {
|
|
355
355
|
"use strict";
|
|
356
356
|
var SPACE_CHARACTERS = /\s+/g, Range = class _Range {
|
|
357
357
|
constructor(range, options) {
|
|
@@ -485,9 +485,9 @@ var require_range = __commonJS({
|
|
|
485
485
|
}
|
|
486
486
|
});
|
|
487
487
|
|
|
488
|
-
//
|
|
488
|
+
// ../../../node_modules/semver/classes/comparator.js
|
|
489
489
|
var require_comparator = __commonJS({
|
|
490
|
-
"
|
|
490
|
+
"../../../node_modules/semver/classes/comparator.js"(exports, module) {
|
|
491
491
|
"use strict";
|
|
492
492
|
var ANY = Symbol("SemVer ANY"), Comparator = class _Comparator {
|
|
493
493
|
static get ANY() {
|
|
@@ -532,9 +532,9 @@ var require_comparator = __commonJS({
|
|
|
532
532
|
}
|
|
533
533
|
});
|
|
534
534
|
|
|
535
|
-
//
|
|
535
|
+
// ../../../node_modules/semver/functions/satisfies.js
|
|
536
536
|
var require_satisfies = __commonJS({
|
|
537
|
-
"
|
|
537
|
+
"../../../node_modules/semver/functions/satisfies.js"(exports, module) {
|
|
538
538
|
"use strict";
|
|
539
539
|
var Range = require_range(), satisfies2 = (version, range, options) => {
|
|
540
540
|
try {
|
|
@@ -548,18 +548,18 @@ var require_satisfies = __commonJS({
|
|
|
548
548
|
}
|
|
549
549
|
});
|
|
550
550
|
|
|
551
|
-
//
|
|
551
|
+
// ../../../node_modules/semver/ranges/to-comparators.js
|
|
552
552
|
var require_to_comparators = __commonJS({
|
|
553
|
-
"
|
|
553
|
+
"../../../node_modules/semver/ranges/to-comparators.js"(exports, module) {
|
|
554
554
|
"use strict";
|
|
555
555
|
var Range = require_range(), toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
|
|
556
556
|
module.exports = toComparators;
|
|
557
557
|
}
|
|
558
558
|
});
|
|
559
559
|
|
|
560
|
-
//
|
|
560
|
+
// ../../../node_modules/semver/ranges/max-satisfying.js
|
|
561
561
|
var require_max_satisfying = __commonJS({
|
|
562
|
-
"
|
|
562
|
+
"../../../node_modules/semver/ranges/max-satisfying.js"(exports, module) {
|
|
563
563
|
"use strict";
|
|
564
564
|
var SemVer = require_semver(), Range = require_range(), maxSatisfying = (versions, range, options) => {
|
|
565
565
|
let max = null, maxSV = null, rangeObj = null;
|
|
@@ -576,9 +576,9 @@ var require_max_satisfying = __commonJS({
|
|
|
576
576
|
}
|
|
577
577
|
});
|
|
578
578
|
|
|
579
|
-
//
|
|
579
|
+
// ../../../node_modules/semver/ranges/min-satisfying.js
|
|
580
580
|
var require_min_satisfying = __commonJS({
|
|
581
|
-
"
|
|
581
|
+
"../../../node_modules/semver/ranges/min-satisfying.js"(exports, module) {
|
|
582
582
|
"use strict";
|
|
583
583
|
var SemVer = require_semver(), Range = require_range(), minSatisfying = (versions, range, options) => {
|
|
584
584
|
let min = null, minSV = null, rangeObj = null;
|
|
@@ -595,9 +595,9 @@ var require_min_satisfying = __commonJS({
|
|
|
595
595
|
}
|
|
596
596
|
});
|
|
597
597
|
|
|
598
|
-
//
|
|
598
|
+
// ../../../node_modules/semver/ranges/min-version.js
|
|
599
599
|
var require_min_version = __commonJS({
|
|
600
|
-
"
|
|
600
|
+
"../../../node_modules/semver/ranges/min-version.js"(exports, module) {
|
|
601
601
|
"use strict";
|
|
602
602
|
var SemVer = require_semver(), Range = require_range(), gt = require_gt(), minVersion = (range, loose) => {
|
|
603
603
|
range = new Range(range, loose);
|
|
@@ -632,9 +632,9 @@ var require_min_version = __commonJS({
|
|
|
632
632
|
}
|
|
633
633
|
});
|
|
634
634
|
|
|
635
|
-
//
|
|
635
|
+
// ../../../node_modules/semver/ranges/valid.js
|
|
636
636
|
var require_valid2 = __commonJS({
|
|
637
|
-
"
|
|
637
|
+
"../../../node_modules/semver/ranges/valid.js"(exports, module) {
|
|
638
638
|
"use strict";
|
|
639
639
|
var Range = require_range(), validRange = (range, options) => {
|
|
640
640
|
try {
|
|
@@ -647,9 +647,9 @@ var require_valid2 = __commonJS({
|
|
|
647
647
|
}
|
|
648
648
|
});
|
|
649
649
|
|
|
650
|
-
//
|
|
650
|
+
// ../../../node_modules/semver/ranges/outside.js
|
|
651
651
|
var require_outside = __commonJS({
|
|
652
|
-
"
|
|
652
|
+
"../../../node_modules/semver/ranges/outside.js"(exports, module) {
|
|
653
653
|
"use strict";
|
|
654
654
|
var SemVer = require_semver(), Comparator = require_comparator(), { ANY } = Comparator, Range = require_range(), satisfies2 = require_satisfies(), gt = require_gt(), lt = require_lt(), lte = require_lte(), gte = require_gte(), outside = (version, range, hilo, options) => {
|
|
655
655
|
version = new SemVer(version, options), range = new Range(range, options);
|
|
@@ -681,36 +681,36 @@ var require_outside = __commonJS({
|
|
|
681
681
|
}
|
|
682
682
|
});
|
|
683
683
|
|
|
684
|
-
//
|
|
684
|
+
// ../../../node_modules/semver/ranges/gtr.js
|
|
685
685
|
var require_gtr = __commonJS({
|
|
686
|
-
"
|
|
686
|
+
"../../../node_modules/semver/ranges/gtr.js"(exports, module) {
|
|
687
687
|
"use strict";
|
|
688
688
|
var outside = require_outside(), gtr = (version, range, options) => outside(version, range, ">", options);
|
|
689
689
|
module.exports = gtr;
|
|
690
690
|
}
|
|
691
691
|
});
|
|
692
692
|
|
|
693
|
-
//
|
|
693
|
+
// ../../../node_modules/semver/ranges/ltr.js
|
|
694
694
|
var require_ltr = __commonJS({
|
|
695
|
-
"
|
|
695
|
+
"../../../node_modules/semver/ranges/ltr.js"(exports, module) {
|
|
696
696
|
"use strict";
|
|
697
697
|
var outside = require_outside(), ltr = (version, range, options) => outside(version, range, "<", options);
|
|
698
698
|
module.exports = ltr;
|
|
699
699
|
}
|
|
700
700
|
});
|
|
701
701
|
|
|
702
|
-
//
|
|
702
|
+
// ../../../node_modules/semver/ranges/intersects.js
|
|
703
703
|
var require_intersects = __commonJS({
|
|
704
|
-
"
|
|
704
|
+
"../../../node_modules/semver/ranges/intersects.js"(exports, module) {
|
|
705
705
|
"use strict";
|
|
706
706
|
var Range = require_range(), intersects = (r1, r2, options) => (r1 = new Range(r1, options), r2 = new Range(r2, options), r1.intersects(r2, options));
|
|
707
707
|
module.exports = intersects;
|
|
708
708
|
}
|
|
709
709
|
});
|
|
710
710
|
|
|
711
|
-
//
|
|
711
|
+
// ../../../node_modules/semver/ranges/simplify.js
|
|
712
712
|
var require_simplify = __commonJS({
|
|
713
|
-
"
|
|
713
|
+
"../../../node_modules/semver/ranges/simplify.js"(exports, module) {
|
|
714
714
|
"use strict";
|
|
715
715
|
var satisfies2 = require_satisfies(), compare = require_compare();
|
|
716
716
|
module.exports = (versions, range, options) => {
|
|
@@ -727,9 +727,9 @@ var require_simplify = __commonJS({
|
|
|
727
727
|
}
|
|
728
728
|
});
|
|
729
729
|
|
|
730
|
-
//
|
|
730
|
+
// ../../../node_modules/semver/ranges/subset.js
|
|
731
731
|
var require_subset = __commonJS({
|
|
732
|
-
"
|
|
732
|
+
"../../../node_modules/semver/ranges/subset.js"(exports, module) {
|
|
733
733
|
"use strict";
|
|
734
734
|
var Range = require_range(), Comparator = require_comparator(), { ANY } = Comparator, satisfies2 = require_satisfies(), compare = require_compare(), subset = (sub, dom, options = {}) => {
|
|
735
735
|
if (sub === dom)
|
|
@@ -815,11 +815,11 @@ var require_subset = __commonJS({
|
|
|
815
815
|
}
|
|
816
816
|
});
|
|
817
817
|
|
|
818
|
-
//
|
|
818
|
+
// ../../../node_modules/semver/index.js
|
|
819
819
|
var require_semver2 = __commonJS({
|
|
820
|
-
"
|
|
820
|
+
"../../../node_modules/semver/index.js"(exports, module) {
|
|
821
821
|
"use strict";
|
|
822
|
-
var internalRe = require_re(), constants = require_constants(), SemVer = require_semver(), identifiers = require_identifiers(), parse = require_parse(), valid = require_valid(), clean = require_clean(), inc = require_inc(), diff = require_diff(), major = require_major(), minor = require_minor(), patch = require_patch(), prerelease = require_prerelease(), compare = require_compare(), rcompare = require_rcompare(), compareLoose = require_compare_loose(), compareBuild = require_compare_build(), sort = require_sort(), rsort = require_rsort(), gt = require_gt(), lt = require_lt(), eq = require_eq(), neq = require_neq(), gte = require_gte(), lte = require_lte(), cmp = require_cmp(),
|
|
822
|
+
var internalRe = require_re(), constants = require_constants(), SemVer = require_semver(), identifiers = require_identifiers(), parse = require_parse(), valid = require_valid(), clean = require_clean(), inc = require_inc(), diff = require_diff(), major = require_major(), minor = require_minor(), patch = require_patch(), prerelease = require_prerelease(), compare = require_compare(), rcompare = require_rcompare(), compareLoose = require_compare_loose(), compareBuild = require_compare_build(), sort = require_sort(), rsort = require_rsort(), gt = require_gt(), lt = require_lt(), eq = require_eq(), neq = require_neq(), gte = require_gte(), lte = require_lte(), cmp = require_cmp(), coerce2 = require_coerce(), Comparator = require_comparator(), Range = require_range(), satisfies2 = require_satisfies(), toComparators = require_to_comparators(), maxSatisfying = require_max_satisfying(), minSatisfying = require_min_satisfying(), minVersion = require_min_version(), validRange = require_valid2(), outside = require_outside(), gtr = require_gtr(), ltr = require_ltr(), intersects = require_intersects(), simplifyRange = require_simplify(), subset = require_subset();
|
|
823
823
|
module.exports = {
|
|
824
824
|
parse,
|
|
825
825
|
valid,
|
|
@@ -843,7 +843,7 @@ var require_semver2 = __commonJS({
|
|
|
843
843
|
gte,
|
|
844
844
|
lte,
|
|
845
845
|
cmp,
|
|
846
|
-
coerce,
|
|
846
|
+
coerce: coerce2,
|
|
847
847
|
Comparator,
|
|
848
848
|
Range,
|
|
849
849
|
satisfies: satisfies2,
|
|
@@ -884,8 +884,12 @@ import {
|
|
|
884
884
|
} from "storybook/internal/common";
|
|
885
885
|
import { CLI_COLORS } from "storybook/internal/node-logger";
|
|
886
886
|
import {
|
|
887
|
+
AddonVitestPostinstallConfigUpdateError,
|
|
887
888
|
AddonVitestPostinstallError,
|
|
888
|
-
|
|
889
|
+
AddonVitestPostinstallExistingSetupFileError,
|
|
890
|
+
AddonVitestPostinstallFailedAddonA11yError,
|
|
891
|
+
AddonVitestPostinstallPrerequisiteCheckError,
|
|
892
|
+
AddonVitestPostinstallWorkspaceUpdateError
|
|
889
893
|
} from "storybook/internal/server-errors";
|
|
890
894
|
import { SupportedFramework } from "storybook/internal/types";
|
|
891
895
|
var import_semver = __toESM(require_semver2(), 1), import_ts_dedent = __toESM(require_dist(), 1);
|
|
@@ -1045,9 +1049,9 @@ async function postInstall(options) {
|
|
|
1045
1049
|
}), findFile = (basename, extensions = EXTENSIONS) => any(
|
|
1046
1050
|
extensions.map((ext) => basename + ext),
|
|
1047
1051
|
{ last: getProjectRoot(), cwd: options.configDir }
|
|
1048
|
-
), vitestVersionSpecifier = await packageManager.getInstalledVersion("vitest");
|
|
1049
|
-
logger.debug(`Vitest version specifier: ${vitestVersionSpecifier}`);
|
|
1050
|
-
let isVitest3_2To4 = vitestVersionSpecifier ? (0, import_semver.satisfies)(vitestVersionSpecifier, ">=3.2.0 <4.0.0") : !1, isVitest4OrNewer = vitestVersionSpecifier ? (0, import_semver.satisfies)(vitestVersionSpecifier, ">=4.0.0") : !0, info = await getStorybookInfo(options.configDir),
|
|
1052
|
+
), allDeps = packageManager.getAllDependencies(), vitestVersionSpecifier = await packageManager.getInstalledVersion("vitest");
|
|
1053
|
+
!vitestVersionSpecifier && allDeps.vitest && (vitestVersionSpecifier = allDeps.vitest), vitestVersionSpecifier = (0, import_semver.coerce)(vitestVersionSpecifier)?.version ?? null, logger.debug(`Vitest version specifier: ${vitestVersionSpecifier}`);
|
|
1054
|
+
let isVitest3_2To4 = vitestVersionSpecifier ? (0, import_semver.satisfies)(vitestVersionSpecifier, ">=3.2.0 <4.0.0") : !1, isVitest4OrNewer = vitestVersionSpecifier ? (0, import_semver.satisfies)(vitestVersionSpecifier, ">=4.0.0") : !0, info = await getStorybookInfo(options.configDir), addonVitestService = new AddonVitestService(packageManager), compatibilityResult = await addonVitestService.validateCompatibility({
|
|
1051
1055
|
framework: info.framework,
|
|
1052
1056
|
builder: info.builder
|
|
1053
1057
|
}), result = null;
|
|
@@ -1088,28 +1092,22 @@ async function postInstall(options) {
|
|
|
1088
1092
|
versionedDependencies
|
|
1089
1093
|
)), options.skipInstall || await packageManager.installDependencies();
|
|
1090
1094
|
}
|
|
1091
|
-
|
|
1092
|
-
if (options.skipInstall)
|
|
1093
|
-
logger.warn(import_ts_dedent.dedent`
|
|
1095
|
+
options.skipDependencyManagement || (options.skipInstall ? logger.warn(import_ts_dedent.dedent`
|
|
1094
1096
|
Playwright browser binaries installation skipped. Please run the following command manually later:
|
|
1095
1097
|
${CLI_COLORS.cta("npx playwright install chromium --with-deps")}
|
|
1096
|
-
`)
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
yes: options.yes
|
|
1100
|
-
});
|
|
1101
|
-
errors.push(...playwrightErrors);
|
|
1102
|
-
}
|
|
1098
|
+
`) : await addonVitestService.installPlaywright({
|
|
1099
|
+
yes: options.yes
|
|
1100
|
+
}));
|
|
1103
1101
|
let fileExtension = allDeps.typescript || findFile("tsconfig", [...EXTENSIONS, ".json"]) ? "ts" : "js", vitestSetupFile = resolve(options.configDir, `vitest.setup.${fileExtension}`);
|
|
1104
1102
|
if (existsSync(vitestSetupFile)) {
|
|
1105
1103
|
let errorMessage = import_ts_dedent.dedent`
|
|
1106
1104
|
Found an existing Vitest setup file:
|
|
1107
1105
|
${vitestSetupFile}
|
|
1108
1106
|
Please refer to the documentation to complete the setup manually:
|
|
1109
|
-
https://storybook.js.org/docs/next/${DOCUMENTATION_LINK}#manual-setup
|
|
1107
|
+
https://storybook.js.org/docs/next/${DOCUMENTATION_LINK}#manual-setup-advanced
|
|
1110
1108
|
`;
|
|
1111
1109
|
logger.line(), logger.error(`${errorMessage}
|
|
1112
|
-
`), errors.push(
|
|
1110
|
+
`), errors.push(new AddonVitestPostinstallExistingSetupFileError({ filePath: vitestSetupFile }));
|
|
1113
1111
|
} else {
|
|
1114
1112
|
logger.step("Creating a Vitest setup file for Storybook:"), logger.log(`${vitestSetupFile}
|
|
1115
1113
|
`);
|
|
@@ -1155,9 +1153,11 @@ async function postInstall(options) {
|
|
|
1155
1153
|
your existing workspace file automatically, you must do it yourself.
|
|
1156
1154
|
|
|
1157
1155
|
Please refer to the documentation to complete the setup manually:
|
|
1158
|
-
https://storybook.js.org/docs/next/${DOCUMENTATION_LINK}#manual-setup
|
|
1156
|
+
https://storybook.js.org/docs/next/${DOCUMENTATION_LINK}#manual-setup-advanced
|
|
1159
1157
|
`
|
|
1160
|
-
), errors.push(
|
|
1158
|
+
), errors.push(
|
|
1159
|
+
new AddonVitestPostinstallWorkspaceUpdateError({ filePath: vitestWorkspaceFile })
|
|
1160
|
+
);
|
|
1161
1161
|
} else if (rootConfig) {
|
|
1162
1162
|
let target, updated, configFile = await fs2.readFile(rootConfig, "utf8"), configFileHasTypeReference = configFile.match(
|
|
1163
1163
|
/\/\/\/\s*<reference\s+types=["']vitest\/config["']\s*\/>/
|
|
@@ -1182,8 +1182,8 @@ async function postInstall(options) {
|
|
|
1182
1182
|
We were unable to update your existing ${vitestConfigFile ? "Vitest" : "Vite"} config file.
|
|
1183
1183
|
|
|
1184
1184
|
Please refer to the documentation to complete the setup manually:
|
|
1185
|
-
https://storybook.js.org/docs/writing-tests/integrations/vitest-addon#manual-setup
|
|
1186
|
-
`), errors.push(
|
|
1185
|
+
https://storybook.js.org/docs/writing-tests/integrations/vitest-addon#manual-setup-advanced
|
|
1186
|
+
`), errors.push(new AddonVitestPostinstallConfigUpdateError({ filePath: rootConfig }));
|
|
1187
1187
|
} else {
|
|
1188
1188
|
let parentDir = dirname(options.configDir), newConfigFile = resolve(parentDir, `vitest.config.${fileExtension}`), configTemplate = await loadTemplate(getTemplateName(), {
|
|
1189
1189
|
CONFIG_DIR: options.configDir,
|
|
@@ -1217,10 +1217,8 @@ async function postInstall(options) {
|
|
|
1217
1217
|
logger.error(import_ts_dedent.dedent`
|
|
1218
1218
|
Could not automatically set up ${addonA11yName} for @storybook/addon-vitest.
|
|
1219
1219
|
Please refer to the documentation to complete the setup manually:
|
|
1220
|
-
https://storybook.js.org/docs/writing-tests/accessibility-testing#
|
|
1221
|
-
`), errors.push(
|
|
1222
|
-
"The @storybook/addon-a11y couldn't be set up for the Vitest addon" + (e instanceof Error ? e.stack : String(e))
|
|
1223
|
-
);
|
|
1220
|
+
https://storybook.js.org/docs/writing-tests/accessibility-testing#integration-with-vitest-addon
|
|
1221
|
+
`), errors.push(new AddonVitestPostinstallFailedAddonA11yError({ error: e }));
|
|
1224
1222
|
}
|
|
1225
1223
|
let runCommand = rootConfig ? "npx vitest --project=storybook" : "npx vitest";
|
|
1226
1224
|
if (errors.length === 0)
|
|
@@ -1239,7 +1237,7 @@ async function postInstall(options) {
|
|
|
1239
1237
|
import_ts_dedent.dedent`
|
|
1240
1238
|
Done, but with errors!
|
|
1241
1239
|
@storybook/addon-vitest was installed successfully, but there were some errors during the setup process. Please refer to the documentation to complete the setup manually and check the errors above:
|
|
1242
|
-
https://storybook.js.org/docs/next/${DOCUMENTATION_LINK}#manual-setup
|
|
1240
|
+
https://storybook.js.org/docs/next/${DOCUMENTATION_LINK}#manual-setup-advanced
|
|
1243
1241
|
`
|
|
1244
1242
|
), new AddonVitestPostinstallError({ errors });
|
|
1245
1243
|
}
|