@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.
@@ -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
+ CLI Building entry: src/index.ts
7
+ CLI Using tsconfig: tsconfig.json
8
+ CLI tsup v8.5.1
9
+ CLI Using tsup config: /home/runner/work/monorepo-internal/monorepo-internal/tooling-configs/vitest/tsup.config.ts
10
+ CLI Target: ES2023
11
+ CLI Cleaning output folder
12
+ ESM Build start
13
+ ESM dist/index.js 627.00 B
14
+ ESM dist/index.js.map 1.13 KB
15
+ ESM ⚡️ 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
+ Testing 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.
7
+
8
+  RUN  v3.2.4 /home/runner/work/monorepo-internal/monorepo-internal/tooling-configs/vitest
9
+
10
+ ✓ test/index.test.ts (2 tests) 3ms
11
+ ✓  TS  test/index.test.ts (2 tests)
12
+
13
+  Test Files  2 passed (2)
14
+  Tests  4 passed (4)
15
+ Type Errors  no errors
16
+  Start at  02:45:00
17
+  Duration  1.45s (transform 21ms, setup 0ms, collect 124ms, tests 3ms, environment 0ms, prepare 138ms, typecheck 1.22s)
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.
@@ -0,0 +1,3 @@
1
+ import type { ViteUserConfig } from 'vitest/config';
2
+ export declare const defineConfig: (config?: ViteUserConfig) => ViteUserConfig;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -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
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "incremental": false,
5
+ "noEmit": true,
6
+ "rootDir": "."
7
+ },
8
+ "include": ["**/*"],
9
+ "exclude": ["dist", "node_modules"]
10
+ }
package/tsup.config.ts ADDED
@@ -0,0 +1,8 @@
1
+ import { defineConfig } from 'tsup';
2
+
3
+ import { createPackageTsupConfig } from '@layerzerolabs/tsup-configuration';
4
+
5
+ export default defineConfig(({ watch }) => ({
6
+ ...createPackageTsupConfig(),
7
+ clean: !watch,
8
+ }));
@@ -0,0 +1,3 @@
1
+ import { defineConfig } from './src';
2
+
3
+ export default defineConfig();