@layerzerolabs/vitest-configuration 1.2.69 → 1.2.71
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.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js.map +1 -0
- package/package.json +6 -3
- package/src/index.ts +0 -40
- package/test/index.test.ts +0 -20
- package/tsconfig.json +0 -20
- package/tsconfig.test.json +0 -10
- package/tsup.config.ts +0 -8
- package/vitest.config.ts +0 -3
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;AASpD,eAAO,MAAM,YAAY,GAAI,sBAAqB,cAAmB,KAAG,cA8BnE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
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.71",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -12,9 +12,12 @@
|
|
|
12
12
|
"main": "./dist/index.js",
|
|
13
13
|
"module": "./dist/index.js",
|
|
14
14
|
"types": "./dist/index.d.ts",
|
|
15
|
+
"files": [
|
|
16
|
+
"dist/**/*"
|
|
17
|
+
],
|
|
15
18
|
"devDependencies": {
|
|
16
|
-
"@layerzerolabs/tsup-configuration": "1.2.
|
|
17
|
-
"@layerzerolabs/typescript-configuration": "1.2.
|
|
19
|
+
"@layerzerolabs/tsup-configuration": "1.2.71",
|
|
20
|
+
"@layerzerolabs/typescript-configuration": "1.2.71",
|
|
18
21
|
"tsup": "^8.4.0",
|
|
19
22
|
"typescript": "^6.0.3",
|
|
20
23
|
"vitest": "^4.1.10"
|
package/src/index.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import type { ViteUserConfig } from 'vitest/config';
|
|
2
|
-
import { defineConfig as defineVitestConfig, mergeConfig } from 'vitest/config';
|
|
3
|
-
|
|
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 =>
|
|
11
|
-
mergeConfig(
|
|
12
|
-
defineVitestConfig({
|
|
13
|
-
test: {
|
|
14
|
-
passWithNoTests: true,
|
|
15
|
-
typecheck,
|
|
16
|
-
watch: false,
|
|
17
|
-
},
|
|
18
|
-
}),
|
|
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
|
-
}),
|
|
40
|
-
);
|
package/test/index.test.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
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/tsconfig.test.json
DELETED
package/tsup.config.ts
DELETED
package/vitest.config.ts
DELETED