Skip to content

build: retire the old TypeDoc theme and its assets - #85

Merged
soimy merged 4 commits into
docs/deploy-and-redirectsfrom
docs/retire-old-theme
Oct 1, 2026
Merged

soimy merged 4 commits into
docs/deploy-and-redirectsfrom
docs/retire-old-theme

Conversation

@soimy

@soimy soimy commented Sep 30, 2026 •

Copy link
Copy Markdown
Owner

Phase E of #81, stacked on the deployment phase. Review order: #82 → content migration → deployment → this.

What goes

typedoc-unhoax-theme has been unreferenced since the API reference moved to markdown, and the two assets it loaded were still being published.

  • the theme is out of devDependencies (and out of node_modules after a fresh npm ci against the committed lockfile);
  • assets/custom.css and assets/custom.js are deleted and out of the files allowlist with them;
  • the published tarball goes from 30 files / 67kB to 28 files / 66.6kB, with assets/favicon.ico the only asset left in the allowlist (the repository still tracks the icons and the preview image; they were never published) — measured with npm pack --dry-run before and after;
  • AGENTS.md and docs/contributor/compatibility.md carry the new allowlist and the measured counts.

What stays, and why

gh-pages keeps its place for now: doc:publish is the fallback deployment path until the Pages source is switched to GitHub Actions, and removing it before that switch would leave no way to publish. The deferred-work ledger records it as the one remaining step, together with cz-conventional-changelog (interactive commitizen commits only, unrelated to this migration).

Verification

npm ci --include=dev against the committed lockfile; lint 0/0; format:check; typecheck (TS 7.0.2); verify:docs; docs:build (11 legacy redirects written); 126 tests passed / 2 skipped; coverage 100%; verify:package green — bundler, node16, nodenext and the three documentation examples.

@soimy
soimy force-pushed the docs/retire-old-theme branch from c340ea0 to 5178863 Compare September 30, 2026 06:59
@soimy
soimy force-pushed the docs/retire-old-theme branch from 5178863 to 9d83ba8 Compare September 30, 2026 07:40
@soimy
soimy force-pushed the docs/retire-old-theme branch from 9d83ba8 to 61c3824 Compare September 30, 2026 07:45
@soimy
soimy force-pushed the docs/retire-old-theme branch from 61c3824 to 9904083 Compare September 30, 2026 07:57
@soimy
soimy force-pushed the docs/retire-old-theme branch 2 times, most recently from d24df78 to fe378e9 Compare September 30, 2026 08:05
@soimy
soimy force-pushed the docs/retire-old-theme branch 4 times, most recently from 090c2e1 to 3386b4d Compare September 30, 2026 08:21
@soimy
soimy force-pushed the docs/retire-old-theme branch from 3386b4d to 4158ba0 Compare September 30, 2026 08:24
@soimy
soimy force-pushed the docs/retire-old-theme branch from 4158ba0 to 247952c Compare September 30, 2026 08:32
@soimy
soimy added this pull request to stack #86 September 30, 2026 08:41
@soimy
soimy force-pushed the docs/retire-old-theme branch from 247952c to 04df105 Compare September 30, 2026 10:33
@soimy
soimy force-pushed the docs/retire-old-theme branch 2 times, most recently from df4b8df to 75cfd67 Compare September 30, 2026 10:47
@soimy
soimy force-pushed the docs/retire-old-theme branch 2 times, most recently from 38a1e3a to 8ed5bcb Compare September 30, 2026 10:53
@soimy

soimy commented Sep 30, 2026

Copy link
Copy Markdown
Owner Author

This layer is where files changed (the theme retirement took the tarball from 30 files to 28), so it is where the missing guarantee belongs: what the package publishes was never asserted. npm pack had been measured once — 28 files, no docs/ entry — but nothing failed if the site's source tree or the uncompressed PNGs joined the allowlist, or if src/ and a tsconfig left it. That mattered more after this migration put a whole tracked docs/ tree next to src, which is also in the allowlist.

scripts/verify-package.mjs now compares npm pack --dry-run --json against the intended file list and names the difference. Measured in both directions before trusting it:

State Result
docs added to files exit 1 — 179 files, not the 28 intended — not expected: docs/.vitepress/config.mts, … and 143 more
src dropped from files exit 1 — 21 files, not the 28 intended — missing: src/abstract-bin.ts, src/geom/Rectangle.ts, …
intended allowlist exit 0 — ✓ npm pack --dry-run lists the 28 intended files

Commit: build: pin the published file set, which also records in AGENTS.md that the list is pinned and where to edit it. The step numbering in that script was renumbered around the new check (it had two steps numbered 3).

@soimy
soimy force-pushed the docs/retire-old-theme branch from f0794f6 to 22c85b9 Compare September 30, 2026 12:56
@soimy
soimy force-pushed the docs/retire-old-theme branch from 22c85b9 to 0d166e4 Compare September 30, 2026 13:05
@soimy
soimy force-pushed the docs/retire-old-theme branch from 0d166e4 to 20ca39e Compare September 30, 2026 13:16
@soimy

soimy commented Sep 30, 2026

Copy link
Copy Markdown
Owner Author

The one item this layer's audit could not fix, so it goes in the ledger with the rest of the packaging follow-ups: a CommonJS TypeScript consumer under node16/nodenext gets TS1479 for a static import and TS1471 for import … = require(…), while await import(…), node10/bundler resolution and JavaScript require() all work.

Local to this PR because the fix is the same kind of decision the other entries here are: an exports map with per-format conditions and declarations — which also seals the deep imports this repository keeps working, hence 3.0.0. The sharp edge itself is documented for users in docs/user/troubleshooting.md (that part rides on #83); the measurements and the gate's blind spot are in the new bullet, and the section's "Neither … both" became "None of these … each" now that there are three.

@soimy
soimy force-pushed the docs/retire-old-theme branch from 20ca39e to 2f0bb83 Compare September 30, 2026 13:23
@soimy
soimy force-pushed the docs/retire-old-theme branch from 2f0bb83 to 41aab52 Compare September 30, 2026 13:30
soimy added 4 commits October 1, 2026 23:50
Phase E of #81. `typedoc-unhoax-theme` has been unreferenced since the API
reference moved to markdown, and the two theme assets it loaded are dead weight
in the published package.

- `typedoc-unhoax-theme` is out of `devDependencies`; `npm ci` still installs the
  committed lockfile, and the package is gone from `node_modules`.
- `assets/custom.css` and `assets/custom.js` are deleted, and out of the `files`
  allowlist with them: measured `npm pack` goes from 30 files / 67kB to
  **28 files / 66.6kB**, with `assets/favicon.ico` as the only asset left.
- `AGENTS.md` and `docs/contributor/compatibility.md` carry the new allowlist and
  the measured counts.
- `gh-pages` stays for now: `doc:publish` is the fallback deployment path until
  the repository's Pages source is switched to GitHub Actions, and the ledger
  records that as the one remaining step.

Verified after the change: `npm ci --include=dev` against the committed lockfile,
lint 0/0, format:check, typecheck (TS 7), verify:docs, docs:build (11 legacy
redirects written), 126 tests passed / 2 skipped, coverage 100%, verify:package
green (bundler, node16, nodenext, and the three documentation examples).
Two findings that are not broken today and belong in their own commits: the workflows pin
action majors several releases behind (docs.yml four of them, and nothing in the repository
raises those automatically), and the README's only local image is a 2.9 kB file the `files`
allowlist omits while `AGENTS.md` frames the fix as costing 468 kB.
What the tarball contains was decided by the `files` allowlist and never asserted: `npm pack` was
measured once at 28 files with no `docs/` entry, and nothing failed if the site's source tree or the
uncompressed PNGs joined the allowlist, or if `src/` and a tsconfig left it.

`scripts/verify-package.mjs` now compares `npm pack --dry-run --json` against the intended list and
names the difference, in both directions. Measured: with `docs` added to `files` it reports "179
files, not the 28 intended — not expected: docs/.vitepress/config.mts, … and 143 more"; with `src`
removed, "21 files … missing: src/abstract-bin.ts, …"; on the intended allowlist it passes.
AGENTS.md says the list is pinned and where.
The fix for it is an `exports` map, and that also seals the deep imports this project keeps working, so
it belongs to 3.0.0 rather than to the documentation stack — which is exactly what the deferred-work
ledger is for. Measured on the published tarball: TS1479 for a static import from a `.cts` file under
node16/nodenext and TS1471 for `import ... = require(...)`, while dynamic `import()`, node10/bundler
resolution and JavaScript `require()` all compile.
@soimy
soimy force-pushed the docs/retire-old-theme branch from 41aab52 to 91f973a Compare October 1, 2026 15:51
@soimy
soimy marked this pull request as ready for review October 1, 2026 15:55
@soimy

soimy commented Oct 1, 2026

Copy link
Copy Markdown
Owner Author

Rebased on the current #84 head and out of draft. Gates on this head (91f973a): Node 20/22/24 matrix green, Build documentation green, Deploy to GitHub Pages correctly skipped on a PR. Locally the top layer also passes build + verify:package (28 intended files, six documentation examples executed against the installed tarball).

Three layers, one merge order: #83 → #84 → #85. Each next layer's base branch needs retargeting to master once the previous one is squashed.

@greptile-apps

greptile-apps Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Low risk] Removes old documentation theme assets and updates build verification.

Safe to merge; no blocking findings were identified.

What we checked:

  • Validated that the 28-file package archive, dry-run listing, and inventory matched and verification passed; in an isolated checkout, adding a retired asset to the allowlist caused the 29-file package to be rejected. T-Rex
  • Opened and compared docs before and after asset removal; all four pages loaded with content and returned 200 in both versions, with no failed requests. T-Rex
  • Reproduced gate behavior on the package: normal 28-file listings passed, and after altering the allowlist to include assets/custom.css, the 29-file package was rejected. T-Rex
  • Observed that all four docs pages returned 200 and displayed content in both runs, and the absence of a favicon link predates this PR. T-Rex

Summary

This PR removes the old TypeDoc theme and its custom assets, updates the published-file list, and adds an exact package inventory check. The package contains the intended 28 files, and the documentation pages continue to render. No issues were identified.

Reviews (1) · Last reviewed commit: "docs: record the CommonJS TypeScript imp..."

@soimy
soimy merged commit 0c7d15e into master Oct 1, 2026
6 checks passed
@soimy
soimy deleted the docs/retire-old-theme branch October 1, 2026 16:13
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