-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This upgrades path-to-regexp to the latest version. The behaviour has changed quite a lot since the previous version we were using. Some examples of what has changed: - Wildcards are now subpatterns, e.g. `/foo/(.*)` rather than `/foo/*` - Delimeters are parsed everywhere (`http://foo` would think `://foo` or something is a parameter) - Characters need escaping, e.g. `foo?bar` must be `foo\\?bar` since you can now have optional parameters like `/foo/:bar?` To account for this in the most backwards compatible way possible, this change does the following: - Detects `://` in URLs and escapes it to `\\://` - Detects `/*` in URLs and converts it to `/(.*)` - **Breaks URLs with unescaped query strings** (i.e. `foo?bar` will no longer behave the same. you _must_ escape, `foo\\?bar` The breaking change with query strings is because we can't really reliably replace `?` automatically with `\\?`, since consumers may legitimately want to use the new optional parameters functionality.
- Loading branch information
Showing
4 changed files
with
46 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters