-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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(react): Match routes with parseSearch
option in TanStack Router instrumentation
#14328
fix(react): Match routes with parseSearch
option in TanStack Router instrumentation
#14328
Conversation
5ba4f26
to
67bb292
Compare
@lsmurray Unfortunately this is (rightfully) failing the tests. Using the new signature would be a breaking change because it would break on TanStack versions we already promised to support. Do you think it would be possible to isolate your PR to only the |
good catch - will isolate it |
I've updated the PR - the only location we have to parse search is initial load since we're getting search from the window. In other places where we get search from the location the search has already been parsed. |
@lforst - let me know if there is anything else you need from me to get this across the finish line. |
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.
Whoops sorry I fumbled this PR after running the tests. Lgtm - thanks for the reminder!
parseSearch
option in TanStack Router instrumentation
This PR adds the external contributor to the CHANGELOG.md file, so that they are credited for their contribution. See #14328 Co-authored-by: lforst <[email protected]>
The current sentry implementation was breaking in my application because we use custom search param serialization.
The default tanstack implementation uses
this.options.parseSearch
to parse the search string into a parsed locationhttps://github.com/TanStack/router/blob/55891518fcfa7c308e1db4149d357cf38700c882/packages/react-router/src/router.ts#L1015-L1016
The
matchRoutes
signature that sentry was using has been deprecated.https://github.com/TanStack/router/blob/55891518fcfa7c308e1db4149d357cf38700c882/packages/react-router/src/router.ts#L1063-L1098
The signature only exists to support sentry as far as I can tell
TanStack/router#2164
TanStack/router#2165
This PR implements two fixes
matchRoutes
signature instead of the deprecated signatureparseSearch
to support applications that use custom search param serialization.Before submitting a pull request, please take a look at our
Contributing guidelines and verify:
yarn lint
) & (yarn test
).