Vigia

将 path-to-regexp 从 7.x 升级到 8.x

根据 TypeScript 类型自动比较 path-to-regexp 7.2.0 与 8.4.2 的公开 API。签名变化表示可能存在不兼容变更,并非确定结论。

概要

已删除的导入路径0
已删除的导出0
已修改的签名5
已删除的类或接口成员16
已修改的类或接口成员1
新增弃用0
要求变化(engines、peer 依赖)1
新增导出7

已删除的导出

未发现。

已修改的签名

export之前之后
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; }

已删除的类或接口成员

memberimport之前
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

已修改的类或接口成员

member之前之后
TokenData.constructor(tokens: Token[], delimiter: string): TokenData(tokens: Token[], originalPath?: string | undefined): TokenData

新增弃用

未发现。

要求变化(engines、peer 依赖)

之前之后
engines.node>=16—
新增导出 (7)
importexportkind
path-to-regexpKeystype
path-to-regexpTextinterface
path-to-regexpGroupinterface
path-to-regexpWildcardinterface
path-to-regexpParameterinterface
path-to-regexpPathErrorclass
path-to-regexpstringifyfunction

常见问题

将 path-to-regexp 从 7 升级到 8 有哪些不兼容变更?

在 path-to-regexp 7.2.0 与 8.4.2 之间,Vigia 发现 0 个已删除的导出、5 个已修改的签名,以及 17 个已删除或修改的类或接口成员。

path-to-regexp 8 中弃用了哪些内容?

path-to-regexp 8.4.2 中有 0 个导出或成员新被标记为弃用。

供智能体使用

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