@layerzerolabs/vitest-configuration 0.2.91
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 +15 -0
- package/.turbo/turbo-lint.log +8 -0
- package/.turbo/turbo-test.log +18 -0
- package/LICENSE +23 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/package.json +44 -0
- package/src/index.ts +18 -0
- package/test/index.test.ts +20 -0
- package/tsconfig.json +20 -0
- package/tsconfig.test.json +10 -0
- package/tsup.config.ts +8 -0
- package/vitest.config.ts +3 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
WARN Issue while reading "/home/runner/work/monorepo-internal/monorepo-internal/.npmrc". Failed to replace env in config: ${NPM_TOKEN}
|
|
2
|
+
|
|
3
|
+
> @layerzerolabs/vitest-configuration@0.0.0 build /home/runner/work/monorepo-internal/monorepo-internal/tooling-configs/vitest
|
|
4
|
+
> tsup
|
|
5
|
+
|
|
6
|
+
[34mCLI[39m Building entry: src/index.ts
|
|
7
|
+
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
8
|
+
[34mCLI[39m tsup v8.5.1
|
|
9
|
+
[34mCLI[39m Using tsup config: /home/runner/work/monorepo-internal/monorepo-internal/tooling-configs/vitest/tsup.config.ts
|
|
10
|
+
[34mCLI[39m Target: ES2023
|
|
11
|
+
[34mCLI[39m Cleaning output folder
|
|
12
|
+
[34mESM[39m Build start
|
|
13
|
+
[32mESM[39m [1mdist/index.js [22m[32m627.00 B[39m
|
|
14
|
+
[32mESM[39m [1mdist/index.js.map [22m[32m1.13 KB[39m
|
|
15
|
+
[32mESM[39m ⚡️ Build success in 68ms
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
|
|
2
|
+
> @layerzerolabs/vitest-configuration@0.0.0 lint /home/runner/work/monorepo-internal/monorepo-internal/tooling-configs/vitest
|
|
3
|
+
> eslint . --max-warnings 0 || (eslint . --fix --max-warnings 0 && false)
|
|
4
|
+
|
|
5
|
+
(node:77570) [MODULE_TYPELESS_PACKAGE_JSON] Warning: Module type of file:///home/runner/work/monorepo-internal/monorepo-internal/eslint.config.js?mtime=1778726509364 is not specified and it doesn't parse as CommonJS.
|
|
6
|
+
Reparsing as ES module because module syntax was detected. This incurs a performance overhead.
|
|
7
|
+
To eliminate this warning, add "type": "module" to /home/runner/work/monorepo-internal/monorepo-internal/package.json.
|
|
8
|
+
(Use `node --trace-warnings ...` to show where the warning was created)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
> @layerzerolabs/vitest-configuration@0.0.0 test /home/runner/work/monorepo-internal/monorepo-internal/tooling-configs/vitest
|
|
3
|
+
> vitest
|
|
4
|
+
|
|
5
|
+
[33mTesting types with tsc and vue-tsc is an experimental feature.
|
|
6
|
+
Breaking changes might not follow SemVer, please pin Vitest's version when using it.[39m
|
|
7
|
+
|
|
8
|
+
[1m[46m RUN [49m[22m [36mv3.2.4 [39m[90m/home/runner/work/monorepo-internal/monorepo-internal/tooling-configs/vitest[39m
|
|
9
|
+
|
|
10
|
+
[32m✓[39m test/index.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
11
|
+
[32m✓[39m [44m[1m TS [22m[49m test/index.test.ts [2m([22m[2m2 tests[22m[2m)[22m
|
|
12
|
+
|
|
13
|
+
[2m Test Files [22m [1m[32m2 passed[39m[22m[90m (2)[39m
|
|
14
|
+
[2m Tests [22m [1m[32m4 passed[39m[22m[90m (4)[39m
|
|
15
|
+
[2mType Errors [22m [2mno errors[22m
|
|
16
|
+
[2m Start at [22m 02:45:00
|
|
17
|
+
[2m Duration [22m 1.45s[2m (transform 21ms, setup 0ms, collect 124ms, tests 3ms, environment 0ms, prepare 138ms, typecheck 1.22s)[22m
|
|
18
|
+
|
package/LICENSE
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
Copyright (c) 2026 - LayerZero Labs Ltd.
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any
|
|
4
|
+
person obtaining a copy of this software and associated
|
|
5
|
+
documentation files (the "Software"), to deal in the
|
|
6
|
+
Software without restriction, including without
|
|
7
|
+
limitation the rights to use, copy, modify, merge,
|
|
8
|
+
publish, distribute, sublicense, and/or sell copies of
|
|
9
|
+
the Software, and to permit persons to whom the Software
|
|
10
|
+
is furnished to do so, subject to the following
|
|
11
|
+
conditions:
|
|
12
|
+
The above copyright notice and this permission notice
|
|
13
|
+
shall be included in all copies or substantial portions
|
|
14
|
+
of the Software.
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
|
|
16
|
+
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
|
|
17
|
+
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
|
18
|
+
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
|
|
19
|
+
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
20
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
|
22
|
+
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
23
|
+
DEALINGS IN THE SOFTWARE.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAGpD,eAAO,MAAM,YAAY,GAAI,SAAQ,cAAmB,KAAG,cActD,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { mergeConfig, defineConfig as defineConfig$1 } from 'vitest/config';
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
5
|
+
var defineConfig = /* @__PURE__ */ __name((config = {}) => mergeConfig(defineConfig$1({
|
|
6
|
+
test: {
|
|
7
|
+
passWithNoTests: true,
|
|
8
|
+
typecheck: {
|
|
9
|
+
enabled: true,
|
|
10
|
+
include: [
|
|
11
|
+
"**/*.test.ts{,x}"
|
|
12
|
+
],
|
|
13
|
+
tsconfig: "tsconfig.test.json"
|
|
14
|
+
},
|
|
15
|
+
watch: false
|
|
16
|
+
}
|
|
17
|
+
}), defineConfig$1(config)), "defineConfig");
|
|
18
|
+
|
|
19
|
+
export { defineConfig };
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":["defineConfig","config","mergeConfig","defineVitestConfig","test","passWithNoTests","typecheck","enabled","include","tsconfig","watch"],"mappings":";;;;AAGO,IAAMA,+BAAe,MAAA,CAAA,CAACC,MAAAA,GAAyB,EAAC,KACnDC,YACIC,cAAAA,CAAmB;EACfC,IAAAA,EAAM;IACFC,eAAAA,EAAiB,IAAA;IACjBC,SAAAA,EAAW;MACPC,OAAAA,EAAS,IAAA;MACTC,OAAAA,EAAS;AAAC,QAAA;;MACVC,QAAAA,EAAU;AACd,KAAA;IACAC,KAAAA,EAAO;AACX;AACJ,CAAA,CAAA,EACAP,cAAAA,CAAmBF,MAAAA,CAAAA,CAAAA,EAbC,cAAA","file":"index.js","sourcesContent":["import type { ViteUserConfig } from 'vitest/config';\nimport { defineConfig as defineVitestConfig, mergeConfig } from 'vitest/config';\n\nexport const defineConfig = (config: ViteUserConfig = {}): ViteUserConfig =>\n mergeConfig(\n defineVitestConfig({\n test: {\n passWithNoTests: true,\n typecheck: {\n enabled: true,\n include: ['**/*.test.ts{,x}'],\n tsconfig: 'tsconfig.test.json',\n },\n watch: false,\n },\n }),\n defineVitestConfig(config),\n );\n"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@layerzerolabs/vitest-configuration",
|
|
3
|
+
"version": "0.2.91",
|
|
4
|
+
"private": false,
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"exports": {
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"import": "./dist/index.js",
|
|
10
|
+
"default": "./dist/index.js"
|
|
11
|
+
},
|
|
12
|
+
"main": "./dist/index.js",
|
|
13
|
+
"module": "./dist/index.js",
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"tsup": "^8.4.0",
|
|
17
|
+
"typescript": "^5.8.2",
|
|
18
|
+
"vitest": "^3.2.3",
|
|
19
|
+
"@layerzerolabs/typescript-configuration": "0.2.91",
|
|
20
|
+
"@layerzerolabs/tsup-configuration": "0.2.91"
|
|
21
|
+
},
|
|
22
|
+
"peerDependencies": {
|
|
23
|
+
"vitest": "^3.2.3"
|
|
24
|
+
},
|
|
25
|
+
"publishConfig": {
|
|
26
|
+
"access": "public",
|
|
27
|
+
"registry": "https://registry.npmjs.org/"
|
|
28
|
+
},
|
|
29
|
+
"externalRepoConfig": {
|
|
30
|
+
"targets": [
|
|
31
|
+
"audit-external",
|
|
32
|
+
"monorepo-external",
|
|
33
|
+
"console-pen-test",
|
|
34
|
+
"onesig-client",
|
|
35
|
+
"layerzero-ver"
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
"scripts": {
|
|
39
|
+
"build": "tsup",
|
|
40
|
+
"clean": "rm -rf dist",
|
|
41
|
+
"lint": "eslint . --max-warnings 0 || (eslint . --fix --max-warnings 0 && false)",
|
|
42
|
+
"test": "vitest"
|
|
43
|
+
}
|
|
44
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ViteUserConfig } from 'vitest/config';
|
|
2
|
+
import { defineConfig as defineVitestConfig, mergeConfig } from 'vitest/config';
|
|
3
|
+
|
|
4
|
+
export const defineConfig = (config: ViteUserConfig = {}): ViteUserConfig =>
|
|
5
|
+
mergeConfig(
|
|
6
|
+
defineVitestConfig({
|
|
7
|
+
test: {
|
|
8
|
+
passWithNoTests: true,
|
|
9
|
+
typecheck: {
|
|
10
|
+
enabled: true,
|
|
11
|
+
include: ['**/*.test.ts{,x}'],
|
|
12
|
+
tsconfig: 'tsconfig.test.json',
|
|
13
|
+
},
|
|
14
|
+
watch: false,
|
|
15
|
+
},
|
|
16
|
+
}),
|
|
17
|
+
defineVitestConfig(config),
|
|
18
|
+
);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
|
|
3
|
+
import { defineConfig } from '../src/index.js';
|
|
4
|
+
|
|
5
|
+
describe(defineConfig, () => {
|
|
6
|
+
it('references the static typecheck tsconfig', () => {
|
|
7
|
+
expect(defineConfig().test?.typecheck?.tsconfig).toBe('tsconfig.test.json');
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
it('merges custom config', () => {
|
|
11
|
+
const config = defineConfig({
|
|
12
|
+
test: {
|
|
13
|
+
sequence: { concurrent: true },
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
expect(config.test?.typecheck?.tsconfig).toBe('tsconfig.test.json');
|
|
18
|
+
expect(config.test?.sequence?.concurrent).toBe(true);
|
|
19
|
+
});
|
|
20
|
+
});
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "@layerzerolabs/typescript-configuration/tsconfig.base.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"rootDir": "./src",
|
|
5
|
+
"outDir": "./dist",
|
|
6
|
+
"strictPropertyInitialization": false,
|
|
7
|
+
"noUnusedLocals": false,
|
|
8
|
+
"noUnusedParameters": false,
|
|
9
|
+
"jsx": "react-jsx"
|
|
10
|
+
},
|
|
11
|
+
"exclude": [
|
|
12
|
+
"node_modules",
|
|
13
|
+
"**/__mocks__/*",
|
|
14
|
+
"**/__tests__/*",
|
|
15
|
+
"**/*.spec.ts",
|
|
16
|
+
"**/*.test.ts",
|
|
17
|
+
"dist"
|
|
18
|
+
],
|
|
19
|
+
"include": ["src/**/*"]
|
|
20
|
+
}
|
package/tsup.config.ts
ADDED
package/vitest.config.ts
ADDED