Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(remix-dev): normalize /route routeId, update route collision warnings #5459

Merged
merged 18 commits into from
Feb 21, 2023

Conversation

mcansh
Copy link
Collaborator

@mcansh mcansh commented Feb 15, 2023

updates some missed logic so <dir>/route no longer conflicts in some cases.

updates conflict logic so it no longer throws errors and instead displays a nice error message about your conflicts

 ⚠️ Route Path Collision: "/products/:pid"
 The following routes all define the same URL, only the first one will be used
 🟢️️ routes/products.$pid.tsx
 ⭕️️ routes/products.$productId.tsx
⚠️ Route Path Collision: "/dashboard"
The following routes all define the same URL, only the first one will be used
🟢️️ routes/dashboard/route.tsx
⭕️️ routes/dashboard.tsx
⚠️ Route Path Collision: "/"
The following routes all define the same URL, only the first one will be used
🟢️️ routes/_landing._index.tsx
⭕️️ routes/_dashboard._index.tsx
⭕️ routes/_index.tsx

Closes: #5470
Closes: #5471
Closes: #5495

  • Docs
  • Tests

Testing Strategy:

@changeset-bot
Copy link

changeset-bot bot commented Feb 15, 2023

🦋 Changeset detected

Latest commit: e8447f0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 18 packages
Name Type
remix Patch
@remix-run/dev Patch
create-remix Patch
@remix-run/css-bundle Patch
@remix-run/architect Patch
@remix-run/cloudflare Patch
@remix-run/cloudflare-pages Patch
@remix-run/cloudflare-workers Patch
@remix-run/deno Patch
@remix-run/eslint-config Patch
@remix-run/express Patch
@remix-run/netlify Patch
@remix-run/node Patch
@remix-run/react Patch
@remix-run/serve Patch
@remix-run/server-runtime Patch
@remix-run/testing Patch
@remix-run/vercel Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@mcansh mcansh marked this pull request as draft February 15, 2023 05:03
@mcansh mcansh force-pushed the logan/normalize-route branch 2 times, most recently from ac27288 to 49b50ae Compare February 15, 2023 14:57
@mcansh mcansh marked this pull request as ready for review February 15, 2023 15:02
@mcansh mcansh changed the title fix(remix-dev): normalize /route routeId fix(remix-dev): normalize /route routeId, update route collision warnings Feb 15, 2023
Copy link
Member

@ryanflorence ryanflorence left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't look at the code, just the tests and it looks great :)

@ryanflorence ryanflorence merged commit 99aec15 into dev Feb 21, 2023
@ryanflorence ryanflorence deleted the logan/normalize-route branch February 21, 2023 19:50
@github-actions github-actions bot added the awaiting release This issue has been fixed and will be released soon label Feb 21, 2023
@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version v0.0.0-nightly-aecf731-20230222 which includes this pull request. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting release This issue has been fixed and will be released soon CLA Signed package:dev
Projects
None yet
Development

Successfully merging this pull request may close these issues.

warn and not exit for route conflicts, overhaul messaging <folder>/route is conflicting when it shouldn't
3 participants