@sablier/devkit 1.6.0 → 1.6.1
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/package.json +4 -7
- package/vitest/{index.ts → base.js} +13 -10
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Configuration files and reusable scripts for Sablier repositories",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"version": "1.6.
|
|
6
|
+
"version": "1.6.1",
|
|
7
7
|
"author": {
|
|
8
8
|
"name": "Sablier Labs Ltd",
|
|
9
9
|
"url": "https://sablier.com"
|
|
@@ -31,10 +31,7 @@
|
|
|
31
31
|
"./tsconfig/base": "./tsconfig/base.json",
|
|
32
32
|
"./tsconfig/build": "./tsconfig/build.json",
|
|
33
33
|
"./tsconfig/next": "./tsconfig/next.json",
|
|
34
|
-
"./vitest":
|
|
35
|
-
"import": "./vitest/index.js",
|
|
36
|
-
"types": "./vitest/index.d.ts"
|
|
37
|
-
}
|
|
34
|
+
"./vitest": "./vitest/base.js"
|
|
38
35
|
},
|
|
39
36
|
"engines": {
|
|
40
37
|
"node": ">=20"
|
|
@@ -42,9 +39,9 @@
|
|
|
42
39
|
"files": [
|
|
43
40
|
"biome/",
|
|
44
41
|
"just/",
|
|
45
|
-
".prettierrc.json",
|
|
46
42
|
"tsconfig/",
|
|
47
|
-
"vitest/"
|
|
43
|
+
"vitest/",
|
|
44
|
+
".prettierrc.json"
|
|
48
45
|
],
|
|
49
46
|
"keywords": [
|
|
50
47
|
"biome",
|
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { defineConfig } from "vitest/config";
|
|
1
|
+
import { defineConfig, mergeConfig } from "vitest/config";
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
3
|
+
/**
|
|
4
|
+
* @typedef {Object} DevkitVitestOptions
|
|
5
|
+
* @property {"node" | "jsdom" | "happy-dom"} [environment]
|
|
6
|
+
* @property {string[]} [setupFiles]
|
|
7
|
+
* @property {boolean} [coverage]
|
|
8
|
+
*/
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
/**
|
|
11
|
+
* @param {DevkitVitestOptions} [options]
|
|
12
|
+
*/
|
|
13
|
+
export function defineDevkitConfig(options = {}) {
|
|
11
14
|
const isCI = !!process.env.CI;
|
|
12
15
|
|
|
13
|
-
const baseConfig
|
|
16
|
+
const baseConfig = {
|
|
14
17
|
test: {
|
|
15
18
|
coverage: options.coverage ? { provider: "v8" } : undefined,
|
|
16
19
|
environment: options.environment ?? "node",
|
|
@@ -26,4 +29,4 @@ export function defineDevkitConfig(options: DevkitVitestOptions = {}) {
|
|
|
26
29
|
}
|
|
27
30
|
|
|
28
31
|
// Re-export for merging with existing vite configs
|
|
29
|
-
export { mergeConfig }
|
|
32
|
+
export { mergeConfig };
|