@naturalcycles/dev-lib 18.1.2 → 18.1.4

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.
@@ -1,5 +1,7 @@
1
1
  import { defineVitestConfig } from '@naturalcycles/dev-lib/cfg/vitest.config.js'
2
2
 
3
3
  export default defineVitestConfig({
4
- // override here
4
+ test: {
5
+ // override here
6
+ },
5
7
  })
@@ -1,3 +1,4 @@
1
+ import type { ViteUserConfig } from 'vitest/config'
1
2
  import type { InlineConfig } from 'vitest/node'
2
3
 
3
4
  /**
@@ -10,6 +11,6 @@ import type { InlineConfig } from 'vitest/node'
10
11
  })
11
12
 
12
13
  */
13
- export function defineVitestConfig(config?: Partial<InlineConfig>): InlineConfig
14
+ export function defineVitestConfig(config?: Partial<ViteUserConfig>): ViteUserConfig
14
15
 
15
16
  export const sharedConfig: InlineConfig
@@ -37,9 +37,10 @@ if (silent) {
37
37
  */
38
38
  export function defineVitestConfig(config) {
39
39
  const mergedConfig = defineConfig({
40
+ ...config,
40
41
  test: {
41
42
  ...sharedConfig,
42
- ...config,
43
+ ...config?.test,
43
44
  },
44
45
  })
45
46
 
@@ -104,7 +105,7 @@ export const sharedConfig = {
104
105
  '**/__exclude/**',
105
106
  'scripts/**',
106
107
  'public/**',
107
- 'src/index.*',
108
+ 'src/index.{ts,tsx}',
108
109
  'src/test/**',
109
110
  'src/typings/**',
110
111
  'src/{env,environment,environments}/**',
@@ -114,9 +115,9 @@ export const sharedConfig = {
114
115
  '**/*.script.*',
115
116
  '**/*.module.*',
116
117
  '**/*.mock.*',
117
- '**/*.page.*',
118
- '**/*.component.*',
119
- '**/*.modal.*',
118
+ '**/*.page.{ts,tsx}',
119
+ '**/*.component.{ts,tsx}',
120
+ '**/*.modal.{ts,tsx}',
120
121
  ],
121
122
  },
122
123
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@naturalcycles/dev-lib",
3
3
  "type": "module",
4
- "version": "18.1.2",
4
+ "version": "18.1.4",
5
5
  "scripts": {
6
6
  "prepare": "husky",
7
7
  "tsx-debug": "tsx scripts/testScript.ts",