Skip to content

ci(docs): check the generated API reference and regenerate it at release - #135

Merged
NSchatz merged 12 commits into
mainfrom
ci/docs-reference-check
Nov 28, 2026
Merged

NSchatz merged 12 commits into
mainfrom
ci/docs-reference-check

Conversation

@NSchatz

@NSchatz NSchatz commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

What

  • pnpm check:docs-reference (cosyte-docs-reference --check) runs as a step of the documents job, and pnpm docs:reference regenerates the pages.
  • The version script runs cosyte-docs-reference after the version sync, so a release regenerates docs-content/api/ in the version commit.
  • docs-content/api/src.md is regenerated: it had drifted from the source (it lacked OutputSink, and writeStdout had the wrong return type).
  • @cosyte/process moves from 0.1.7 to 0.1.10, which ships cosyte-docs-reference.
  • A typedoc>minimatch override at 10.2.6. The existing minimatch@>=10.0.0 <11.0.1 override forces 11.0.1 into typedoc, which then fails with mini.matchOne is not a function; typedoc 0.28 requires minimatch 10.
  • AGENTS.md: the gate lists the new check, and a rule says to regenerate the pages after an export or TSDoc change.

This branch starts from #134 (and the branches under it); it should merge after them.

Why

The committed reference pages were regenerated by nothing, so they had already gone stale, and the docs site publishes them. A check in a required job and a step in the version script keep them equal to the source.

Proof

  • pnpm check:docs-reference before regenerating: exit 1, src.md: differs from what the source generates. After: OK.
  • pnpm exec cosyte-release-pr: OK, the version script is in place.
  • node scripts/sync-version.mjs: nothing to do (run once, as the new version script would).
  • pnpm test: 46 files, 820 passed. pnpm typecheck, lint, format:check, phi-scan, build, attw, smoke, check:process, check:no-emdash, check:no-internal-refs, check:claude-card, check:readme, check:catalog, check:docs-content: OK. actionlint: clean.
  • No changeset: docs-content/, CI, scripts, and devDependencies are not in the tarball.

Choices

  • The version script keeps node scripts/sync-version.mjs rather than cosyte-process sync-version. The shared step rewrites VERSION in src/index.ts only, and this package's own code reads its version (cosyte --version, the MCP server info), so the constant lives in src/core/version.ts and is re-exported from the entry; the local script also keeps the version asserted in docs-content/installation.md in step.
  • After this merges, Dependabot may open the dev-only minimatch advisory (GHSA-g3hv-75wg-m249) for typedoc's copy; it is not in the published tarball, and typedoc 0.28 cannot take minimatch 11.

@NSchatz
NSchatz merged commit dadc199 into main Nov 28, 2026
25 checks passed
@NSchatz
NSchatz deleted the ci/docs-reference-check branch November 28, 2026 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant