@storybook/addon-vitest 0.0.0-pr-32717-sha-7a16d827 → 0.0.0-pr-33090-sha-f6174c82
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-DYV547Q4.js → chunk-2KF2VISY.js} +6 -6
- package/dist/_node-chunks/{chunk-EA5OGAXV.js → chunk-C27EWYAE.js} +7 -7
- package/dist/_node-chunks/chunk-JDY32SOO.js +35 -0
- package/dist/_node-chunks/{chunk-DDLDTOSC.js → chunk-KAKLJ54A.js} +6 -6
- package/dist/_node-chunks/{chunk-X6HYMCZT.js → chunk-KR7B4BKU.js} +7 -7
- package/dist/_node-chunks/{chunk-5U6CQJMK.js → chunk-LSQEC7U2.js} +31 -6
- package/dist/_node-chunks/chunk-UFZVJPFP.js +1697 -0
- package/dist/_node-chunks/{chunk-S2JKIEJM.js → chunk-UO6Q7EWR.js} +19 -7
- package/dist/manager.js +1 -1
- package/dist/node/coverage-reporter.js +8 -8
- package/dist/node/vitest.js +14 -24
- package/dist/postinstall.js +290 -152
- package/dist/preset.js +25 -30
- package/dist/vitest-plugin/global-setup.js +9 -8
- package/dist/vitest-plugin/index.js +12 -14
- package/dist/vitest-plugin/setup-file.js +1 -1
- package/package.json +7 -3
- package/dist/_node-chunks/chunk-HZCK7BEH.js +0 -61
- package/dist/_node-chunks/chunk-STRQZNZL.js +0 -158
- package/dist/_node-chunks/chunk-XVIBXJUL.js +0 -38
- /package/dist/_browser-chunks/{chunk-TYJENCK5.js → chunk-ULSHVN74.js} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_gak4y1elpfo from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_gak4y1elpfo from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_gak4y1elpfo from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_gak4y1elpfo.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_gak4y1elpfo.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_gak4y1elpfo.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_gak4y1elpfo from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_gak4y1elpfo from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_gak4y1elpfo from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_gak4y1elpfo.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_gak4y1elpfo.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_gak4y1elpfo.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-KAKLJ54A.js";
|
|
15
15
|
|
|
16
16
|
// ../../node_modules/picocolors/picocolors.js
|
|
17
17
|
var require_picocolors = __commonJS({
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_gak4y1elpfo from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_gak4y1elpfo from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_gak4y1elpfo from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_gak4y1elpfo.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_gak4y1elpfo.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_gak4y1elpfo.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
import {
|
|
13
|
+
ADDON_ID
|
|
14
|
+
} from "./chunk-UO6Q7EWR.js";
|
|
15
|
+
import {
|
|
16
|
+
require_picocolors
|
|
17
|
+
} from "./chunk-C27EWYAE.js";
|
|
18
|
+
import {
|
|
19
|
+
__toESM
|
|
20
|
+
} from "./chunk-KAKLJ54A.js";
|
|
21
|
+
|
|
22
|
+
// src/logger.ts
|
|
23
|
+
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
24
|
+
var log = (message) => {
|
|
25
|
+
console.log(`${import_picocolors.default.magenta(ADDON_ID)}: ${message.toString().trim()}`);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
// ../../node_modules/es-toolkit/dist/function/noop.mjs
|
|
29
|
+
function noop() {
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export {
|
|
33
|
+
noop,
|
|
34
|
+
log
|
|
35
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_gak4y1elpfo from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_gak4y1elpfo from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_gak4y1elpfo from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_gak4y1elpfo.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_gak4y1elpfo.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_gak4y1elpfo.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_gak4y1elpfo from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_gak4y1elpfo from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_gak4y1elpfo from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_gak4y1elpfo.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_gak4y1elpfo.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_gak4y1elpfo.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-KAKLJ54A.js";
|
|
15
15
|
|
|
16
16
|
// ../../node_modules/semver/internal/constants.js
|
|
17
17
|
var require_constants = __commonJS({
|
|
@@ -1,15 +1,32 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_gak4y1elpfo from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_gak4y1elpfo from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_gak4y1elpfo from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_gak4y1elpfo.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_gak4y1elpfo.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_gak4y1elpfo.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
|
|
|
13
|
+
// src/utils.ts
|
|
14
|
+
function getAddonNames(mainConfig) {
|
|
15
|
+
return (mainConfig.addons || []).map((addon) => {
|
|
16
|
+
let name = "";
|
|
17
|
+
return typeof addon == "string" ? name = addon : typeof addon == "object" && (name = addon.name), name;
|
|
18
|
+
}).filter((item) => item != null);
|
|
19
|
+
}
|
|
20
|
+
function errorToErrorLike(error) {
|
|
21
|
+
return {
|
|
22
|
+
message: error.message,
|
|
23
|
+
name: error.name,
|
|
24
|
+
// avoid duplicating the error message in the stack trace
|
|
25
|
+
stack: error.stack?.replace(error.message, ""),
|
|
26
|
+
cause: error.cause && error.cause instanceof Error ? errorToErrorLike(error.cause) : void 0
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
|
|
13
30
|
// ../../node_modules/empathic/find.mjs
|
|
14
31
|
import { join as join2 } from "node:path";
|
|
15
32
|
import { existsSync, statSync } from "node:fs";
|
|
@@ -32,6 +49,11 @@ function up(base, options) {
|
|
|
32
49
|
}
|
|
33
50
|
|
|
34
51
|
// ../../node_modules/empathic/find.mjs
|
|
52
|
+
function up2(name, options) {
|
|
53
|
+
let dir, tmp, start = options && options.cwd || "";
|
|
54
|
+
for (dir of up(start, options))
|
|
55
|
+
if (tmp = join2(dir, name), existsSync(tmp)) return tmp;
|
|
56
|
+
}
|
|
35
57
|
function any(names, options) {
|
|
36
58
|
let dir, start = options && options.cwd || "", j = 0, len = names.length, tmp;
|
|
37
59
|
for (dir of up(start, options))
|
|
@@ -40,5 +62,8 @@ function any(names, options) {
|
|
|
40
62
|
}
|
|
41
63
|
|
|
42
64
|
export {
|
|
65
|
+
getAddonNames,
|
|
66
|
+
errorToErrorLike,
|
|
67
|
+
up2 as up,
|
|
43
68
|
any
|
|
44
69
|
};
|