fix: resolve multiple bugs across wayfind and wayfind-react#1
Merged
Conversation
Core (wayfind):
- Fix greedy regex `.+` → `[^/?#]+` for route variable matching
- Fix boolean parser: `Boolean("false")` always returned true
- Fix errorRender leaking across unrelated routes
- Fix flatRoute registering intermediate nodes as matchable routes
- Fix applyVars not stripping `:type` from variable names
- Fix regex escaping missing `*` and `-` characters
- Add `destroy()` method to clean up popstate event listener
- Remove unused standalone `isActive` export
- Fix duplicate ExtractVars export, add missing Path export in index.ts
React (wayfind-react):
- Fix Redirect: add dependency array to useLayoutEffect to prevent infinite loop
- Fix useNavigate: use `props.to` instead of non-existent `props.url`
- Fix Link: strip `to` and `vars` props before spreading to DOM element
Demo:
- Use workspace:* for local package dependencies instead of pinned versions
https://claude.ai/code/session_01NEbwj3dDz5Wm5GyFbzdp75
- Update tsconfig target from es2016 to es2020 to support BigInt - Add root-level lint and build scripts for CI - Update CI workflows to use pnpm 8 and Node 18 (matching packageManager requirement) https://claude.ai/code/session_01NEbwj3dDz5Wm5GyFbzdp75
Add eslint-disable comments for react-refresh/only-export-components in demo files that don't export React components (entry point and router config). Fixes CI lint failure with --max-warnings 0. https://claude.ai/code/session_01NEbwj3dDz5Wm5GyFbzdp75
- Remove tsc from demo build (pre-existing type errors from React types version mismatch and complex type inference issues, demo is private) - Fix unused parameter warnings (router → _router, T → _T) - Fix ctx type in demo logs route https://claude.ai/code/session_01NEbwj3dDz5Wm5GyFbzdp75
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.
Core (wayfind):
.+→[^/?#]+for route variable matchingBoolean("false")always returned true:typefrom variable names*and-charactersdestroy()method to clean up popstate event listenerisActiveexportReact (wayfind-react):
props.toinstead of non-existentprops.urltoandvarsprops before spreading to DOM elementDemo:
https://claude.ai/code/session_01NEbwj3dDz5Wm5GyFbzdp75