@storybook/addon-vitest 0.0.0-pr-32799-sha-e72c6b25 → 0.0.0-pr-32921-sha-e379604f
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-PMYV6BH2.js → chunk-RPDOPHZX.js} +1 -0
- package/dist/_node-chunks/chunk-35HQDRSW.js +40 -0
- package/dist/_node-chunks/{chunk-MNO64KI6.js → chunk-44HMBDZB.js} +7 -18
- package/dist/_node-chunks/chunk-5VIW3HJI.js +60 -0
- package/dist/_node-chunks/{chunk-S6NBXJD5.js → chunk-DD7C6MBB.js} +7 -7
- package/dist/_node-chunks/{chunk-54L6M5PF.js → chunk-KCDJ5637.js} +7 -7
- package/dist/_node-chunks/chunk-UOG6CVMT.js +348 -0
- package/dist/_node-chunks/{chunk-EBTWRVJW.js → chunk-UTDP34PA.js} +6 -6
- package/dist/_node-chunks/{chunk-N3IVPIIG.js → chunk-Z6HJL76U.js} +7 -7
- package/dist/manager.js +1 -1
- package/dist/node/coverage-reporter.js +8 -8
- package/dist/node/vitest.js +31 -17
- package/dist/postinstall.js +216 -431
- package/dist/preset.js +2239 -15
- package/dist/vitest-plugin/global-setup.js +7 -7
- package/dist/vitest-plugin/index.js +10 -9
- package/dist/vitest-plugin/setup-file.js +1 -1
- package/package.json +12 -10
- package/templates/vitest.config.3.2.template.ts +6 -1
- package/templates/vitest.config.4.template.ts +37 -0
- package/templates/vitest.config.template.ts +6 -1
- package/templates/vitest.workspace.template.ts +6 -1
- package/dist/_node-chunks/chunk-S4OYSNCY.js +0 -37
- package/dist/_node-chunks/chunk-VUPLOX7Y.js +0 -2574
- package/dist/_node-chunks/chunk-YRSMPC6L.js +0 -98
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_g10epgk91bd from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_g10epgk91bd from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_g10epgk91bd from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_g10epgk91bd.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_g10epgk91bd.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_g10epgk91bd.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|
|
12
|
-
import {
|
|
13
|
-
__name
|
|
14
|
-
} from "./chunk-EBTWRVJW.js";
|
|
15
|
-
|
|
16
|
-
// src/utils.ts
|
|
17
|
-
function getAddonNames(mainConfig) {
|
|
18
|
-
const addons = mainConfig.addons || [];
|
|
19
|
-
const addonList = addons.map((addon) => {
|
|
20
|
-
let name = "";
|
|
21
|
-
if (typeof addon === "string") {
|
|
22
|
-
name = addon;
|
|
23
|
-
} else if (typeof addon === "object") {
|
|
24
|
-
name = addon.name;
|
|
25
|
-
}
|
|
26
|
-
return name;
|
|
27
|
-
});
|
|
28
|
-
return addonList.filter((item) => item != null);
|
|
29
|
-
}
|
|
30
|
-
__name(getAddonNames, "getAddonNames");
|
|
31
|
-
function errorToErrorLike(error) {
|
|
32
|
-
return {
|
|
33
|
-
message: error.message,
|
|
34
|
-
name: error.name,
|
|
35
|
-
// avoid duplicating the error message in the stack trace
|
|
36
|
-
stack: error.stack?.replace(error.message, ""),
|
|
37
|
-
cause: error.cause && error.cause instanceof Error ? errorToErrorLike(error.cause) : void 0
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
__name(errorToErrorLike, "errorToErrorLike");
|
|
41
|
-
|
|
42
|
-
// ../../node_modules/empathic/find.mjs
|
|
43
|
-
import { join as join2 } from "node:path";
|
|
44
|
-
import { existsSync, statSync } from "node:fs";
|
|
45
|
-
|
|
46
|
-
// ../../node_modules/empathic/walk.mjs
|
|
47
|
-
import { dirname } from "node:path";
|
|
48
|
-
|
|
49
|
-
// ../../node_modules/empathic/resolve.mjs
|
|
50
|
-
import { isAbsolute, join, resolve } from "node:path";
|
|
51
|
-
function absolute(input, root) {
|
|
52
|
-
return isAbsolute(input) ? input : resolve(root || ".", input);
|
|
53
|
-
}
|
|
54
|
-
__name(absolute, "absolute");
|
|
55
|
-
|
|
56
|
-
// ../../node_modules/empathic/walk.mjs
|
|
57
|
-
function up(base, options) {
|
|
58
|
-
let { last, cwd } = options || {};
|
|
59
|
-
let tmp = absolute(base, cwd);
|
|
60
|
-
let root = absolute(last || "/", cwd);
|
|
61
|
-
let prev, arr = [];
|
|
62
|
-
while (prev !== root) {
|
|
63
|
-
arr.push(tmp);
|
|
64
|
-
tmp = dirname(prev = tmp);
|
|
65
|
-
if (tmp === prev) break;
|
|
66
|
-
}
|
|
67
|
-
return arr;
|
|
68
|
-
}
|
|
69
|
-
__name(up, "up");
|
|
70
|
-
|
|
71
|
-
// ../../node_modules/empathic/find.mjs
|
|
72
|
-
function up2(name, options) {
|
|
73
|
-
let dir, tmp;
|
|
74
|
-
let start = options && options.cwd || "";
|
|
75
|
-
for (dir of up(start, options)) {
|
|
76
|
-
tmp = join2(dir, name);
|
|
77
|
-
if (existsSync(tmp)) return tmp;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
__name(up2, "up");
|
|
81
|
-
function any(names, options) {
|
|
82
|
-
let dir, start = options && options.cwd || "";
|
|
83
|
-
let j = 0, len = names.length, tmp;
|
|
84
|
-
for (dir of up(start, options)) {
|
|
85
|
-
for (j = 0; j < len; j++) {
|
|
86
|
-
tmp = join2(dir, names[j]);
|
|
87
|
-
if (existsSync(tmp)) return tmp;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
__name(any, "any");
|
|
92
|
-
|
|
93
|
-
export {
|
|
94
|
-
getAddonNames,
|
|
95
|
-
errorToErrorLike,
|
|
96
|
-
up2 as up,
|
|
97
|
-
any
|
|
98
|
-
};
|