FRONTEND
Remix v0.20.0
RESUMEN
Minor Changes - BREAKING CHANGE: Make search param pattern decoding and serialization consistent with `URLSearchParams`. Affects: `RoutePattern.{match,href,search,ast.search}` Previously, `RoutePattern` treated `?q` and `?q=` as different constraints: ```ts // Before: `?q` and `?q=`
Descripción Detallada
Minor Changes - BREAKING CHANGE: Make search param pattern decoding and serialization consistent with `URLSearchParams`. Affects: `RoutePattern.{match,href,search,ast.search}` Previously, `RoutePattern` treated `?q` and `?q=` as different constraints: ```ts // Before: `?q` and `?q=` are different let url = new URL(' // Matches "key only" constraint? new RoutePattern('?q').match(url) // ✅ match // Matches "key and value" constraint? new RoutePattern('?q=').match(url) // ❌ no match (`null`) // Different constraints serialized to different strings new RoutePattern('?q').search // -> 'q' new RoutePattern('?q=').search // -> 'q=' ``` There were two main problems with that approach: Unintuitive matching ```ts // URL search looks like `?q=` let url = new URL(' // Pattern search looks like `?q=` let pattern = new RoutePattern('?q=') // But "key and value" constraint doesn't match! pattern.match(url) // ❌ no match (`null`) ``` Parsing and serialization For consistency with `URLSearchParams`, search param patterns should be parsed according to the WHATWG `application/x-www-form-urlencoded` parsing spec and should also encode spaces as `+`. Now, we use `URLSearchParams` to parse search param patterns to g
Remix v0.20.0 introduce un cambio que rompe compatibilidad en el manejo de parámetros de búsqueda.
- Cambio que rompe compatibilidad: la decodificación y serialización de patrones de parámetros de búsqueda ahora es consistente con `URLSearchParams`.
- Antes, `?q` y `?q=` se trataban como restricciones diferentes.
- Ahora, ambos patrones se manejan de manera uniforme, lo que puede afectar el comportamiento de coincidencia.
A quién le importa
Solo si usas `RoutePattern` para manejar parámetros de búsqueda.
Generado por IA · puede contener errores
Releases Relacionados
FRONTEND
Remix v0.4.8
### Patch Changes - Bumped `@remix-run/*` dependencies: - [`fetch-router@0.18.2`](https://github.com/remix-run/remix/releases/tag/fetch-router@0.18.2)
FRONTEND
Remix v0.1.7
### Patch Changes - Bumped `@remix-run/*` dependencies: - [`fetch-router@0.18.2`](https://github.com/remix-run/remix/releases/tag/fetch-router@0.18.2)
FRONTEND