vitest-config-silverwind 10.4.2 → 10.5.0
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/index.js +4 -3
- package/dist/vitest.setup.js +2 -0
- package/package.json +12 -12
package/dist/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import { accessSync, constants } from "node:fs";
|
|
|
4
4
|
import { readFile } from "node:fs/promises";
|
|
5
5
|
|
|
6
6
|
//#region node_modules/vite-string-plugin/dist/index.js
|
|
7
|
+
/** Vite plugin to import files as string */
|
|
7
8
|
const stringPlugin = ({ match = /\.(svg|md|xml|txt)$/i } = {}) => ({
|
|
8
9
|
name: "vite-string-plugin",
|
|
9
10
|
enforce: "pre",
|
|
@@ -42,7 +43,7 @@ function dedupePlugins(libPlugins, userPlugins) {
|
|
|
42
43
|
}
|
|
43
44
|
const setupFileJs = "vitest.setup.js";
|
|
44
45
|
const setupFileTs = "vitest.setup.ts";
|
|
45
|
-
function base({ url, test: { setupFiles = []
|
|
46
|
+
function base({ url, test: { setupFiles = [], ...otherTest } = {}, plugins = [], ...other }) {
|
|
46
47
|
let setupFile = "";
|
|
47
48
|
for (const file of [setupFileJs, setupFileTs]) try {
|
|
48
49
|
const path = fileURLToPath(new URL(file, import.meta.url));
|
|
@@ -74,14 +75,14 @@ function base({ url, test: { setupFiles = [],...otherTest } = {}, plugins = [],.
|
|
|
74
75
|
...other
|
|
75
76
|
};
|
|
76
77
|
}
|
|
77
|
-
const frontend = ({ test = {}
|
|
78
|
+
const frontend = ({ test = {}, ...other } = defaultConfig) => base({
|
|
78
79
|
test: {
|
|
79
80
|
environment: "happy-dom",
|
|
80
81
|
...test
|
|
81
82
|
},
|
|
82
83
|
...other
|
|
83
84
|
});
|
|
84
|
-
const backend = ({ test = {}
|
|
85
|
+
const backend = ({ test = {}, ...other } = defaultConfig) => base({
|
|
85
86
|
test: {
|
|
86
87
|
environment: "node",
|
|
87
88
|
...test
|
package/dist/vitest.setup.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vitest-config-silverwind",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.5.0",
|
|
4
4
|
"description": "Shared vitest configuration",
|
|
5
5
|
"author": "silverwind <me@silverwind.io>",
|
|
6
6
|
"repository": "silverwind/vitest-config-silverwind",
|
|
@@ -20,19 +20,19 @@
|
|
|
20
20
|
"jest-extended": "7.0.0"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@types/node": "
|
|
24
|
-
"eslint": "9.39.
|
|
25
|
-
"eslint-config-silverwind": "
|
|
26
|
-
"js-yaml": "4.1.
|
|
27
|
-
"tsdown": "0.
|
|
28
|
-
"tsdown-config-silverwind": "1.
|
|
23
|
+
"@types/node": "25.0.2",
|
|
24
|
+
"eslint": "9.39.2",
|
|
25
|
+
"eslint-config-silverwind": "114.0.0",
|
|
26
|
+
"js-yaml": "4.1.1",
|
|
27
|
+
"tsdown": "0.18.0",
|
|
28
|
+
"tsdown-config-silverwind": "1.6.1",
|
|
29
29
|
"typescript": "5.9.3",
|
|
30
|
-
"typescript-config-silverwind": "
|
|
31
|
-
"updates": "
|
|
32
|
-
"versions": "14.0.
|
|
30
|
+
"typescript-config-silverwind": "14.0.0",
|
|
31
|
+
"updates": "17.0.7",
|
|
32
|
+
"versions": "14.0.3",
|
|
33
33
|
"vite-plugin-dts": "4.5.4",
|
|
34
|
-
"vite-string-plugin": "^1.4.
|
|
35
|
-
"vitest": "4.0.
|
|
34
|
+
"vite-string-plugin": "^1.4.9",
|
|
35
|
+
"vitest": "4.0.15"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"happy-dom": "*"
|