@layerzerolabs/vitest-configuration 1.2.25 → 1.2.26
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/.turbo/turbo-build.log +3 -3
- package/.turbo/turbo-lint.log +1 -1
- package/.turbo/turbo-test.log +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +22 -9
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/index.ts +29 -7
package/.turbo/turbo-build.log
CHANGED
|
@@ -10,6 +10,6 @@
|
|
|
10
10
|
[34mCLI[39m Target: ES2023
|
|
11
11
|
[34mCLI[39m Cleaning output folder
|
|
12
12
|
[34mESM[39m Build start
|
|
13
|
-
[32mESM[39m [1mdist/index.js [22m[
|
|
14
|
-
[32mESM[39m [1mdist/index.js.map [22m[
|
|
15
|
-
[32mESM[39m ⚡️ Build success in
|
|
13
|
+
[32mESM[39m [1mdist/index.js [22m[32m935.00 B[39m
|
|
14
|
+
[32mESM[39m [1mdist/index.js.map [22m[32m2.29 KB[39m
|
|
15
|
+
[32mESM[39m ⚡️ Build success in 47ms
|
package/.turbo/turbo-lint.log
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
> @layerzerolabs/vitest-configuration@0.0.0 lint /home/runner/work/monorepo-internal/monorepo-internal/tooling-configs/vitest
|
|
3
3
|
> eslint . --max-warnings 0 || (eslint . --fix --max-warnings 0 && false)
|
|
4
4
|
|
|
5
|
-
(node:
|
|
5
|
+
(node:59144) [MODULE_TYPELESS_PACKAGE_JSON] Warning: Module type of file:///home/runner/work/monorepo-internal/monorepo-internal/eslint.config.js?mtime=1785546631907 is not specified and it doesn't parse as CommonJS.
|
|
6
6
|
Reparsing as ES module because module syntax was detected. This incurs a performance overhead.
|
|
7
7
|
To eliminate this warning, add "type": "module" to /home/runner/work/monorepo-internal/monorepo-internal/package.json.
|
|
8
8
|
(Use `node --trace-warnings ...` to show where the warning was created)
|
package/.turbo/turbo-test.log
CHANGED
|
@@ -13,6 +13,6 @@ Breaking changes might not follow SemVer, please pin Vitest's version when using
|
|
|
13
13
|
[2m Test Files [22m [1m[32m2 passed[39m[22m[90m (2)[39m
|
|
14
14
|
[2m Tests [22m [1m[32m4 passed[39m[22m[90m (4)[39m
|
|
15
15
|
[2mType Errors [22m [2mno errors[22m
|
|
16
|
-
[2m Start at [22m
|
|
17
|
-
[2m Duration [22m 1.
|
|
16
|
+
[2m Start at [22m 01:12:22
|
|
17
|
+
[2m Duration [22m 1.37s[2m (transform 13ms, setup 0ms, collect 104ms, tests 3ms, environment 0ms, prepare 117ms, typecheck 1.19s)[22m
|
|
18
18
|
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AASpD,eAAO,MAAM,YAAY,GAAI,sBAAqB,cAAmB,KAAG,cA8BnE,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -2,19 +2,32 @@ import { mergeConfig, defineConfig as defineConfig$1 } from 'vitest/config';
|
|
|
2
2
|
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
5
|
-
var
|
|
5
|
+
var typecheck = {
|
|
6
|
+
enabled: true,
|
|
7
|
+
include: [
|
|
8
|
+
"**/*.test.ts{,x}"
|
|
9
|
+
],
|
|
10
|
+
tsconfig: "tsconfig.test.json"
|
|
11
|
+
};
|
|
12
|
+
var defineConfig = /* @__PURE__ */ __name(({ test, ...config } = {}) => mergeConfig(defineConfig$1({
|
|
6
13
|
test: {
|
|
7
14
|
passWithNoTests: true,
|
|
8
|
-
typecheck
|
|
9
|
-
enabled: true,
|
|
10
|
-
include: [
|
|
11
|
-
"**/*.test.ts{,x}"
|
|
12
|
-
],
|
|
13
|
-
tsconfig: "tsconfig.test.json"
|
|
14
|
-
},
|
|
15
|
+
typecheck,
|
|
15
16
|
watch: false
|
|
16
17
|
}
|
|
17
|
-
}), defineConfig$1(
|
|
18
|
+
}), defineConfig$1({
|
|
19
|
+
...config,
|
|
20
|
+
test: {
|
|
21
|
+
...test,
|
|
22
|
+
projects: test?.projects ? test.projects.map((project) => typeof project === "string" || typeof project === "function" || project instanceof Promise ? project : {
|
|
23
|
+
...project,
|
|
24
|
+
test: {
|
|
25
|
+
...project.test,
|
|
26
|
+
typecheck
|
|
27
|
+
}
|
|
28
|
+
}) : void 0
|
|
29
|
+
}
|
|
30
|
+
})), "defineConfig");
|
|
18
31
|
|
|
19
32
|
export { defineConfig };
|
|
20
33
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":["defineConfig","config","mergeConfig","defineVitestConfig","
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":["typecheck","enabled","include","tsconfig","defineConfig","test","config","mergeConfig","defineVitestConfig","passWithNoTests","watch","projects","map","project","Promise","undefined"],"mappings":";;;;AAGA,IAAMA,SAAAA,GAAY;EACdC,OAAAA,EAAS,IAAA;EACTC,OAAAA,EAAS;AAAC,IAAA;;EACVC,QAAAA,EAAU;AACd,CAAA;AAEO,IAAMC,YAAAA,mBAAe,MAAA,CAAA,CAAC,EAAEC,IAAAA,EAAM,GAAGC,QAAAA,GAA2B,EAAC,KAChEC,WAAAA,CACIC,cAAAA,CAAmB;EACfH,IAAAA,EAAM;IACFI,eAAAA,EAAiB,IAAA;AACjBT,IAAAA,SAAAA;IACAU,KAAAA,EAAO;AACX;AACJ,CAAA,GACAF,cAAAA,CAAmB;EACf,GAAGF,MAAAA;EACHD,IAAAA,EAAM;IACF,GAAGA,IAAAA;AACHM,IAAAA,QAAAA,EAAUN,IAAAA,EAAMM,QAAAA,GACVN,IAAAA,CAAKM,QAAAA,CAASC,IAAI,CAACC,OAAAA,KACf,OAAOA,OAAAA,KAAY,YACnB,OAAOA,OAAAA,KAAY,UAAA,IACnBA,OAAAA,YAAmBC,UACbD,OAAAA,GACA;MACI,GAAGA,OAAAA;MACHR,IAAAA,EAAM;AACF,QAAA,GAAGQ,OAAAA,CAAQR,IAAAA;AACXL,QAAAA;AACJ;AACJ,KAAA,CAAA,GAEVe;AACV;AACJ,CAAA,CAAA,CAAA,EA7BoB,cAAA","file":"index.js","sourcesContent":["import type { ViteUserConfig } from 'vitest/config';\nimport { defineConfig as defineVitestConfig, mergeConfig } from 'vitest/config';\n\nconst typecheck = {\n enabled: true,\n include: ['**/*.test.ts{,x}'],\n tsconfig: 'tsconfig.test.json',\n};\n\nexport const defineConfig = ({ test, ...config }: ViteUserConfig = {}): ViteUserConfig =>\n mergeConfig(\n defineVitestConfig({\n test: {\n passWithNoTests: true,\n typecheck,\n watch: false,\n },\n }),\n defineVitestConfig({\n ...config,\n test: {\n ...test,\n projects: test?.projects\n ? test.projects.map((project) =>\n typeof project === 'string' ||\n typeof project === 'function' ||\n project instanceof Promise\n ? project\n : {\n ...project,\n test: {\n ...project.test,\n typecheck,\n },\n },\n )\n : undefined,\n },\n }),\n );\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@layerzerolabs/vitest-configuration",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.26",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"tsup": "^8.4.0",
|
|
17
17
|
"typescript": "^6.0.3",
|
|
18
18
|
"vitest": "^3.2.6",
|
|
19
|
-
"@layerzerolabs/tsup-configuration": "1.2.
|
|
20
|
-
"@layerzerolabs/typescript-configuration": "1.2.
|
|
19
|
+
"@layerzerolabs/tsup-configuration": "1.2.26",
|
|
20
|
+
"@layerzerolabs/typescript-configuration": "1.2.26"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"vitest": "^3.2.6"
|
package/src/index.ts
CHANGED
|
@@ -1,18 +1,40 @@
|
|
|
1
1
|
import type { ViteUserConfig } from 'vitest/config';
|
|
2
2
|
import { defineConfig as defineVitestConfig, mergeConfig } from 'vitest/config';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
const typecheck = {
|
|
5
|
+
enabled: true,
|
|
6
|
+
include: ['**/*.test.ts{,x}'],
|
|
7
|
+
tsconfig: 'tsconfig.test.json',
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const defineConfig = ({ test, ...config }: ViteUserConfig = {}): ViteUserConfig =>
|
|
5
11
|
mergeConfig(
|
|
6
12
|
defineVitestConfig({
|
|
7
13
|
test: {
|
|
8
14
|
passWithNoTests: true,
|
|
9
|
-
typecheck
|
|
10
|
-
enabled: true,
|
|
11
|
-
include: ['**/*.test.ts{,x}'],
|
|
12
|
-
tsconfig: 'tsconfig.test.json',
|
|
13
|
-
},
|
|
15
|
+
typecheck,
|
|
14
16
|
watch: false,
|
|
15
17
|
},
|
|
16
18
|
}),
|
|
17
|
-
defineVitestConfig(
|
|
19
|
+
defineVitestConfig({
|
|
20
|
+
...config,
|
|
21
|
+
test: {
|
|
22
|
+
...test,
|
|
23
|
+
projects: test?.projects
|
|
24
|
+
? test.projects.map((project) =>
|
|
25
|
+
typeof project === 'string' ||
|
|
26
|
+
typeof project === 'function' ||
|
|
27
|
+
project instanceof Promise
|
|
28
|
+
? project
|
|
29
|
+
: {
|
|
30
|
+
...project,
|
|
31
|
+
test: {
|
|
32
|
+
...project.test,
|
|
33
|
+
typecheck,
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
)
|
|
37
|
+
: undefined,
|
|
38
|
+
},
|
|
39
|
+
}),
|
|
18
40
|
);
|