Repository navigation
refactor: remove the unused pageInput set from viteBuild - #17987
Conversation
`viteBuild` built a `pageInput` set of module ids and never read it. Its consumer was `ssrBuild(opts, internals, pageInput, container)`, which went away with the Environment API in withastro#14306; the producer stayed behind, along with a comment that already suspected itself ("comment above may be outdated ?"). With the set gone, the `routeIsRedirect` guard around its only write has no body left, so it goes too, and with it the now-unused import. No behaviour change: nothing else in the repo reads `pageInput`.
|
|
A note on the two red checks, since neither looks like it comes from this diff — but one of them I could not prove, so I want to be upfront about that. Smoke fails during install, before any of this PR's code runs: That is a preview-package pin that no longer resolves. Integrations has 8 failures, all in Happy to rebase, or to dig further into the cloudflare runtime tests if you think they are connected. |
What
viteBuildinpackages/astro/src/core/build/static-build.tsbuilds apageInputset of module ids and never reads it.Its consumer used to be
ssrBuild(opts, internals, pageInput, container), whichwas removed with the Environment API in #14306. The producer stayed behind —
together with a comment that already suspected itself:
pageInputhas no other reference anywhere inpackages/astro/src.Changes
pageInputset.if (!routeIsRedirect(pageData.route))guard, whose only body wasthe single
pageInput.add(...).routeIsRedirectimport, unused after that.9 deletions in one file, no behaviour change.
Checks
tsc --noEmit -p packages/astro/tsconfig.jsonreports 0 errors with the change,and 0 on the same tree without it — identical to the baseline.
No changeset: nothing observable changes for users, matching how internal-only
changes land here (e.g. #17430, #16734).
Use of AI
An automated check flagged the collection as written-but-never-read; I traced the
consumer's removal to #14306, confirmed there are no other readers, and wrote and
verified the change myself.