Repository navigation
Move route map to app/routes.ts (Remix CLI convention) - #127
Merged
Merged
Conversation
Co-Authored-By: Kent C. Dodds <me@kentcdodds.com>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Contributor
Author
|
@coderabbitai review |
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.
Moves the route map from
app/config/routes.tstoapp/routes.ts, where the Remix CLI looks for it (remix doctor/remix routes). The aggregate becomes a named export, and the CLI requires that name to beroutes. This is recommendation 3 from the rc.4 upgrade (#124), which Kent approved.import routes from '#app/config/routes.ts') becomeimport { routes } from '#app/routes.ts'. Type-only imports becomeimport { type routes } ..., which is the repo's formatter style.remix.jsonasset allowlist:app/config/routes.tsbecomesapp/routes.ts. The admin client imports the route map in the browser, so the new path has to be on the allowlist.rootRoutes,oauthRoutes,mcpRoutes,adminRoutes,adminApiRoutes) are unchanged.app/actions/controller.tsx. Handlers stay inapp/routes/*, soremix doctorstill warnsRoot route map is missing action controller app/actions/controller.tsx. That is expected. Before this PR it also warnedProject is missing app/routes.ts, and that warning is now gone.Test Plan
npm run format,npm run lint(no errors; the only two warnings are pre-existing ones inapp/helpers/version.test.ts), andnpm run validate(typecheck plus 271/271 tests) all pass.npx remix doctorpasses, with only the expected controller warning left.npx remix routesloads and prints the full route tree.rg "config/routes"finds no matches outsidenode_modules.test/fixtures/audio:/adminreturns 200/assets/app/routes.tsreturns 200/assets/app/config/routes.tsreturns 404/returns 302 to/admin/healthreturns 200Checklist
Screenshots
N/A: this is a file move with no UI change.
Link to Devin session: https://app.devin.ai/sessions/a572734e245b461eab5cb184593959c9
Open in Devin Desktop: https://app.devin.ai/desktop/session/a572734e245b461eab5cb184593959c9?variant=devin
Requested by: @kentcdodds