Migrating to Remix route-pattern@0.23.0
Version route-pattern@0.23.0 introduces 1 breaking change. This guide details how to update your code.
Released: 7/1/2026
⚠️ Check Your Code
If you use any of these symbols, you need to read this guide:
RoutePatternRoutePattern.parseRoutePattern.sourceRoutePattern.toStringRoutePattern.toJSONgetRoutePatternCapturesRoutePatternCaptureRoutePatternJSONCreateHrefErrorDetailsMatchParamMetaCreateHrefArgsMatchParamsJoinPatternsBreaking Changes
●Issue #1
The `RoutePattern` object no longer exposes its parsed internals directly. Consumers must now use `RoutePattern.parse()` to construct patterns and access properties via `pattern.source`, `pattern.toString()`, or `pattern.toJSON()` instead of accessing internal properties like `pattern.pathname.tokens`, `pattern.hostname`, or `pattern.search`.
Migration Steps
- 1If accessing internal properties of a `RoutePattern` object (e.g., `pattern.pathname.tokens`), switch to using the public methods: `pattern.source`, `pattern.toString()`, or `pattern.toJSON()`.
- 2If inspecting route pattern captures, use the new utility function `getRoutePatternCaptures(pattern)` instead of accessing internal tokens.
Release Summary
This release introduces breaking changes to how RoutePattern internals are accessed, requiring consumers to use public methods like .source or .toJSON(). It also includes numerous bug fixes related to route pattern matching, href generation, and type safety for literal patterns.
Need More Details?
View the full release notes and all changes for Remix route-pattern@0.23.0.
View Full Changelog