testguard-cli 0.3.0 → 0.3.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/CHANGELOG.md +16 -0
- package/README.md +1 -1
- package/package.json +1 -1
- package/src/brief/brief.mjs +1 -1
- package/src/init/init.mjs +6 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.3.1] - 2026-09-17
|
|
11
|
+
|
|
12
|
+
Dogfooding `init` and `status` on this repository.
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
- `init` no longer adds per-file `.gitignore` lines to a project that already
|
|
17
|
+
ignores `.testguard/` wholesale; it notes instead that `baseline.json` is
|
|
18
|
+
meant to be committed.
|
|
19
|
+
- The brief no longer says "everything is new" when nothing is unproven.
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
|
|
23
|
+
- This repository now carries its own `AGENTS.md` TestGuard section, written
|
|
24
|
+
by `testguard init`.
|
|
25
|
+
|
|
10
26
|
## [0.3.0] - 2026-09-17
|
|
11
27
|
|
|
12
28
|
The agent operating layer. TestGuard is meant to be run by AI agents; this
|
package/README.md
CHANGED
|
@@ -52,7 +52,7 @@ tests were written against the survivors, 39/39 were killed.
|
|
|
52
52
|
| npm | `npm i -D testguard-cli` then `npx testguard probe` |
|
|
53
53
|
| pip | `pip install testguard-cli` then `testguard probe` (needs Node ≥ 20) |
|
|
54
54
|
| Homebrew | `brew tap raccioly/tap && brew install testguard` |
|
|
55
|
-
| GitHub Action | `uses: raccioly/testguard@v0.3.
|
|
55
|
+
| GitHub Action | `uses: raccioly/testguard@v0.3.1` — see [`action.yml`](./action.yml) |
|
|
56
56
|
| pre-commit | `repo: https://github.com/raccioly/testguard`, hooks `testguard-claims`, `testguard-probe` |
|
|
57
57
|
|
|
58
58
|
Projects that set `min-release-age` in `.npmrc` cannot see a version published
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "testguard-cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Proves a test suite defends the claims a project makes: injects the faults those claims forbid and reports every one the tests fail to detect.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
package/src/brief/brief.mjs
CHANGED
|
@@ -66,7 +66,7 @@ export function renderBriefText(brief, { hasBaseline, total }) {
|
|
|
66
66
|
'',
|
|
67
67
|
...(brief.provisional ? ['**PROVISIONAL** — this evidence came from fewer than three confirmation runs; treat every verdict below as unconfirmed and re-probe with --confirm 3 before acting on it.', ''] : []),
|
|
68
68
|
`testguard ${brief.tool.version}${brief.head ? ` @ ${brief.head.slice(0, 12)}` : ''} — ${brief.summary.claims} claims, ${total} faults probed, ${unproven} unproven` +
|
|
69
|
-
(hasBaseline ? ` (${brief.summary.new} new since baseline).` : ' (no baseline; everything is new).'),
|
|
69
|
+
(unproven === 0 ? '.' : hasBaseline ? ` (${brief.summary.new} new since baseline).` : ' (no baseline; everything is new).'),
|
|
70
70
|
];
|
|
71
71
|
if (brief.next) lines.push('', `NEXT [${brief.next.action}]: ${brief.next.command}`, ` why: ${brief.next.why}`);
|
|
72
72
|
if (brief.items.length === 0) {
|
package/src/init/init.mjs
CHANGED
|
@@ -67,8 +67,12 @@ export function initProject({ projectDir, force = false }) {
|
|
|
67
67
|
|
|
68
68
|
const giPath = join(projectDir, '.gitignore');
|
|
69
69
|
const gi = existsSync(giPath) ? readFileSync(giPath, 'utf8') : '';
|
|
70
|
-
const
|
|
71
|
-
|
|
70
|
+
const entries = gi.split('\n').map((x) => x.trim());
|
|
71
|
+
const dirIgnored = entries.some((x) => /^\/?\.testguard\/?$/.test(x));
|
|
72
|
+
const missing = dirIgnored ? [] : GITIGNORE_LINES.filter((l) => !entries.includes(l));
|
|
73
|
+
if (dirIgnored) {
|
|
74
|
+
skipped.push('.gitignore ignores .testguard/ entirely — note that baseline.json should be committed; ignore only the regenerated files if you adopt a baseline');
|
|
75
|
+
} else if (missing.length) {
|
|
72
76
|
writeFileSync(giPath, (gi ? gi.replace(/\s*$/, '\n') : '') + '# TestGuard: regenerated per run (baseline.json IS committed)\n' + missing.join('\n') + '\n');
|
|
73
77
|
done.push(`.gitignore: ${missing.length} line${missing.length === 1 ? '' : 's'} added`);
|
|
74
78
|
} else {
|