testing-conventions 0.0.38 → 0.0.40
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/vitest-config.d.ts +1 -0
- package/dist/vitest-config.js +25 -0
- package/dist/vitest-config.js.map +1 -0
- package/package.json +22 -7
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const vitestConfig: import("vite").UserConfig;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { defineConfig } from 'vitest/config';
|
|
2
|
+
// The shared vitest base config (#217). Consumers extend it instead of
|
|
3
|
+
// copy-pasting our coverage floor (and drifting from it):
|
|
4
|
+
//
|
|
5
|
+
// import { defineConfig, mergeConfig } from 'vitest/config';
|
|
6
|
+
// import { vitestConfig } from 'testing-conventions';
|
|
7
|
+
// export default mergeConfig(vitestConfig, defineConfig({ /* overrides */ }));
|
|
8
|
+
//
|
|
9
|
+
// It carries the same TypeScript coverage default the CLI enforces
|
|
10
|
+
// (100/100/100/100, branch on, v8 over `src`, declaration files excluded), so a
|
|
11
|
+
// local `vitest --coverage` run surfaces a shortfall before CI does. The numbers
|
|
12
|
+
// here are the one recommendation expressed on a second surface — keep them in
|
|
13
|
+
// step with the tool's TypeScript coverage default.
|
|
14
|
+
export const vitestConfig = defineConfig({
|
|
15
|
+
test: {
|
|
16
|
+
include: ['src/**/*.test.ts'],
|
|
17
|
+
coverage: {
|
|
18
|
+
provider: 'v8',
|
|
19
|
+
include: ['src/**/*.ts'],
|
|
20
|
+
exclude: ['src/**/*.d.ts'],
|
|
21
|
+
thresholds: { lines: 100, branches: 100, functions: 100, statements: 100 },
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
//# sourceMappingURL=vitest-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vitest-config.js","sourceRoot":"","sources":["../src/vitest-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,uEAAuE;AACvE,0DAA0D;AAC1D,EAAE;AACF,+DAA+D;AAC/D,wDAAwD;AACxD,iFAAiF;AACjF,EAAE;AACF,mEAAmE;AACnE,gFAAgF;AAChF,iFAAiF;AACjF,+EAA+E;AAC/E,oDAAoD;AACpD,MAAM,CAAC,MAAM,YAAY,GAAG,YAAY,CAAC;IACvC,IAAI,EAAE;QACJ,OAAO,EAAE,CAAC,kBAAkB,CAAC;QAC7B,QAAQ,EAAE;YACR,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,CAAC,aAAa,CAAC;YACxB,OAAO,EAAE,CAAC,eAAe,CAAC;YAC1B,UAAU,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE;SAC3E;KACF;CACF,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "testing-conventions",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.40",
|
|
4
4
|
"description": "Enforce testing conventions in libraries (Python, TypeScript, and Rust).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "https://github.com/thekevinscott/testing-conventions",
|
|
@@ -8,6 +8,13 @@
|
|
|
8
8
|
"bin": {
|
|
9
9
|
"testing-conventions": "dist/bin.js"
|
|
10
10
|
},
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"types": "./dist/vitest-config.d.ts",
|
|
14
|
+
"import": "./dist/vitest-config.js"
|
|
15
|
+
},
|
|
16
|
+
"./package.json": "./package.json"
|
|
17
|
+
},
|
|
11
18
|
"files": [
|
|
12
19
|
"dist/"
|
|
13
20
|
],
|
|
@@ -15,7 +22,7 @@
|
|
|
15
22
|
"build": "tsx scripts/build.ts",
|
|
16
23
|
"lint": "eslint .",
|
|
17
24
|
"test": "vitest run",
|
|
18
|
-
"test:e2e": "cargo build --release --manifest-path ../rust/Cargo.toml --bin testing-conventions && vitest run --config vitest.e2e.config.ts",
|
|
25
|
+
"test:e2e": "pnpm run build && cargo build --release --manifest-path ../rust/Cargo.toml --bin testing-conventions && vitest run --config vitest.e2e.config.ts",
|
|
19
26
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
20
27
|
"prepublishOnly": "npm run build"
|
|
21
28
|
},
|
|
@@ -25,12 +32,20 @@
|
|
|
25
32
|
"dependencies": {
|
|
26
33
|
"bin-shim": "^0.1.1"
|
|
27
34
|
},
|
|
35
|
+
"peerDependencies": {
|
|
36
|
+
"vitest": ">=2"
|
|
37
|
+
},
|
|
38
|
+
"peerDependenciesMeta": {
|
|
39
|
+
"vitest": {
|
|
40
|
+
"optional": true
|
|
41
|
+
}
|
|
42
|
+
},
|
|
28
43
|
"optionalDependencies": {
|
|
29
|
-
"@testing-conventions/x86_64-unknown-linux-gnu": "0.0.
|
|
30
|
-
"@testing-conventions/aarch64-unknown-linux-gnu": "0.0.
|
|
31
|
-
"@testing-conventions/x86_64-apple-darwin": "0.0.
|
|
32
|
-
"@testing-conventions/aarch64-apple-darwin": "0.0.
|
|
33
|
-
"@testing-conventions/x86_64-pc-windows-msvc": "0.0.
|
|
44
|
+
"@testing-conventions/x86_64-unknown-linux-gnu": "0.0.40",
|
|
45
|
+
"@testing-conventions/aarch64-unknown-linux-gnu": "0.0.40",
|
|
46
|
+
"@testing-conventions/x86_64-apple-darwin": "0.0.40",
|
|
47
|
+
"@testing-conventions/aarch64-apple-darwin": "0.0.40",
|
|
48
|
+
"@testing-conventions/x86_64-pc-windows-msvc": "0.0.40"
|
|
34
49
|
},
|
|
35
50
|
"devDependencies": {
|
|
36
51
|
"@types/node": "^22.9.0",
|