Commit Graph
2 Commits
Author SHA1 Message Date
Kacper Kapuściak 1071933813 feat(config): discover e2e.config.js and document a JavaScript setup (#1280) 2026-10-20 08:53:36 -04:00
Dery Ferdika c4f3ef102f fix(scripts): derive the docs example files from the filesystem (#1017)
`check-docs-examples.ts` asserted that every code block a page shows from
`docs/examples/` matches the file it came from, but it iterated a hand-kept
page map. A new example that no page showed was never read, so the check
passed while `AGENTS.md`'s invariant ("`docs/examples/` is shown verbatim on
docs pages and in `skills/e2e/`") silently broke. The map also names which
page owns each example, and the docs and skill are its only readers, so
nothing else could catch a forgotten file.

Read the file list from the filesystem instead, the way `error-codes.ts`
reads the published packages' source roots rather than trusting a literal
list, and report every example the map does not carry. The map stays as the
declaration of *which* page shows an example; the filesystem decides whether
one exists at all.

Verified: `node scripts/check-docs-examples.ts` exits 1 on an example added
with no page and 0 on the current tree; `node --test scripts/**/*.test.ts`
passes (5 new cases); `tsc -p scripts`, `oxlint`, and `fallow dead-code`
are clean. No changeset: `scripts/` is not a published package.
2026-10-13 14:10:51 +02:00