checkchange 0.5.4 → 0.5.5
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 +12 -1
- package/dist/auto-coverage.js +1 -1
- package/dist/complexity-providers/csharpDescriptorProvider.js +2 -2
- package/dist/crapCalc.d.ts +1 -1
- package/dist/crapCalc.js +2 -2
- package/dist/evidence.d.ts +1 -1
- package/dist/evidence.js +2 -2
- package/dist/rules.d.ts +1 -1
- package/dist/rules.js +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -209,6 +209,17 @@ You can also run the project's own test suite with:
|
|
|
209
209
|
pnpm exec vitest run --coverage
|
|
210
210
|
```
|
|
211
211
|
|
|
212
|
+
For Bun test projects:
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
bun test --coverage --coverage-reporter=lcov
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
This writes `coverage/lcov.info`, which CheckChange reads directly (it can also
|
|
219
|
+
run this command for you via `--auto-coverage`). Bare `bun test --coverage`
|
|
220
|
+
prints a coverage table but writes **no** artifact on disk; the
|
|
221
|
+
`--coverage-reporter=lcov` flag is required.
|
|
222
|
+
|
|
212
223
|
---
|
|
213
224
|
|
|
214
225
|
# Basic usage
|
|
@@ -268,7 +279,7 @@ Some of the most useful options are:
|
|
|
268
279
|
| `--format <github\|junit\|sarif>` | CI output format | none |
|
|
269
280
|
| `--json` | Produce machine-readable evidence | off |
|
|
270
281
|
| `--verbose` | Show additional diagnostics | off |
|
|
271
|
-
| `--auto-coverage` | Attempt automatic coverage setup | off |
|
|
282
|
+
| `--auto-coverage` | Attempt automatic coverage setup (vitest, jest, pytest, dotnet, or bun) | off |
|
|
272
283
|
|
|
273
284
|
Flags are per-command: `checkchange check --help` lists `--format`, `--base`,
|
|
274
285
|
`--json`; every subcommand lists its own flags. Unknown flags are rejected
|
package/dist/auto-coverage.js
CHANGED
|
@@ -75,7 +75,7 @@ export function autoCoverage(cwd) {
|
|
|
75
75
|
// (DOTNET_RUNNER, src/providers/config.ts:90) — it was missing, and C# repos
|
|
76
76
|
// were told to install a JS/Python toolchain they do not use. It also does not
|
|
77
77
|
// promise Roslyn complexity analysis: --auto-coverage drives COVERAGE only.
|
|
78
|
-
return { generatedPath: null, hint: 'No test runner detected. Install vitest, jest, or pytest, or add a .NET project (.csproj/.sln) so `dotnet test --collect:XPlat Code Coverage` is used, to use --auto-coverage.' };
|
|
78
|
+
return { generatedPath: null, hint: 'No test runner detected. Install vitest, jest, or pytest, or add a .NET project (.csproj/.sln) so `dotnet test --collect:XPlat Code Coverage` is used, or install Bun (`bun` on PATH or a `bunfig.toml`), to use --auto-coverage.' };
|
|
79
79
|
}
|
|
80
80
|
const fullCommand = [runner.command, ...runner.args];
|
|
81
81
|
const isBuiltinRunner = builtinConfig().providers.some(({ testRunners }) => testRunners?.some(({ command }) => command.length === fullCommand.length && command.every((arg, index) => arg === fullCommand[index])));
|
|
@@ -174,10 +174,10 @@ export function vehicleRejection() {
|
|
|
174
174
|
return lastVehicleRejection;
|
|
175
175
|
}
|
|
176
176
|
// The fallback parser is checkchange's OWN code (./csharpFallbackParser.ts), so
|
|
177
|
-
// its tool is checkchange and its version is the package version — same 0.5.
|
|
177
|
+
// its tool is checkchange and its version is the package version — same 0.5.5
|
|
178
178
|
// the other self-provenance consts hard-code (src/crapCalc.ts:3, src/rules.ts:4).
|
|
179
179
|
const FALLBACK_TOOL = 'checkchange';
|
|
180
|
-
const FALLBACK_TOOL_VERSION = '0.5.
|
|
180
|
+
const FALLBACK_TOOL_VERSION = '0.5.5';
|
|
181
181
|
// The vehicle's INSTALLED version is never probed: the rich path is
|
|
182
182
|
// documented-unreachable (see SPAWN FORM above), so `dotnet-crap --version` is
|
|
183
183
|
// never spawned to learn it, and no version is fabricated here. `unknown` is the
|
package/dist/crapCalc.d.ts
CHANGED
package/dist/crapCalc.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Provenance for the crapCalc lineage stage. Self tool version tracks package.json
|
|
2
|
-
// (matches existing hard-coded '0.5.
|
|
3
|
-
export const crapCalcProvenance = { tool: 'checkchange', version: '0.5.
|
|
2
|
+
// (matches existing hard-coded '0.5.5' style for the core package).
|
|
3
|
+
export const crapCalcProvenance = { tool: 'checkchange', version: '0.5.5' };
|
|
4
4
|
export function calculateCrap(cc, coveragePercent) {
|
|
5
5
|
if (coveragePercent == null) {
|
|
6
6
|
return null;
|
package/dist/evidence.d.ts
CHANGED
package/dist/evidence.js
CHANGED
|
@@ -19,8 +19,8 @@ import * as fs from 'fs';
|
|
|
19
19
|
import * as path from 'path';
|
|
20
20
|
import { loadProviderConfig, deriveRegistry, builtinConfig, createGenericCommandProvider } from './providers/index.js';
|
|
21
21
|
const requireFromEvidence = createRequire(import.meta.url);
|
|
22
|
-
// Self provenance; version mirrors package.json (existing codebase style hard-codes '0.5.
|
|
23
|
-
export const evidenceProvenance = { tool: 'checkchange', version: '0.5.
|
|
22
|
+
// Self provenance; version mirrors package.json (existing codebase style hard-codes '0.5.5').
|
|
23
|
+
export const evidenceProvenance = { tool: 'checkchange', version: '0.5.5' };
|
|
24
24
|
function sha256Hex(content) {
|
|
25
25
|
return createHash('sha256').update(content).digest('hex');
|
|
26
26
|
}
|
package/dist/rules.d.ts
CHANGED
package/dist/rules.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Provenance for the rules lineage stage. Self tool version tracks package.json.
|
|
2
|
-
export const rulesProvenance = { tool: 'checkchange', version: '0.5.
|
|
2
|
+
export const rulesProvenance = { tool: 'checkchange', version: '0.5.5' };
|
|
3
3
|
/**
|
|
4
4
|
* Evaluate changed functions against the high-CRAP rule.
|
|
5
5
|
* @param changed Array of changed functions
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "checkchange",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"packageManager": "pnpm@11.17.0",
|
|
6
6
|
"type": "module",
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"files": [
|
|
12
12
|
"dist/",
|
|
13
13
|
".agents/skills/using-checkchange/SKILL.md",
|
|
14
|
+
"README.md",
|
|
14
15
|
"!dist/**/*.test.*"
|
|
15
16
|
],
|
|
16
17
|
"scripts": {
|