@dzhechkov/harness-core 0.3.99 → 0.3.101
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/LICENSE +21 -0
- package/dist/claim-check.d.ts +21 -0
- package/dist/claim-check.d.ts.map +1 -0
- package/dist/claim-check.js +184 -0
- package/dist/claim-check.js.map +1 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/publish.d.ts +17 -0
- package/dist/publish.d.ts.map +1 -1
- package/dist/publish.js +38 -3
- package/dist/publish.js.map +1 -1
- package/dist/usage.d.ts +88 -35
- package/dist/usage.d.ts.map +1 -1
- package/dist/usage.js +322 -86
- package/dist/usage.js.map +1 -1
- package/package.json +18 -18
- package/src/claim-check.ts +211 -0
- package/src/index.ts +24 -2
- package/src/publish.ts +53 -3
- package/src/usage.ts +421 -93
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
//
|
|
3
|
+
// Ported from rUv / ruview (`@ruvnet/ruview@0.2.0`, `src/guardrails.js`), (c) rUv / ruview,
|
|
4
|
+
// MIT. Adapted for the dz harness monorepo. The hard-won detection semantics (label-vs-metric
|
|
5
|
+
// disambiguation, short-token `.map`/`map-reduce` guards, the `\b`-free `PERFECT_PCT_RE`, the
|
|
6
|
+
// code-span-scrub asymmetry, and the four-branch check order) are ported VERBATIM with their
|
|
7
|
+
// explanatory comments intact; ONLY the domain vocabulary lists (metric terms, reproducer hints,
|
|
8
|
+
// honest tags) and the human-facing reason/suggestion strings are re-worded from WiFi-sensing
|
|
9
|
+
// (ruview) to a skills/harness monorepo (dz).
|
|
10
|
+
//
|
|
11
|
+
// The dz Integrity Rule (CLAUDE.md) declares "NO shortcuts, fake data, or false claims; ALWAYS
|
|
12
|
+
// verify before claiming success." Today that rule is prose. This module is the static enforcement
|
|
13
|
+
// of it: every quantitative accuracy/coverage/count claim must be tagged MEASURED (with a
|
|
14
|
+
// reproducer) or CLAIMED/SYNTHETIC/ESTIMATED, and the retracted "100% / perfect" framing must
|
|
15
|
+
// never reappear untagged. It is a pure, never-throw, no-I/O module — all file reading lives in the
|
|
16
|
+
// `dz claim-check` CLI adapter and the `dz publish` pre-publish gate, mirroring how `usage.ts`
|
|
17
|
+
// keeps computation pure while the CLI does the reading.
|
|
18
|
+
|
|
19
|
+
/** A single untagged/overstated-claim finding. The pure engine sees only text — no `file` field. */
|
|
20
|
+
export interface ClaimFinding {
|
|
21
|
+
readonly severity: 'high' | 'medium';
|
|
22
|
+
readonly line: number; // 1-based, within the scanned text
|
|
23
|
+
readonly excerpt: string; // clip()'d to 120 chars
|
|
24
|
+
readonly reason: string;
|
|
25
|
+
readonly suggestion: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/** Result of a claim-check pass over one block of text. */
|
|
29
|
+
export interface ClaimCheckResult {
|
|
30
|
+
readonly ok: boolean;
|
|
31
|
+
readonly findings: ClaimFinding[];
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** Phrases that signal a quantitative accuracy claim (safe as substrings). */
|
|
35
|
+
const METRIC_TERMS = [
|
|
36
|
+
// Generic accuracy vocabulary kept from ruview.
|
|
37
|
+
'accuracy', 'precision', 'recall',
|
|
38
|
+
'error rate', 'detection rate', 'true positive',
|
|
39
|
+
// dz claim vocabulary — a harness monorepo claims coverage, test counts, catalogue sizes,
|
|
40
|
+
// and performance numbers, not WiFi-sensing PCK/MPJPE.
|
|
41
|
+
'coverage', 'tests passed', 'test count', 'skills', 'commands',
|
|
42
|
+
'packages', 'presets', 'downloads', 'benchmark', 'speedup', 'latency',
|
|
43
|
+
];
|
|
44
|
+
|
|
45
|
+
// Short/ambiguous metric tokens (ADR-263 F11): 'map' is usually the English
|
|
46
|
+
// word or a file extension, 'f1'/'o1' collide with finding/option labels.
|
|
47
|
+
// They only count as metric mentions when word-bounded, not a `.map` file
|
|
48
|
+
// reference, and the line (after scrubbing) carries a number — "mAP 62.3" is
|
|
49
|
+
// a claim, "F-numbers map to findings" is not.
|
|
50
|
+
// 'map' additionally must not be a `.map` file suffix or a hyphenated
|
|
51
|
+
// compound ("map-free", "map-reduce") — mAP the metric never appears as either.
|
|
52
|
+
// `\d+ tests` is dz's single most-repeated headline claim ("2136 tests") and was slipping through:
|
|
53
|
+
// the substring term is 'tests passed', so a bare count never fired. Anchor it to a PRECEDING number
|
|
54
|
+
// rather than adding a bare 'test' term — otherwise every `usage.test.ts:42` path reference would
|
|
55
|
+
// register as a metric mention.
|
|
56
|
+
const METRIC_TERMS_SHORT = [
|
|
57
|
+
/(?<![.\w])map\b(?!-)/, /\bf1\b/, /\bauc\b/, /\biou\b/,
|
|
58
|
+
/\b\d[\d,._]*\s+tests?\b/,
|
|
59
|
+
];
|
|
60
|
+
// Finding/option labels (F1, O2, …) count as labels unless the token sits in a
|
|
61
|
+
// metric context: an immediately following score/=/%/digit or colon ("F1: 0.91"),
|
|
62
|
+
// or a number later in the same clause ("F1 reaches 0.91" — an F1-score claim).
|
|
63
|
+
// Bare option refs ("F7 fixes", "O1–O9", "ADR-263 O2") carry no clause number of
|
|
64
|
+
// their own and stay labels. (A surviving 'f1' still only fires as a metric when
|
|
65
|
+
// its scrubbed line actually carries a number — see mentionsMetricTerm.)
|
|
66
|
+
const LABEL_TOKEN_RE = /\b[fo]\d+\b(?!\s*(?:score|=|\d|%|:))(?![^\n.;]*\d)/g;
|
|
67
|
+
const CODE_SPAN_RE = /`[^`]*`/g; // backticked identifiers are code, not claims
|
|
68
|
+
|
|
69
|
+
// Markdown link/image TARGETS are machinery, not prose claims. A shields.io badge URL
|
|
70
|
+
// (``) embeds the very words and
|
|
71
|
+
// numbers this checker hunts for, so leaving URLs in produced ~600 findings on this repo — noise
|
|
72
|
+
// that buries the real ones. The link TEXT is kept, so a claim written in prose still fires; the
|
|
73
|
+
// same counts always appear in prose next to the badges. Consequence, accepted knowingly: a number
|
|
74
|
+
// that exists ONLY inside a URL is not checked.
|
|
75
|
+
const MD_URL_RE = /\]\([^)\s]*(?:\s[^)]*)?\)/g;
|
|
76
|
+
const AUTOLINK_RE = /<https?:\/\/[^>]*>|(?<![(<])\bhttps?:\/\/\S+/g;
|
|
77
|
+
|
|
78
|
+
/** Strip markdown link/image targets and bare URLs, keeping the surrounding prose. */
|
|
79
|
+
function stripUrls(s: string): string {
|
|
80
|
+
return s.replace(MD_URL_RE, '] ').replace(AUTOLINK_RE, ' ');
|
|
81
|
+
}
|
|
82
|
+
const HAS_NUMBER_RE = /\d/;
|
|
83
|
+
|
|
84
|
+
/** Line with code spans and finding/option labels removed. */
|
|
85
|
+
function scrubLine(lower: string): string {
|
|
86
|
+
return lower.replace(CODE_SPAN_RE, ' ').replace(LABEL_TOKEN_RE, ' ');
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function mentionsMetricTerm(lower: string, scrubbed: string): boolean {
|
|
90
|
+
if (METRIC_TERMS.some((t) => lower.includes(t))) return true;
|
|
91
|
+
if (!HAS_NUMBER_RE.test(scrubbed)) return false;
|
|
92
|
+
return METRIC_TERMS_SHORT.some((re) => re.test(scrubbed));
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/** Tags that make a claim honest (case-insensitive). */
|
|
96
|
+
// `estimated` agrees with the `estimated: true` honest-uncertainty marker `dz usage` already
|
|
97
|
+
// emits — the two honesty systems must not contradict each other.
|
|
98
|
+
const HONEST_TAGS = ['measured', 'claimed', 'synthetic', 'unvalidated', 'baseline', 'estimated'];
|
|
99
|
+
|
|
100
|
+
/** Reproducer references that count as evidence backing a MEASURED claim. */
|
|
101
|
+
const REPRODUCER_HINTS = [
|
|
102
|
+
// Generic evidence hints kept from ruview.
|
|
103
|
+
'baseline', 'reproduce', 'sha256', 'tarball', 'cargo test',
|
|
104
|
+
// Packaging-claim reproducers (npm reviews): the tarball itself.
|
|
105
|
+
'npm pack', 'npm view', 'npm i ', 'npm install',
|
|
106
|
+
// dz reproducers — the actual commands/artifacts that back a dz claim.
|
|
107
|
+
'npm test', 'vitest', 'npm run', 'git rev', 'commit',
|
|
108
|
+
'test output', 'coverage report', 'measured on',
|
|
109
|
+
];
|
|
110
|
+
|
|
111
|
+
const PERCENT_RE = /\b(\d{1,3}(?:\.\d+)?)\s?%/g;
|
|
112
|
+
// "perfect" / "100%" framing is the specific retracted claim — always high severity.
|
|
113
|
+
// NOTE: no trailing \b after "%": "%"→" " is non-word→non-word, so a trailing \b
|
|
114
|
+
// never matches and would silently miss "100%". Bare 100% is only damning next to a
|
|
115
|
+
// metric term (see claimCheck); the word phrases are inherently accuracy claims.
|
|
116
|
+
const PERFECT_PCT_RE = /\b100(?:\.0+)?\s?%/;
|
|
117
|
+
const PERFECT_WORD_RE = /perfect accuracy|flawless|never (?:wrong|fails)/i;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Lint a block of text for untagged or overstated accuracy claims.
|
|
121
|
+
* Pure and never-throws: a non-string or empty input returns `{ ok: true, findings: [] }`.
|
|
122
|
+
*/
|
|
123
|
+
export function claimCheck(text: string): ClaimCheckResult {
|
|
124
|
+
const findings: ClaimFinding[] = [];
|
|
125
|
+
if (typeof text !== 'string' || text.length === 0) {
|
|
126
|
+
return { ok: true, findings };
|
|
127
|
+
}
|
|
128
|
+
const lines = text.split(/\r?\n/);
|
|
129
|
+
|
|
130
|
+
lines.forEach((raw, i) => {
|
|
131
|
+
const original = raw.trim();
|
|
132
|
+
if (!original) return;
|
|
133
|
+
// Analyse the URL-stripped line, but report the ORIGINAL so the excerpt stays recognisable.
|
|
134
|
+
const line = stripUrls(original);
|
|
135
|
+
if (!line.trim()) return;
|
|
136
|
+
const lower = line.toLowerCase();
|
|
137
|
+
|
|
138
|
+
const hasPercent = PERCENT_RE.test(line);
|
|
139
|
+
PERCENT_RE.lastIndex = 0; // reset stateful global regex
|
|
140
|
+
const scrubbed = scrubLine(lower);
|
|
141
|
+
// DELIBERATE DIVERGENCE from ruview, which matched METRIC_TERMS against the UNSCRUBBED line.
|
|
142
|
+
// dz's vocabulary contains path-like words ('packages', 'commands', 'skills'), so a code span
|
|
143
|
+
// such as `packages/x/usage.test.ts:42` registered as a metric mention and produced a false
|
|
144
|
+
// positive on prose that merely cites a file. Matching the code-span-scrubbed line fixes it:
|
|
145
|
+
// "accuracy reached `0.95`" still fires because 'accuracy' sits OUTSIDE the span, while the
|
|
146
|
+
// number check below deliberately keeps reading the un-code-scrubbed line so `0.95` counts.
|
|
147
|
+
const mentionsMetric = mentionsMetricTerm(scrubbed, scrubbed);
|
|
148
|
+
if (!hasPercent && !mentionsMetric) return;
|
|
149
|
+
|
|
150
|
+
const tagged = HONEST_TAGS.some((t) => lower.includes(t));
|
|
151
|
+
const hasReproducer = REPRODUCER_HINTS.some((h) => lower.includes(h));
|
|
152
|
+
const perfect = PERFECT_WORD_RE.test(line) || (mentionsMetric && PERFECT_PCT_RE.test(line));
|
|
153
|
+
|
|
154
|
+
if (perfect && !lower.includes('retract')) {
|
|
155
|
+
findings.push({
|
|
156
|
+
severity: 'high',
|
|
157
|
+
line: i + 1,
|
|
158
|
+
excerpt: clip(original),
|
|
159
|
+
reason: 'States perfect/100% accuracy — this is the exact framing the Integrity Rule forbids.',
|
|
160
|
+
suggestion: 'Replace with a measured number vs a baseline, tagged MEASURED (name the reproducer: npm test, coverage report), or mark the old claim "retracted".',
|
|
161
|
+
});
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// A quantitative claim needs a number. Digits hidden in a code span still
|
|
166
|
+
// count — "accuracy reached `0.95`" is a claim — so test the line with only
|
|
167
|
+
// finding/option labels stripped, NOT the code-span-scrubbed copy: scrubbing
|
|
168
|
+
// dropped `0.95` and wrongly short-circuited both the untagged and the
|
|
169
|
+
// MEASURED-without-reproducer checks below. A bare metric word in prose
|
|
170
|
+
// ("precision matters here", "every accuracy number must be MEASURED") has no
|
|
171
|
+
// number and is not a taggable claim (ADR-263 F11).
|
|
172
|
+
if (!hasPercent && !HAS_NUMBER_RE.test(lower.replace(LABEL_TOKEN_RE, ' '))) return;
|
|
173
|
+
|
|
174
|
+
// A metric/percent with no honesty tag at all.
|
|
175
|
+
if (!tagged) {
|
|
176
|
+
findings.push({
|
|
177
|
+
severity: 'medium',
|
|
178
|
+
line: i + 1,
|
|
179
|
+
excerpt: clip(original),
|
|
180
|
+
reason: 'Accuracy claim is not tagged MEASURED / CLAIMED / SYNTHETIC / ESTIMATED.',
|
|
181
|
+
suggestion: 'Tag it. If MEASURED, name the reproducer (npm test, coverage report, git rev, npm view).',
|
|
182
|
+
});
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// Tagged MEASURED but cites no reproducer — still a gap (reached now even
|
|
187
|
+
// when the only number is inside a code span, e.g. "accuracy `0.97` (MEASURED)").
|
|
188
|
+
if (lower.includes('measured') && !hasReproducer) {
|
|
189
|
+
findings.push({
|
|
190
|
+
severity: 'medium',
|
|
191
|
+
line: i + 1,
|
|
192
|
+
excerpt: clip(original),
|
|
193
|
+
reason: 'Tagged MEASURED but cites no reproducer/evidence.',
|
|
194
|
+
suggestion: 'Add the evidence path: npm test output, a coverage report, npm view, or a git rev/commit.',
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
return { ok: findings.length === 0, findings };
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
function clip(s: string, n = 120): string {
|
|
203
|
+
return s.length > n ? `${s.slice(0, n - 1)}…` : s;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/** Convenience: a one-line human summary for CLI output. */
|
|
207
|
+
export function summarize(result: ClaimCheckResult): string {
|
|
208
|
+
if (result.ok) return 'claim-check: PASS — no untagged or overstated accuracy claims.';
|
|
209
|
+
const high = result.findings.filter((f) => f.severity === 'high').length;
|
|
210
|
+
return `claim-check: ${result.findings.length} finding(s) (${high} high) — accuracy claims need MEASURED/CLAIMED tags + a reproducer.`;
|
|
211
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -119,6 +119,8 @@ export type { PluginManifest } from './plugin.js';
|
|
|
119
119
|
export type { SetupOptions, SetupResult, SetupStep } from './setup.js';
|
|
120
120
|
export type { PretrainResult, DetectedTech } from './pretrain.js';
|
|
121
121
|
export type { RecommendationReport, SkillRecommendation } from './recommend.js';
|
|
122
|
+
export { claimCheck, summarize } from './claim-check.js';
|
|
123
|
+
export type { ClaimFinding, ClaimCheckResult } from './claim-check.js';
|
|
122
124
|
export { discoverPackages, publishPackages, bumpPatch, compareVersions, findUnpackagedSkills, orderByDependencies, syncReadmeVersion } from './publish.js';
|
|
123
125
|
export { fetchAllDownloads } from './downloads.js';
|
|
124
126
|
export type { PackageDownloads, DownloadsReport } from './downloads.js';
|
|
@@ -198,5 +200,25 @@ export {
|
|
|
198
200
|
CODE_LANDED_BARRIER_SLEEPS_SECONDS,
|
|
199
201
|
} from './feature-adr-routing.js';
|
|
200
202
|
export type { StageOpts, RoutingEnv, UsageSignal, UsageAction } from './feature-adr-routing.js';
|
|
201
|
-
export {
|
|
202
|
-
|
|
203
|
+
export {
|
|
204
|
+
CLAUDE_USAGE_MODELS,
|
|
205
|
+
computeUsage,
|
|
206
|
+
deriveUsageCalibration,
|
|
207
|
+
fixedBlockWindowFor,
|
|
208
|
+
normalizeClaudeUsageModel,
|
|
209
|
+
normalizeClaudeUsageModelKey,
|
|
210
|
+
parseWeeklyResetAnchor,
|
|
211
|
+
readUsageLimits,
|
|
212
|
+
weeklyWindowFor,
|
|
213
|
+
} from './usage.js';
|
|
214
|
+
export type {
|
|
215
|
+
ClaudeUsageModel,
|
|
216
|
+
UsageCalibrationChange,
|
|
217
|
+
UsageCalibrationInput,
|
|
218
|
+
UsageCalibrationPlan,
|
|
219
|
+
UsageEstimate,
|
|
220
|
+
UsageLimits,
|
|
221
|
+
UsageModelEstimate,
|
|
222
|
+
UsageWindow,
|
|
223
|
+
WeeklyResetAnchor,
|
|
224
|
+
} from './usage.js';
|
package/src/publish.ts
CHANGED
|
@@ -9,6 +9,8 @@ import { existsSync, readFileSync, writeFileSync, readdirSync } from 'node:fs';
|
|
|
9
9
|
import { join } from 'node:path';
|
|
10
10
|
import { execSync } from 'node:child_process';
|
|
11
11
|
|
|
12
|
+
import { claimCheck } from './claim-check.js';
|
|
13
|
+
|
|
12
14
|
/** Result for a single package publish attempt. */
|
|
13
15
|
export interface PublishResult {
|
|
14
16
|
readonly name: string;
|
|
@@ -16,6 +18,12 @@ export interface PublishResult {
|
|
|
16
18
|
readonly newVersion: string;
|
|
17
19
|
readonly status: 'published' | 'skipped' | 'error';
|
|
18
20
|
readonly error?: string | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Pre-publish claim-check summary for this package's README, present only when the
|
|
23
|
+
* opt-in `claimCheck` gate ran (`'warn'`/`'block'`). Additive: absent by default so an
|
|
24
|
+
* unmodified `publishPackages` call is byte-compatible with pre-gate behavior.
|
|
25
|
+
*/
|
|
26
|
+
readonly claimCheck?: { readonly findings: number; readonly high: number } | undefined;
|
|
19
27
|
}
|
|
20
28
|
|
|
21
29
|
/** Full publish report. */
|
|
@@ -203,6 +211,14 @@ export function publishPackages(
|
|
|
203
211
|
dryRun?: boolean | undefined;
|
|
204
212
|
filter?: string[] | undefined;
|
|
205
213
|
bumpOnly?: boolean | undefined;
|
|
214
|
+
/**
|
|
215
|
+
* Pre-publish claim-check gate over each package's README (ADR-001). Default `'warn'`:
|
|
216
|
+
* records the finding count on the result but NEVER changes publish status — additive, so the
|
|
217
|
+
* existing publish path and its tests are unaffected. `'error'` flips ONLY a package with a
|
|
218
|
+
* `high` finding to `status: 'error'`, leaving the rest of the batch unaffected. `'off'`
|
|
219
|
+
* disables the gate entirely (no `claimCheck` field is emitted).
|
|
220
|
+
*/
|
|
221
|
+
claimGate?: 'off' | 'warn' | 'error' | undefined;
|
|
206
222
|
} = {},
|
|
207
223
|
): PublishReport {
|
|
208
224
|
const packages = discoverPackages(monorepoRoot);
|
|
@@ -238,8 +254,41 @@ export function publishPackages(
|
|
|
238
254
|
continue;
|
|
239
255
|
}
|
|
240
256
|
|
|
257
|
+
// Pre-publish claim-check gate. Default `'warn'` per ADR-001: publishing SURFACES a
|
|
258
|
+
// README's untagged claims by default, but `'warn'` NEVER changes publish status, so the
|
|
259
|
+
// existing publish path is unaffected. `'error'` fails only THIS package when it carries a
|
|
260
|
+
// high-severity claim; `'off'` disables the gate entirely (no `claimCheck` field emitted).
|
|
261
|
+
// Runs BEFORE the dry-run short-circuit so `--dry-run` previews surface what a live publish
|
|
262
|
+
// would. Reading the README never blocks the gate itself — unreadable ⇒ "no findings".
|
|
263
|
+
const claimGate = opts.claimGate ?? 'warn';
|
|
264
|
+
let claimCheckSummary: { findings: number; high: number } | undefined;
|
|
265
|
+
if (claimGate !== 'off') {
|
|
266
|
+
const readmePath = join(pkg.dir, 'README.md');
|
|
267
|
+
if (existsSync(readmePath)) {
|
|
268
|
+
try {
|
|
269
|
+
const text = readFileSync(readmePath, 'utf-8');
|
|
270
|
+
const result = claimCheck(text);
|
|
271
|
+
const high = result.findings.filter((f) => f.severity === 'high').length;
|
|
272
|
+
claimCheckSummary = { findings: result.findings.length, high };
|
|
273
|
+
if (claimGate === 'error' && high > 0) {
|
|
274
|
+
results.push({
|
|
275
|
+
name: pkg.name,
|
|
276
|
+
oldVersion,
|
|
277
|
+
newVersion,
|
|
278
|
+
status: 'error',
|
|
279
|
+
error: `claim-check: ${high} high-severity claim(s) in README.md — tag MEASURED with a reproducer or CLAIMED/SYNTHETIC before publishing.`,
|
|
280
|
+
claimCheck: claimCheckSummary,
|
|
281
|
+
});
|
|
282
|
+
continue;
|
|
283
|
+
}
|
|
284
|
+
} catch {
|
|
285
|
+
/* unreadable README never blocks the gate itself */
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
|
|
241
290
|
if (opts.dryRun) {
|
|
242
|
-
results.push({ name: pkg.name, oldVersion, newVersion, status: 'skipped' });
|
|
291
|
+
results.push({ name: pkg.name, oldVersion, newVersion, status: 'skipped', claimCheck: claimCheckSummary });
|
|
243
292
|
continue;
|
|
244
293
|
}
|
|
245
294
|
|
|
@@ -254,7 +303,7 @@ export function publishPackages(
|
|
|
254
303
|
originalReadme = syncReadmeVersion(pkg.dir, oldVersion, newVersion);
|
|
255
304
|
|
|
256
305
|
if (opts.bumpOnly) {
|
|
257
|
-
results.push({ name: pkg.name, oldVersion, newVersion, status: 'published' });
|
|
306
|
+
results.push({ name: pkg.name, oldVersion, newVersion, status: 'published', claimCheck: claimCheckSummary });
|
|
258
307
|
continue;
|
|
259
308
|
}
|
|
260
309
|
|
|
@@ -272,7 +321,7 @@ export function publishPackages(
|
|
|
272
321
|
env: { ...process.env },
|
|
273
322
|
});
|
|
274
323
|
|
|
275
|
-
results.push({ name: pkg.name, oldVersion, newVersion, status: 'published' });
|
|
324
|
+
results.push({ name: pkg.name, oldVersion, newVersion, status: 'published', claimCheck: claimCheckSummary });
|
|
276
325
|
} catch (err) {
|
|
277
326
|
// The version was written BEFORE build+publish; on any failure restore the
|
|
278
327
|
// original package.json (and README, if we rewrote its version) so a failed
|
|
@@ -288,6 +337,7 @@ export function publishPackages(
|
|
|
288
337
|
newVersion,
|
|
289
338
|
status: 'error',
|
|
290
339
|
error: err instanceof Error ? err.message : String(err),
|
|
340
|
+
claimCheck: claimCheckSummary,
|
|
291
341
|
});
|
|
292
342
|
}
|
|
293
343
|
}
|