Vigia

Upgrading path-to-regexp from 7.x to 8.x

Comparison of the public API of path-to-regexp 7.2.0 and 8.4.2, computed automatically from their TypeScript types. A changed signature is a candidate for a breaking change, not a certainty.

Summary

Removed import paths0
Removed exports0
Changed signatures5
Removed class or interface members16
Changed class or interface members1
Newly deprecated0
Requirement changes (engines, peer dependencies)1
New exports7

Removed exports

None detected.

Changed signatures

exportBeforeAfter
path-to-regexp · KeyinterfaceParameter | Wildcard
path-to-regexp · Tokenstring | KeyText | Parameter | Wildcard | Group
path-to-regexp · match<P extends ParamData>(path: Path | Path[], options?: MatchOptions | undefined): MatchFunction<P><P extends ParamData>(path: Path | Path[], options?: (MatchOptions & ParseOptions) | undefined): MatchFunction<P>
path-to-regexp · compile<P extends ParamData = Partial<Record<string, string | string[]>>>(path: Path, options?: CompileOptions | undefined): PathFunction<P><P extends ParamData = Partial<Record<string, string | string[]>>>(path: Path, options?: (CompileOptions & ParseOptions) | undefined): (params?: P | undefined) => string
path-to-regexp · pathToRegexp(path: Path | Path[], options?: PathToRegexpOptions | undefined): RegExp & { keys: Key[]; }(path: Path | Path[], options?: (PathToRegexpOptions & ParseOptions) | undefined): { regexp: RegExp; keys: Keys; }

Removed class or interface members

memberimportBefore
TokenData.delimiterpath-to-regexpstring
MatchResult.indexpath-to-regexpnumber
MatchOptions.loosepath-to-regexpboolean | undefined
MatchOptions.startpath-to-regexpboolean | undefined
MatchOptions.strictpath-to-regexpboolean | undefined
MatchOptions.encodePathpath-to-regexpEncode | undefined
ParseOptions.delimiterpath-to-regexpstring | undefined
CompileOptions.loosepath-to-regexpboolean | undefined
CompileOptions.strictpath-to-regexpboolean | undefined
CompileOptions.validatepath-to-regexpboolean | undefined
CompileOptions.sensitivepath-to-regexpboolean | undefined
CompileOptions.encodePathpath-to-regexpEncode | undefined
PathToRegexpOptions.loosepath-to-regexpboolean | undefined
PathToRegexpOptions.startpath-to-regexpboolean | undefined
PathToRegexpOptions.strictpath-to-regexpboolean | undefined
PathToRegexpOptions.encodePathpath-to-regexpEncode | undefined

Changed class or interface members

memberBeforeAfter
TokenData.constructor(tokens: Token[], delimiter: string): TokenData(tokens: Token[], originalPath?: string | undefined): TokenData

Newly deprecated

None detected.

Requirement changes (engines, peer dependencies)

BeforeAfter
engines.node>=16—
New exports (7)
importexportkind
path-to-regexpKeystype
path-to-regexpTextinterface
path-to-regexpGroupinterface
path-to-regexpWildcardinterface
path-to-regexpParameterinterface
path-to-regexpPathErrorclass
path-to-regexpstringifyfunction

Frequently asked questions

What are the breaking changes when upgrading path-to-regexp from 7 to 8?

Between path-to-regexp 7.2.0 and 8.4.2, Vigia found 0 removed exports, 5 changed signatures and 17 removed or changed class or interface members.

What became deprecated in path-to-regexp 8?

0 exports or members are newly marked as deprecated in path-to-regexp 8.4.2.

For agents

GET https://vigia.coredls.cloud/v1/packages/npm/path-to-regexp/upgrade?from=7.2.0&to=8.4.2