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