Change8

route-pattern@0.15.1

Breaking Changes
📦 remix
2 breaking🐛 2 fixes🔧 1 symbols

Summary

This release updates the href() function to produce cleaner URLs by filtering null/undefined search parameters and removing trailing question marks from empty query strings.

⚠️ Breaking Changes

  • The href() function now automatically filters out 'undefined' and 'null' values from search parameters, which may change the resulting URL if your application relied on these keys being present in the query string.
  • The href() function no longer appends a trailing '?' when search parameters are empty, potentially affecting string-matching logic or legacy URL parsers.

Migration Steps

  1. Review any code that performs manual string manipulation or regex matching on URLs generated by href() to ensure it accounts for the removal of the trailing '?' and filtered null/undefined parameters.

🐛 Bug Fixes

  • Fixed an issue where href() would include 'undefined' or 'null' values in the generated query string.
  • Fixed an issue where href() would append an unnecessary trailing '?' to URLs when no search parameters were provided.

🔧 Affected Symbols

href