Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency path-to-regexp to v6 #75

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vingle-suzy
Copy link
Member

@vingle-suzy vingle-suzy commented Nov 20, 2019

This PR contains the following updates:

Package Type Update Change
path-to-regexp dependencies major ^1.7.0 -> ^6.0.0

Release Notes

pillarjs/path-to-regexp

v6.1.0

Compare Source

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

Compare Source

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
    • Things like /test(foo previously would worked, now it expects ( to be closed
    • 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

Compare Source

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

Compare Source

Removed

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

v4.0.4

Compare Source

Fixed

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

v4.0.3

Compare Source

Added

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

v4.0.2

Compare Source

Fixed

  • Allow RegexpOptions in match(...) function

v4.0.1

Compare Source

Fixed

  • Normalize regexp spelling across 4.x

v4.0.0

Compare Source

All path rules are backward compatible with 3.x, except for nested () and other RegEx special characters that were previously ignored.

Changed

  • Export names have changed to support ES2015 modules in bundlers
  • match does not default to decodeURIComponent

Added

  • New normalizePathname utility for supporting unicode paths in libraries
  • Support nested non-capturing groups within parameters
  • Add tree-shaking (via ES2015 modules) for webpack and other bundlers

v3.2.0

Compare Source

Added

  • Add native match function to library

v3.1.0

Compare Source

  • Add sensitive option for tokensToFunction (#​191)
  • Add validate option to path functions (#​178)

v3.0.0

Compare Source

  • Always use prefix character as delimiter token, allowing any character to be a delimiter (e.g. /:att1-:att2-:att3-:att4-:att5)
  • Remove partial support, prefer escaping the prefix delimiter explicitly (e.g. \\/(apple-)?icon-:res(\\d+).png)

v2.4.0

Compare Source

  • Support start option to disable anchoring from beginning of the string

v2.3.0

Compare Source

  • Use delimiter when processing repeated matching groups (e.g. foo/bar has no prefix, but has a delimiter)

v2.2.1

Compare Source

  • Allow empty string with end: false to match both relative and absolute paths

v2.2.0

Compare Source

  • Pass token as second argument to encode option (e.g. encode(value, token))

v2.1.0

Compare Source

  • Handle non-ending paths where the final character is a delimiter
    • E.g. /foo/ before required either /foo/ or /foo// to match in non-ending mode

v2.0.0

Compare Source

  • New option! Ability to set endsWith to match paths like /test?query=string up to the query string
  • New option! Set delimiters for specific characters to be treated as parameter prefixes (e.g. /:test)
  • Remove isarray dependency
  • Explicitly handle trailing delimiters instead of trimming them (e.g. /test/ is now treated as /test/ instead of /test when matching)
  • Remove overloaded keys argument that accepted options
  • Remove keys list attached to the RegExp output
  • Remove asterisk functionality (it's a real pain to properly encode)
  • Change tokensToFunction (e.g. compile) to accept an encode function for pretty encoding (e.g. pass your own implementation)

Renovate configuration

📅 Schedule: At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻️ Rebasing: Renovate will not automatically rebase this PR, because other commits have been found.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants