github remix-run/remix route-pattern@1.1.0
route-pattern v1.1.0

one hour ago

Minor Changes

  • Deprecated limits.maxMatchWork in MatcherOptions (MatcherLimits.maxMatchWork). Match work budgeting is an internal safeguard whose unit count depends on matcher implementation details; rely on the built-in default instead of configuring maxMatchWork. Passing limits.maxMatchWork continues to work in 1.x and will be removed in a future major release. (#12467)

Patch Changes

  • createMatcher(), createMultiMatcher(), and createHref() are significantly faster and use less memory, especially with large route tables. In our benchmarks, matching against 1,000 to 5,000 patterns is 20 to 60 times faster, building a matcher is 5 to 9 times faster, createHref() is 1.2 to 1.9 times faster, and patterns with many optional segments, wildcards, or matchAll() candidates no longer slow down sharply. Match results, specificity, and generated hrefs are unchanged. (#12427)

  • createHref() now throws a CreateHrefError with details.type of invalid-pathname-variable when a pathname variable produces a standalone . or .. segment, such as createHref('/posts/:id', { id: '..' }). URL parsers remove these segments, so the generated href could resolve to a different route. This also applies to the href() method of routes created with route() from remix/routes. (#12424)

Don't miss a new remix release

NewReleases is sending notifications on new releases.