Repository navigation
fix(playground): generate React Router route types during the build - #866
Closed
morinokami wants to merge 1 commit into
Closed
morinokami wants to merge 1 commit into
morinokami wants to merge 1 commit into
Conversation
`vp check` now typechecks playground/react-router, whose routes import `./+types/*`. Only the dev server and `react-router typegen` write those files, so a fresh checkout had none after `vp run build:all` and the check failed in CI. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8F8mZkyRDommrR2VQzcuN
Member
|
Woops, I fixed the same thing just now. |
Collaborator
Author
|
Got it, closing this then. Thanks! |
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.
This PR makes the React Router playground generate its route types during the build, so that
vp checkpasses on a fresh checkout. Thebuild and typecheckjob has failed onmainsince 7937843 with three errors inplayground/react-router.Changes
Run
react-router typegenbeforevp buildSince 7937843,
vp checktypechecksplayground/react-router. Its routes import./+types/smokeand./+types/users, which React Router writes to.react-router/types. Only the dev server andreact-router typegenwrite that folder;vp builddoes not. CI runsvp run build:alland thenvp checkon a fresh checkout, so the folder was missing and the check failed. A local checkout usually has the folder from an earlier dev server or test run, which hides the problem.The playground's
buildscript now runsreact-router typegenfirst, sovp run build:allleaves the types in place, asTESTING.mddescribes for generated app types.Before / after
vp checkafter removingplayground/react-router/.react-routerand runningvp run build:all:Design decisions
buildscript, so CI and local runs get the types from the samevp run build:allstep. The workflow files are unchanged..react-router/stays ignored by Git.Checked
.react-router:vp run --cache build:all,node test/check-playground-build-artifacts.mjs,vp checkandvp run check:typespackages/void/test/integration/react-router.test.ts🤖 Generated with Claude Code