@apitree.cz/vitest-config 0.1.0 → 0.2.0-next.0c823f9
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/README.md +14 -5
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/nestjs.d.ts +2 -0
- package/dist/nestjs.js +7 -0
- package/dist/nestjs.js.map +1 -0
- package/dist/react.d.ts +1 -1
- package/dist/react.js +1 -1
- package/dist/react.js.map +1 -1
- package/package.json +4 -5
package/README.md
CHANGED
|
@@ -23,13 +23,22 @@ Use one of the following configurations in your `vitest.config.ts`:
|
|
|
23
23
|
### Base
|
|
24
24
|
|
|
25
25
|
```typescript
|
|
26
|
-
export {
|
|
26
|
+
export { base as default } from '@apitree.cz/vitest-config';
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
### React
|
|
30
30
|
|
|
31
31
|
```typescript
|
|
32
|
-
export {
|
|
32
|
+
export { react as default } from '@apitree.cz/vitest-config';
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Nest.js
|
|
36
|
+
|
|
37
|
+
⚠️ _Nest.js projects are CJS by default. This configuration needs to be placed in `vitest.config.mjs` to interpret it as
|
|
38
|
+
ESM._
|
|
39
|
+
|
|
40
|
+
```typescript
|
|
41
|
+
export { nestjs as default } from '@apitree.cz/vitest-config';
|
|
33
42
|
```
|
|
34
43
|
|
|
35
44
|
### Customization
|
|
@@ -37,13 +46,13 @@ export { config as default } from '@apitree.cz/vitest-config/react';
|
|
|
37
46
|
You can customize the configuration with `mergeConfig` function:
|
|
38
47
|
|
|
39
48
|
```typescript
|
|
40
|
-
import {
|
|
49
|
+
import { base } from '@apitree.cz/vitest-config';
|
|
41
50
|
import { mergeConfig } from 'vitest/config';
|
|
42
51
|
import type { UserConfig } from 'vitest/config';
|
|
43
52
|
|
|
44
|
-
export default mergeConfig
|
|
53
|
+
export default mergeConfig(config, {
|
|
45
54
|
// project specific configuration
|
|
46
|
-
});
|
|
55
|
+
} satisfies UserConfig);
|
|
47
56
|
```
|
|
48
57
|
|
|
49
58
|
> See [Options](https://vitest.dev/config/#options) documentation for config reference.
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC"}
|
package/dist/nestjs.d.ts
ADDED
package/dist/nestjs.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nestjs.js","sourceRoot":"","sources":["../src/nestjs.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,cAAc,CAAC;AAE/B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,MAAM,CAAC,MAAM,MAAM,GAAe,WAAW,CAAC,IAAI,EAAE;IAClD,OAAO,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;CAC5B,CAAC,CAAC"}
|
package/dist/react.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const react: import("vite").UserConfig;
|
package/dist/react.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import viteReact from '@vitejs/plugin-react';
|
|
2
2
|
import { defineConfig } from 'vitest/config';
|
|
3
3
|
import { coverage } from './constants.js';
|
|
4
|
-
export const
|
|
4
|
+
export const react = defineConfig({
|
|
5
5
|
plugins: [viteReact()],
|
|
6
6
|
test: {
|
|
7
7
|
environment: 'jsdom',
|
package/dist/react.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.js","sourceRoot":"","sources":["../src/react.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"react.js","sourceRoot":"","sources":["../src/react.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,MAAM,CAAC,MAAM,KAAK,GAAG,YAAY,CAAC;IAChC,OAAO,EAAE,CAAC,SAAS,EAAE,CAAC;IACtB,IAAI,EAAE;QACJ,WAAW,EAAE,OAAO;QACpB,QAAQ,EAAE;YACR,GAAG,QAAQ;YACX,OAAO,EAAE,CAAC,mBAAmB,CAAC;SAC/B;QACD,UAAU,EAAE,CAAC,gBAAgB,CAAC;KAC/B;CACF,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apitree.cz/vitest-config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0-next.0c823f9",
|
|
4
4
|
"description": "Vitest configuration for ApiTree projects.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -9,16 +9,15 @@
|
|
|
9
9
|
},
|
|
10
10
|
"sideEffects": false,
|
|
11
11
|
"type": "module",
|
|
12
|
-
"exports":
|
|
13
|
-
".": "./dist/index.js",
|
|
14
|
-
"./react": "./dist/react.js"
|
|
15
|
-
},
|
|
12
|
+
"exports": "./dist/index.js",
|
|
16
13
|
"files": [
|
|
17
14
|
"dist"
|
|
18
15
|
],
|
|
19
16
|
"dependencies": {
|
|
17
|
+
"@swc/core": "^1.3.95",
|
|
20
18
|
"@vitejs/plugin-react": "^4.1.0",
|
|
21
19
|
"@vitest/coverage-istanbul": "^0.34.6",
|
|
20
|
+
"unplugin-swc": "^1.4.3",
|
|
22
21
|
"vite": "^4.5.0"
|
|
23
22
|
},
|
|
24
23
|
"devDependencies": {
|