@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
|
|
@@ -19,7 +19,18 @@ var UI_STATE_ID = `${ADDON_ID2}/ui`, RESULT = `${ADDON_ID2}/result`, REQUEST = `
|
|
|
19
19
|
|
|
20
20
|
// src/constants.ts
|
|
21
21
|
var ADDON_ID3 = "storybook/test", TEST_PROVIDER_ID = `${ADDON_ID3}/test-provider`, STORYBOOK_ADDON_TEST_CHANNEL = "STORYBOOK_ADDON_TEST_CHANNEL";
|
|
22
|
-
var DOCUMENTATION_LINK3 = "writing-tests/integrations/vitest-addon", DOCUMENTATION_FATAL_ERROR_LINK = `${DOCUMENTATION_LINK3}#what-happens-if-vitest-itself-has-an-error`, COVERAGE_DIRECTORY = "coverage",
|
|
22
|
+
var DOCUMENTATION_LINK3 = "writing-tests/integrations/vitest-addon", DOCUMENTATION_FATAL_ERROR_LINK = `${DOCUMENTATION_LINK3}#what-happens-if-vitest-itself-has-an-error`, COVERAGE_DIRECTORY = "coverage", SUPPORTED_FRAMEWORKS = [
|
|
23
|
+
"@storybook/nextjs",
|
|
24
|
+
"@storybook/nextjs-vite",
|
|
25
|
+
"@storybook/react-vite",
|
|
26
|
+
"@storybook/preact-vite",
|
|
27
|
+
"@storybook/svelte-vite",
|
|
28
|
+
"@storybook/vue3-vite",
|
|
29
|
+
"@storybook/html-vite",
|
|
30
|
+
"@storybook/web-components-vite",
|
|
31
|
+
"@storybook/sveltekit",
|
|
32
|
+
"@storybook/react-native-web-vite"
|
|
33
|
+
], storeOptions = {
|
|
23
34
|
id: ADDON_ID3,
|
|
24
35
|
initialState: {
|
|
25
36
|
config: {
|
|
@@ -62,6 +73,7 @@ export {
|
|
|
62
73
|
STORYBOOK_ADDON_TEST_CHANNEL,
|
|
63
74
|
DOCUMENTATION_LINK3 as DOCUMENTATION_LINK,
|
|
64
75
|
COVERAGE_DIRECTORY,
|
|
76
|
+
SUPPORTED_FRAMEWORKS,
|
|
65
77
|
storeOptions,
|
|
66
78
|
STORE_CHANNEL_EVENT_NAME,
|
|
67
79
|
STATUS_STORE_CHANNEL_EVENT_NAME,
|
package/dist/manager.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
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
|
require_gte
|
|
14
|
-
} from "../_node-chunks/chunk-
|
|
14
|
+
} from "../_node-chunks/chunk-KR7B4BKU.js";
|
|
15
15
|
import {
|
|
16
16
|
__commonJS,
|
|
17
17
|
__require,
|
|
18
18
|
__toESM
|
|
19
|
-
} from "../_node-chunks/chunk-
|
|
19
|
+
} from "../_node-chunks/chunk-KAKLJ54A.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,35 +1,36 @@
|
|
|
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
|
log
|
|
14
|
-
} from "../_node-chunks/chunk-
|
|
14
|
+
} from "../_node-chunks/chunk-JDY32SOO.js";
|
|
15
15
|
import {
|
|
16
|
-
any
|
|
17
|
-
|
|
16
|
+
any,
|
|
17
|
+
errorToErrorLike
|
|
18
|
+
} from "../_node-chunks/chunk-LSQEC7U2.js";
|
|
18
19
|
import {
|
|
19
20
|
ADDON_ID,
|
|
20
21
|
COVERAGE_DIRECTORY,
|
|
21
22
|
STATUS_TYPE_ID_A11Y,
|
|
22
23
|
STATUS_TYPE_ID_COMPONENT_TEST,
|
|
23
24
|
storeOptions
|
|
24
|
-
} from "../_node-chunks/chunk-
|
|
25
|
-
import "../_node-chunks/chunk-
|
|
25
|
+
} from "../_node-chunks/chunk-UO6Q7EWR.js";
|
|
26
|
+
import "../_node-chunks/chunk-C27EWYAE.js";
|
|
26
27
|
import {
|
|
27
28
|
dirname,
|
|
28
29
|
join,
|
|
29
30
|
normalize,
|
|
30
31
|
path
|
|
31
|
-
} from "../_node-chunks/chunk-
|
|
32
|
-
import "../_node-chunks/chunk-
|
|
32
|
+
} from "../_node-chunks/chunk-2KF2VISY.js";
|
|
33
|
+
import "../_node-chunks/chunk-KAKLJ54A.js";
|
|
33
34
|
|
|
34
35
|
// src/node/vitest.ts
|
|
35
36
|
import process2 from "node:process";
|
|
@@ -105,17 +106,6 @@ function throttle(func, throttleMs, { signal, edges = ["leading", "trailing"] }
|
|
|
105
106
|
return throttled.cancel = debounced.cancel, throttled.flush = debounced.flush, throttled;
|
|
106
107
|
}
|
|
107
108
|
|
|
108
|
-
// src/utils.ts
|
|
109
|
-
function errorToErrorLike(error) {
|
|
110
|
-
return {
|
|
111
|
-
message: error.message,
|
|
112
|
-
name: error.name,
|
|
113
|
-
// avoid duplicating the error message in the stack trace
|
|
114
|
-
stack: error.stack?.replace(error.message, ""),
|
|
115
|
-
cause: error.cause && error.cause instanceof Error ? errorToErrorLike(error.cause) : void 0
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
|
|
119
109
|
// src/node/vitest-manager.ts
|
|
120
110
|
import { existsSync } from "node:fs";
|
|
121
111
|
import { getProjectRoot, resolvePathInStorybookCache } from "storybook/internal/common";
|