path-to-regexp
9.0.0 · 22 Oct 2026MIT310.6M / weekRepositoryHomepagenpmAtom feed
Where each line stands
Plan an upgradeLatest releases
All 74 releases- 9.x · latest line
9.0.0
22 Oct 2026Avoid duplicate trailing delimiter matches
Refactor matching to be non-greedy
Build project as ESM
Important: This release switches the package to ESM only and node >= 22. The primary incompatible API change is to switch ambiguous matches (2+ parameters in a segment) from the first being greedy to the last. For example:
const input = "/foo.json.html"; const fn = match("/:file.:ext"); fn(input); //=> ["foo", "json.html"]In the v8 this would have output
["foo.json", "html"]. Making the last parameter and wildcard greedy can improve performance of the regular expressions and makes it easier to build non-regex based versions of the matcher.Changed
Avoid duplicate trailing delimiter matches
A path that explicitly provided the trailing delimiter (e.g.
/foo/) will no longer append an extra optional delimiter
Refactor matching to be non-greedy
Build project as ESM
Remove
TokenDataclass andKeystype
Fixed
Reject an empty-string param in compile
Reject wildcard array that compiles to an empty path
Fix stringify of param names with control characters
Quote param names followed by astral ID_Continue text
Fix stringify lookahead across empty text tokens
- 8.x · maintenance
8.4.2
1 Apr 20268.4.1
30 Mar 2026
Notes older than 90 days are read on the Releases tab.
Dependency tracking · free for 3 projects
Know when your own dependencies move
path-to-regexp had 3 security advisories in the last 12 months. inlinr emails you the day one touches a project of yours, with the version that fixes it.
Advisories reach you
An email when a critical or high advisory affects a project, before the next install.
Upgrades checked first
Peer ranges, Node, ESM-only and types changes read before you bump.
Only what matters
Majors and breaking notes stay; patches and sibling bumps fold into one line.
Reading releases, release notes and advisories…
Registry facts last checked 3 Nov 2026. Releases and advisories last read 3 Nov 2026.