Repository navigation
ci(docs): check the generated API reference and regenerate it at release - #135
Merged
Merged
Conversation
…ratchet and mutation
… the shared gate finds
…ternal references
…le sample, and Windows excludes
… docs/no-internal-references
…o test/export-surface-record
… vendored tarballs, save-exact, test:property, Prettier over the tree
…regenerate it in the version script
# Conflicts: # AGENTS.md # package.json # pnpm-lock.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
pnpm check:docs-reference(cosyte-docs-reference --check) runs as a step of thedocumentsjob, andpnpm docs:referenceregenerates the pages.versionscript runscosyte-docs-referenceafter the version sync, so a release regeneratesdocs-content/api/in the version commit.docs-content/api/src.mdis regenerated: it had drifted from the source (it lackedOutputSink, andwriteStdouthad the wrong return type).@cosyte/processmoves from 0.1.7 to 0.1.10, which shipscosyte-docs-reference.typedoc>minimatchoverride at 10.2.6. The existingminimatch@>=10.0.0 <11.0.1override forces 11.0.1 into typedoc, which then fails withmini.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-referencebefore 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 newversionscript 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.docs-content/, CI, scripts, and devDependencies are not in the tarball.Choices
versionscript keepsnode scripts/sync-version.mjsrather thancosyte-process sync-version. The shared step rewritesVERSIONinsrc/index.tsonly, and this package's own code reads its version (cosyte --version, the MCP server info), so the constant lives insrc/core/version.tsand is re-exported from the entry; the local script also keeps the version asserted indocs-content/installation.mdin step.