@storybook/addon-vitest 0.0.0-pr-32883-sha-058ac881 → 0.0.0-pr-32717-sha-6b32df73
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-YJDTI7KO.js → chunk-7U3E5OTZ.js} +7 -7
- package/dist/_node-chunks/chunk-C3FRTXFF.js +348 -0
- package/dist/_node-chunks/{chunk-6UWRJWLY.js → chunk-KIUHNMC3.js} +6 -18
- package/dist/_node-chunks/chunk-NC7DRZM4.js +60 -0
- package/dist/_node-chunks/{chunk-MQCGVIOM.js → chunk-OQHY5QS2.js} +7 -7
- package/dist/_node-chunks/chunk-REWDQMPP.js +40 -0
- package/dist/_node-chunks/{chunk-JQ2ZWCPQ.js → chunk-RU4LPJPR.js} +6 -6
- package/dist/_node-chunks/{chunk-P3F6EE3F.js → chunk-WKSVA3OK.js} +7 -7
- package/dist/manager.js +1 -1
- package/dist/node/coverage-reporter.js +8 -8
- package/dist/node/vitest.js +25 -14
- package/dist/postinstall.js +184 -412
- package/dist/preset.js +2239 -15
- package/dist/vitest-plugin/global-setup.js +7 -7
- package/dist/vitest-plugin/index.js +9 -9
- package/dist/vitest-plugin/setup-file.js +1 -1
- package/package.json +2 -4
- package/dist/_node-chunks/chunk-5NYB6WON.js +0 -37
- package/dist/_node-chunks/chunk-7MLRCZUJ.js +0 -98
- package/dist/_node-chunks/chunk-AUW5AAZC.js +0 -2574
- /package/dist/_browser-chunks/{chunk-CAYLRBRX.js → chunk-RPDOPHZX.js} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_hwd9utotfy8 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_hwd9utotfy8 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_hwd9utotfy8 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_hwd9utotfy8.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_hwd9utotfy8.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_hwd9utotfy8.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
__name,
|
|
15
15
|
__require,
|
|
16
16
|
__toESM
|
|
17
|
-
} from "../_node-chunks/chunk-
|
|
17
|
+
} from "../_node-chunks/chunk-RU4LPJPR.js";
|
|
18
18
|
|
|
19
19
|
// ../../node_modules/tree-kill/index.js
|
|
20
20
|
var require_tree_kill = __commonJS({
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_hwd9utotfy8 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_hwd9utotfy8 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_hwd9utotfy8 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_hwd9utotfy8.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_hwd9utotfy8.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_hwd9utotfy8.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-WKSVA3OK.js";
|
|
15
15
|
import {
|
|
16
16
|
join,
|
|
17
17
|
normalize,
|
|
18
18
|
relative,
|
|
19
19
|
resolve,
|
|
20
20
|
sep
|
|
21
|
-
} from "../_node-chunks/chunk-
|
|
21
|
+
} from "../_node-chunks/chunk-7U3E5OTZ.js";
|
|
22
22
|
import {
|
|
23
23
|
__commonJS,
|
|
24
24
|
__name,
|
|
25
25
|
__require,
|
|
26
26
|
__toESM
|
|
27
|
-
} from "../_node-chunks/chunk-
|
|
27
|
+
} from "../_node-chunks/chunk-RU4LPJPR.js";
|
|
28
28
|
|
|
29
29
|
// ../../node_modules/braces/lib/utils.js
|
|
30
30
|
var require_utils = __commonJS({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/addon-vitest",
|
|
3
|
-
"version": "0.0.0-pr-
|
|
3
|
+
"version": "0.0.0-pr-32717-sha-6b32df73",
|
|
4
4
|
"description": "Storybook Vitest addon: Blazing fast component testing using stories",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -74,7 +74,6 @@
|
|
|
74
74
|
"dependencies": {
|
|
75
75
|
"@storybook/global": "^5.0.0",
|
|
76
76
|
"@storybook/icons": "^1.6.0",
|
|
77
|
-
"prompts": "^2.4.0",
|
|
78
77
|
"ts-dedent": "^2.2.0"
|
|
79
78
|
},
|
|
80
79
|
"devDependencies": {
|
|
@@ -84,7 +83,6 @@
|
|
|
84
83
|
"@types/semver": "^7",
|
|
85
84
|
"@vitest/browser-playwright": "^4.0.1",
|
|
86
85
|
"@vitest/runner": "^4.0.1",
|
|
87
|
-
"boxen": "^8.0.1",
|
|
88
86
|
"empathic": "^2.0.0",
|
|
89
87
|
"es-toolkit": "^1.36.0",
|
|
90
88
|
"execa": "^8.0.1",
|
|
@@ -107,7 +105,7 @@
|
|
|
107
105
|
"@vitest/browser": "^3.0.0 || ^4.0.0",
|
|
108
106
|
"@vitest/browser-playwright": "^4.0.0",
|
|
109
107
|
"@vitest/runner": "^3.0.0 || ^4.0.0",
|
|
110
|
-
"storybook": "^0.0.0-pr-
|
|
108
|
+
"storybook": "^0.0.0-pr-32717-sha-6b32df73",
|
|
111
109
|
"vitest": "^3.0.0 || ^4.0.0"
|
|
112
110
|
},
|
|
113
111
|
"peerDependenciesMeta": {
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_hs9pzjk6p5 from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_hs9pzjk6p5 from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_hs9pzjk6p5 from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_hs9pzjk6p5.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_hs9pzjk6p5.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_hs9pzjk6p5.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-6UWRJWLY.js";
|
|
15
|
-
import {
|
|
16
|
-
require_picocolors
|
|
17
|
-
} from "./chunk-P3F6EE3F.js";
|
|
18
|
-
import {
|
|
19
|
-
__name,
|
|
20
|
-
__toESM
|
|
21
|
-
} from "./chunk-JQ2ZWCPQ.js";
|
|
22
|
-
|
|
23
|
-
// src/logger.ts
|
|
24
|
-
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
25
|
-
var log = /* @__PURE__ */ __name((message) => {
|
|
26
|
-
console.log(`${import_picocolors.default.magenta(ADDON_ID)}: ${message.toString().trim()}`);
|
|
27
|
-
}, "log");
|
|
28
|
-
|
|
29
|
-
// ../../node_modules/es-toolkit/dist/function/noop.mjs
|
|
30
|
-
function noop() {
|
|
31
|
-
}
|
|
32
|
-
__name(noop, "noop");
|
|
33
|
-
|
|
34
|
-
export {
|
|
35
|
-
noop,
|
|
36
|
-
log
|
|
37
|
-
};
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_hs9pzjk6p5 from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_hs9pzjk6p5 from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_hs9pzjk6p5 from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_hs9pzjk6p5.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_hs9pzjk6p5.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_hs9pzjk6p5.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-JQ2ZWCPQ.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
|
-
};
|