Prepare Wouter 4: modern browser baseline and stronger types - #571
Merged
Conversation
Target ES2022, require React 18.2 and TypeScript 5.2, and retain Preact 10 support. Remove obsolete compatibility code, fix optional parameter caching, and improve route and navigation declarations. Add framework and type compatibility matrices, SSR coverage, and dependency-inclusive size measurements. Verified runtime tests, all supported React versions, strict type consumers, lint, formatting, package exports, and bundle limits.
|
|
size-limit report 馃摝
|
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.
Wouter 4 raises the compatibility baseline to remove obsolete fallbacks, reduce package size, and improve TypeScript inference. This PR is based on v3.11.0 and keeps its React 18 memory-routing fixes and regression tests.
Compatibility and runtime
specs/browser-support.md.Object.hasOwn()to fix optional-parameter caching when parameter names change while their values remainundefined.TypeScript
Improve route-literal inference, optional and repeated parameters, typed memory navigation state, search setters, custom parsers, refs, and public hook declarations. Keep the type assertions in the existing package
test/*.test-d.ts(x)layout and add strict consumer checks for bundler, NodeNext, and legacy Node resolution.Validation
Both packages are versioned
4.0.0-next.0. Migration notes and reproducible size measurements are included in the compatibility audit.