Skip to content

Commit 9d83ba8

Browse files
committed
build: retire the old TypeDoc theme and its assets
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).
1 parent 0b3d7b0 commit 9d83ba8

7 files changed

Lines changed: 13 additions & 76 deletions

File tree

‎AGENTS.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -334,15 +334,15 @@ English keeps the project history usable for every contributor and every downstr
334334
There is still no `exports` field, so deep imports (`maxrects-packer/dist/...`) work; adding one
335335
would seal off deep paths, which is breaking and therefore reserved for 3.0.0.
336336
- Published content is decided by the `files` allowlist in `package.json`: `dist` + `src` +
337-
`assets/{custom.css,custom.js,favicon.ico}` + `CHANGELOG.md` + `tsconfig*.json` + `typedoc.json`
338-
(measured `npm pack`: ~62kB / 30 files — the byte count drifts slightly between builds, the file
337+
`assets/favicon.ico` + `CHANGELOG.md` + `tsconfig*.json` + `typedoc.json`
338+
(measured `npm pack`: ~66kB / 28 files — the byte count drifts slightly between builds, the file
339339
count does not; the published 2.7.4 tarball was 67.0kB / 33 files). The differences from 2.7.4 are
340340
all deliberate: `eslint.config.js`, `.eslintrc.json` and `.github/workflows/node.js.yml` are no
341341
longer published, `dist/maxrects-packer.cjs` is new, and `UPGRADE_SUMMARY.md` was deleted as an
342342
obsolete dependency-upgrade log. There is **no `.npmignore`**, so npm falls back to `.gitignore`
343343
(which lists `dist`/`lib`), but `files` wins and `dist` still ships. Note that `assets/*.png` is not
344344
in the allowlist (2.7.x did not ship it either), so the README images stay broken on the npm page;
345-
adding the whole `assets` directory would fix that at the cost of growing the tarball from ~62kB to
345+
adding the whole `assets` directory would fix that at the cost of growing the tarball from ~66kB to
346346
~530kB (`assets/` is 468kB, mostly uncompressed PNG). `clean` removes both `dist` and the legacy
347347
`lib`.
348348
- The `resolved` fields in `package-lock.json` must point at `registry.npmjs.org`: this machine has a

‎assets/custom.css‎

Lines changed: 0 additions & 21 deletions
This file was deleted.

‎assets/custom.js‎

Lines changed: 0 additions & 34 deletions
This file was deleted.

‎docs/contributor/compatibility.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ fixture compiled with `bundler`, `node16` and `nodenext`.
5353

5454
## What ships
5555

56-
The `files` allowlist decides: `dist`, `src`, `assets/{custom.css,custom.js,favicon.ico}`,
57-
`CHANGELOG.md`, `tsconfig*.json` and `typedoc.json` — currently 30 files. `docs/`, the documentation
56+
The `files` allowlist decides: `dist`, `src`, `assets/favicon.ico`, `CHANGELOG.md`, `tsconfig*.json`
57+
and `typedoc.json` — currently 28 files. `docs/`, the documentation
5858
site and internal plans are not in it and never ship.
5959

6060
## Node version

‎docs/plans/deferred-work.md‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,11 @@ the old TypeDoc site published. Switching the repository's Pages source to **Git
5555
maintainer step that has to happen before the first deployment; until then `doc:publish` still pushes to
5656
`gh-pages`, and the two paths must not be used together.
5757

58-
Still open: retiring the old theme, `gh-pages` and the theme assets from `devDependencies` and the
59-
`files` allowlist. The published tarball is unaffected: `docs/` is not in the `files` allowlist.
58+
The old theme is retired: `typedoc-unhoax-theme`, `assets/custom.css` and `assets/custom.js` are gone
59+
from `devDependencies`, the repository and the `files` allowlist, which takes the published tarball from
60+
30 files to 28 (`assets/favicon.ico` stays).
61+
62+
Still open: dropping `gh-pages` (and the `doc:publish` alias that uses it) once the Pages source is
63+
switched to GitHub Actions — until then it is the fallback deployment path. `cz-conventional-changelog`
64+
is unrelated stale tooling (interactive commitizen commits only). The published tarball is otherwise
65+
unaffected: `docs/` is not in the `files` allowlist.

‎package-lock.json‎

Lines changed: 0 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
"files": [
1010
"dist",
1111
"src",
12-
"assets/custom.css",
13-
"assets/custom.js",
1412
"assets/favicon.ico",
1513
"CHANGELOG.md",
1614
"tsconfig.json",
@@ -79,7 +77,6 @@
7977
"tslib": "^2.8.1",
8078
"typedoc": "^0.28.20",
8179
"typedoc-plugin-markdown": "^4.13.1",
82-
"typedoc-unhoax-theme": "^0.5.3",
8380
"typedoc-vitepress-theme": "^1.1.4",
8481
"typescript": "npm:@typescript/typescript6@^6.0.2",
8582
"vitepress": "^1.6.4",

0 commit comments

Comments
 (0)