Commit Graph
1 Commits
Author SHA1 Message Date
Locust agent 86028df383 feat(scripts): add the pre-redesign route compatibility check
scripts/check-routes.mjs reads the committed "before" route list from
docs/pre-redesign-routes.md and proves every path in it still resolves
at the branch head.

Two halves, both required for every old path:

- Router half: the path resolves against the route table of
  public/src/router/index.js as a route path, an alias or the target of
  a redirect chain.
- Published-output half: the directory the Pages workflow uploads
  (./public/dist) answers a cold request to the old URL. index.html and
  the 404.html fallback must both boot the app from the same bundle, and
  the route table inside that bundle must still carry the old path and
  resolve it to the same target as the router config.

The route list is parsed at run time, so a path added to the document
later is picked up without touching the script. The published output is
read from the workflow file, so the check follows the real deploy target.

Plain Node, no runtime dependency and no test framework: exit 0 when
every old path resolves, 1 naming each path that does not, 2 on a usage
or I/O error.
2026-11-02 20:51:28 +00:00