Skip to content

route-pattern v0.25.0

Choose a tag to compare

@github-actions github-actions released this 28 Sep 21:45
c9c8939

Minor Changes

  • BREAKING CHANGE: createHref() now normalizes generated pathnames to one leading slash, including absolute URLs and hrefs generated with baseURL. Leading slashes in root wildcard values no longer round-trip unchanged. Pathname wildcard values containing standalone . or .. segments now throw CreateHrefError with details.type === 'invalid-pathname-wildcard'.

    Pass path fragments without extra leading slashes, and resolve any intended dot segments before generating an href. Multi-segment paths, internal and trailing slashes, and dotted filenames remain supported.

     createHref('/*path', {
    -  path: '/docs/../readme.md',
    +  path: 'readme.md',
     }, { baseURL: 'https://example.com/' })

Patch Changes

  • Declare package modules as side-effect-free.