parse-server
parse-server copied to clipboard
refactor: Bump path-to-regexp from 6.2.1 to 7.1.0
trafficstars
Bumps path-to-regexp from 6.2.1 to 7.1.0.
Release notes
Sourced from path-to-regexp's releases.
Strict mode
Added
- Adds a
strictoption to detect potential ReDOS issuesFixed
- Fixes separator to default to
suffix + prefixwhen not specified- Allows separator to be undefined in
TokenData
- This is only relevant if you are building
TokenDatamanually, previouslyparsefilled it in automaticallyComments
- I highly recommend enabling
strict: trueand I'm probably releasing a V8 with it enabled by default ASAP as a necessary security mitigationhttps://github.com/pillarjs/path-to-regexp/compare/v7.0.0...v7.1.0
Wildcard, unicode, and modifier changes
Hi all! There's a few major breaking changes in this release so read carefully.
Breaking changes:
- The function returned by
compileonly accepts strings as values (i.e. no numbers, useString(value)before compiling a path)
- For repeated values, when
encode !== false, it must be an array of strings- Parameter names can contain all unicode identifier characters (defined as regex
\p{XID_Continue}).- Modifiers (
?,*,+) must be used after a param explicitly wrapped in{}
- No more implied prefix of
/or.- No support for arrays or regexes as inputs
- The wildcard (standalone
*) has been added back and matches Express.js expected behavior- Removed
endsWithoption- Renamed
strict: truetotrailing: false- Reserved
;,,,!, and@for future use-cases- Removed
tokensToRegexp,tokensToFunctionandregexpToFunctionin favor of simplifying exports- Enable a "loose" mode by default, so
/can be repeated multiple times in a matched path (i.e./fooworks like//foo, etc)encodeanddecodeno longer receive the token as the second parameter- Removed the ESM + CommonJS dual package in favor of only one CommonJS supported export
- Minimum JS support for ES2020 (previous ES2015)
- Encode defaults to
encodeURIComponentand decode defaults todecodeURIComponentAdded:
- Adds
encodePathto fix an issue aroundencodebeing used for both path and parameters (the path and parameter should be encoded slightly differently)- Adds
looseas an option to support arbitrarily matching the delimiter in paths, e.g.foo/barandfoo///barshould work the same- Allow
encodeanddecodeto be set tofalsewhich skips all processing of the parameters input/output- All remaining methods support
TokenData(exported, returned byparse) as input
- This should be useful if you are programmatically building paths to match or want to avoid parsing multiple times
Requests for feedback:
- Requiring
{}is an obvious drawback but I'm seeking feedback on whether it helps make path behavior clearer
... (truncated)
Commits
c36bdfa7.1.046b9f0bAdd strict option to README7015c1fBetter type for compile (#307)f73ec6cAdds strict mode, redos script, improved separator and delimitereaed1fcDocument unexpected ; in errorsc958936Clarify match/compile examples in README140b824Document ; and TokenData betterec35fbd7.0.0c1541bcNPM audit fixc0736d4Remove loose string reference- Additional commits viewable in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
I will reformat the title to use the proper commit message syntax.
Superseded by #9293.