-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Type-safe href #12994
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
Type-safe href #12994
Conversation
🦋 Changeset detectedLatest commit: 0487323 The changes in this PR will be included in the next version bump. This PR includes changesets to release 11 packages
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 |
8ed1541
to
004e483
Compare
208f173
to
9849f77
Compare
b268db6
to
fe2ff5d
Compare
c69ff0e
to
263c979
Compare
Looks like Node v22.14 was just released so CI is using that, but it broke some of our unit tests. Seems unrelated to any changes in this PR. UPDATE: should be fixed with the latest commit in this PR |
return path | ||
.split("/") | ||
.map((segment) => { | ||
const match = segment.match(/^:([\w-]+)(\?)?/); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit, but this regex could be cached outside the loop.
The `--version` flag reads the local `package.json` at `../package.json`. While this path is correct when running from source, it is incorrect after the CLI is built since `package.json` stays at the root of the package, but the built code gets nested into `dist/`. I only noticed this discrepancy because I was converting the unit tests to integration tests to fix an incompatibility issue with Node v22.14 and `esbuild-register`.
* wip: type-safe href * consistent params parsing + type generation * href tests * href typegen tests * href types normalize route full path * fix `react-router --version` The `--version` flag reads the local `package.json` at `../package.json`. While this path is correct when running from source, it is incorrect after the CLI is built since `package.json` stays at the root of the package, but the built code gets nested into `dist/`. I only noticed this discrepancy because I was converting the unit tests to integration tests to fix an incompatibility issue with Node v22.14 and `esbuild-register`.
* Type-safe href (#12994) * wip: type-safe href * consistent params parsing + type generation * href tests * href typegen tests * href types normalize route full path * fix `react-router --version` The `--version` flag reads the local `package.json` at `../package.json`. While this path is correct when running from source, it is incorrect after the CLI is built since `package.json` stays at the root of the package, but the built code gets nested into `dist/`. I only noticed this discrepancy because I was converting the unit tests to integration tests to fix an incompatibility issue with Node v22.14 and `esbuild-register`. * bump patch to minor for new API: `href`
…d-route-typegen * upstream/dev: bump patch to minor for new API: `href` Type-safe href (remix-run#12994) docs: prerender/ssr:false (remix-run#13005) Skip action-only resource routes with prerender:true (remix-run#13004) Update docs for spa/prerendering Improvements to ssr:false + prerender scenarios (remix-run#12948)
🤖 Hello there, We just published version Thanks! |
🤖 Hello there, We just published version Thanks! |
@pcattori and @brophdawg11: Wasn't https://github.com/remix-run/react-router/blob/dev/.changeset/three-eyes-flow.md |
Yeah I noticed that this AM too - I think it's because a few of these changes in 7.2.0 landed in |
🤖 Hello there, We just published version Thanks! |
You should get:
/a
)("/b/:b", { notb: "wrong" })
)Experimental releases
0.0.0-experimental-208f173a8
0.0.0-experimental-263c97949
0.0.0-experimental-8e9d8ef63
TODO