Commit af98a04
docs(spec): correct
Fixes #17461
- **Clause-②: no** — this PR puts no new key on any published payload.
## What changed
One TSDoc line on `ManifestSchema.version`
(`packages/spec/src/kernel/manifest.zod.ts`):
```
- * @example "2.1.0-beta.1"
+ * @example "2.1.0"
```
The key documented two examples and its own regex accepted only one.
Reproduced on this branch's base, no build needed:
```
$ node -e "const re=/^\d+\.\d+\.\d+$/; for (const v of ['1.0.0','2.1.0-beta.1']) console.log(re.test(v), JSON.stringify(v))"
true "1.0.0"
false "2.1.0-beta.1"
```
An author copying the second documented example verbatim got a
`ZodError` out of `ManifestSchema.parse`. The corrected value is
accepted: `re.test('2.1.0')` is `true`.
## Why the comment was the artifact in error, not the regex
Three artifacts agreed on the refusal before this change and still agree
afterwards:
| artifact | says | touched here |
|:---|:---|:---|
| `version: z.string().regex(...)` | refuses a prerelease suffix | no —
byte-identical |
| prose `following semantic versioning (major.minor.patch)` |
major.minor.patch only | no — byte-identical |
| `manifest.test.ts` `invalidVersions` pins `'1.0.0-beta'` | refusal is
deliberate | no — not in the diff |
Only the `@example` line dissented, so it is an editing residue in the
TSDoc. **Widening the regex to admit prerelease or build metadata is
deliberately NOT done here** — it would contradict a test that pins the
refusal on purpose and would enlarge a published schema's accepted set.
`PluginSchema.version` (#17070) accepts a different grammar today; the
two keys are deliberately different and are not reconciled here.
## Verification
Commands and their own verdict lines, all at `dfcb1592`:
- `pnpm --filter @objectstack/spec build` — `VERDICT command-exit 0`
(under `scripts/pm/os-verify-lock.sh`)
- `pnpm --filter @objectstack/spec typecheck && pnpm --filter
@objectstack/spec test` — `VERDICT command-exit 0`; `Test Files 473
passed (473)`, `Tests 13435 passed (13435)`
- `pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2
src/kernel/manifest.test.ts` — `EXIT=0`, `Test Files 1 passed (1)`,
`Tests 41 passed (41)` — the pinned `invalidVersions` case still passes,
unchanged
- `pnpm --filter @objectstack/spec check:generated` — `✓ All 15
generated artifacts are up to date`, including `check:docs`. The
`@example` line is not extracted into `content/docs/references/**`:
measured at 0 occurrences there, with the neighbouring `.describe()`
string `Package version (semantic versioning)` at 12 in the same tree as
the lit control.
- `pnpm exec eslint . --no-inline-config --format json` — exit 0 over
**6636 files**, 0 errors, 0 warnings. Repo-wide, not narrowed.
- Derived gate family (`node scripts/pm/dispatch-gates.mjs --commands
--repo objectstack-ai/objectstack`): **76 derived, 73 run green, 3 NOT
MEASURED**. The three exited 3 — `PREREQUISITE NOT MET`, each refusing
because a whole-repo `pnpm build` is absent for packages this diff does
not touch: `check:doc-formula-expressions`,
`check:dual-build-cjs-loads`, `check:lean-entry-closure`. Declared to
CI, which builds everything. Reconciled with `--ran`.
## Published reach
`@objectstack/spec` ships `src/**/*.zod.ts` in its `files[]`, so the
edited line is itself published, and the TSDoc is also emitted into the
built declarations. Measured on `packages/spec/dist` after the build:
corrected `@example "2.1.0"` at **16** occurrences, old `@example
"2.1.0-beta.1"` at **0**, with the untouched neighbour `@example
"1.0.0"` at **16** as the lit control. Hence a changeset (`patch`,
`@objectstack/spec`) rather than `skip-changeset`.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01MkQhmuuJAVDjmeWNixwDDH)_
Co-authored-by: Claude <noreply@anthropic.com>ManifestSchema.version's prerelease @example to a value its regex accepts (#17741)1 parent 522f612 commit af98a04
2 files changed
Lines changed: 35 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
317 | 317 | | |
318 | 318 | | |
319 | 319 | | |
320 | | - | |
| 320 | + | |
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
| |||
0 commit comments