Repository navigation
Drop the duplicate vite type generator and make CI run just check - #5
Merged
Merged
Conversation
This was referenced Sep 17, 2026
asg017
force-pushed
the
drop-duplicate-vite-typegen
branch
from
September 25, 2026 16:53
65d9e9a to
ceaffbd
Compare
`just check` was red for everyone: the `check` npm script ran `tsc -p tsconfig.node.json` over vite.config.ts, which needs Node globals, so it failed on ~50 errors from vite's own .d.ts plus a "cannot find module 'fs'" on our own import. The tempting fix is `@types/node`, but the only reason those Node globals were needed at all is a `page-data-types` vite plugin that read `src/page_data/*_schema.json` and wrote `.types.ts` -- duplicating what `just types-pagedata` already does through the json2ts CLI. Two generators for one artifact, and the redundant one was also the one that could silently disagree with the committed types (it skipped the prettier pass the Justfile recipe runs). So delete it instead of typing it. `just types-pagedata` is now the single generator, `tsconfig.node.json` has nothing left to check, and the `check` script is just svelte-check. `json-schema-to-typescript` stays in package.json -- the Justfile shells out to its json2ts binary. Editing a schema during `just dev-with-hmr` no longer regenerates types as a side effect of the dev server; `just types-watch` is the recipe for that. None of this was caught because CI ran neither `just check` nor `just format-check`, so add both, before the build. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
asg017
force-pushed
the
drop-duplicate-vite-typegen
branch
from
September 25, 2026 17:30
ceaffbd to
358d009
Compare
This was referenced Sep 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 Claude-generated PR description
Stacked on #4. This is the PR that makes
just checkgreen and puts bothquality gates in CI.
The problem
just checkwas red, on this branch and onmain:frontend/package.json'scheckscript ransvelte-checkandtsc -p tsconfig.node.json. Thesvelte-checkhalf passed; the second halftype-checked
vite.config.ts, which needed Node globals — and needed them onlybecause of an inline
page-data-typesvite plugin that importedfsandjson-schema-to-typescript.That plugin duplicated
just types-pagedata, which already generates the samepage-data types via the
json2tsCLI. Two generators for one artifact, and theredundant one was what made the type-check impossible without another dependency.
The fix is deletion
Rather than adding
@types/node, the duplicate generator goes:page-data-typesplugin (buildStart+handleHotUpdate) and itsfs/json-schema-to-typescriptimports are gone;plugins: [svelte()]frontend/tsconfig.node.jsondeletedcheckis now justsvelte-check --tsconfig ./tsconfig.app.jsonNo
@types/nodewas added.json-schema-to-typescriptstays inpackage.json—just types-pagedatashells out to itsjson2tsbinary.just types-pagedatais now the single generator, so the two can no longerdisagree.
Verified the removal took effect:
.types.tsmtimes are unchanged across ajust frontendrun, so the build no longer writes them at all.CI now runs both gates
just checkandjust format-checkadded to.github/workflows/test.yml. CIpreviously ran neither, which is how both drifted red unnoticed — and why #2 and
#4 were needed to make them simultaneously satisfiable first.
Verification
just checkjust format-checkjust types-check-freshjust telemetry-doc-checkjust testuvx ty check→ "All checks passed!";svelte-check→96 FILES 0 ERRORS.just frontendbuilds and leaves the tree clean. Repo-wide grep confirms zeroremaining references to
tsconfig.nodeorpage-data-types.One behaviour change
Editing a
*_schema.jsonduringjust dev-with-hmrno longer regenerates typesas a side effect of the dev server.
just types-watchis the recipe for that. Nodocumentation referenced the old behaviour.
Out of scope
publish.ymlconsolidation — the ticket floats it as optional; not done.🤖 Generated with Claude Code