Path To Regexp Versions Save

Turn a path string such as `/user/:name` into a regular expression

v6.2.2

1 month ago

No API changes. Documentation only release.

Changed

  • Fix readme example c7ec332
  • Update shield URL e828000

https://github.com/pillarjs/path-to-regexp/compare/v6.2.1...v6.2.2

v0.1.8

1 month ago

Added

  • Add support for named matching groups (#301) 114f62d

https://github.com/pillarjs/path-to-regexp/compare/v0.1.7...v0.1.8

v6.2.1

2 years ago

Fixed

  • Fix invalid matching of :name* parameter (#261) 762bc6b
  • Compare delimiter string over regexp 86baef8

Added

  • New example in documentation (#256) ae9e576
  • Update demo link (#250) 77df638
  • Update README encode example b39edd4

https://github.com/pillarjs/path-to-regexp/compare/v6.2.0...v6.2.1

v6.2.0

3 years ago

Added

  • Support named capturing groups for RegExps (#225)

Fixed

  • Update strict flag documentation (#227)
  • Ignore test files when bundling (#220)

v6.1.0

4 years ago

Fixed

  • Use /#? as default delimiter to avoid matching on query or fragment parameters
    • If you are matching non-paths (e.g. hostnames), you can adjust delimiter: '.'

v6.0.0

4 years ago

Note: The path syntax has been stabilized with this release, no breaking changes in paths is expected.

This release reverts the prefix behavior added in v3 back to the behavior seen in v2. For the most part, path matching is backward compatible with v2 with these enhancements:

  1. Support for nested non-capturing groups in regexp, e.g. /(abc(?=d))
  2. Support for custom prefix and suffix groups using /{abc(.*)def}
  3. Tokens in an unexpected position will throw an error
    • Paths like /test(foo previously worked treating ( as a literal character, now it expects ( to be closed and is treated as a group
    • You can escape the character for the previous behavior, e.g. /test\(foo

Changed

  • Revert using any character as prefix, support prefixes option to configure this (starts as /. which acts like every version since 0.x again)
  • Add support for {} to capture prefix/suffix explicitly, enables custom use-cases like /:attr1{-:attr2}?

v5.0.0

4 years ago

No changes to path rules since 3.x, except support for nested RegEx parts in 4.x.

Changed

  • Rename RegexpOptions interface to TokensToRegexpOptions
  • Remove normalizePathname from library, document solution in README
  • Encode using identity function as default, not encodeURIComponent

v4.0.5

4 years ago

Removed

  • Remove whitelist in favor of decodeURI (advanced behavior can happen outside path-to-regexp)

v4.0.4

4 years ago

Fixed

  • Remove usage of String.prototype.normalize to continue supporting IE

v4.0.3

4 years ago

Added

  • Add normalize whitelist of characters (defaults to /%.-)