Beranda › Panduan pembaruan › path-to-regexp › 7 → 8 Memperbarui path-to-regexp dari 7.x ke 8.x
Perbandingan API publik path-to-regexp 7.2.0 dan 8.4.2, dihitung otomatis dari tipe TypeScript-nya. Tanda tangan yang berubah adalah kemungkinan perubahan tidak kompatibel, bukan kepastian.
Ringkasan Jalur impor yang dihapus 0 Ekspor yang dihapus 0 Tanda tangan yang berubah 5 Anggota kelas atau antarmuka yang dihapus 16 Anggota kelas atau antarmuka yang berubah 1 Baru ditandai usang 0 Perubahan persyaratan (engines, dependensi peer) 1 Ekspor baru 7
Ekspor yang dihapus Tidak ada yang terdeteksi.
Tanda tangan yang berubah export Sebelum Sesudah path-to-regexp · KeyinterfaceParameter | Wildcardpath-to-regexp · Tokenstring | KeyText | Parameter | Wildcard | Grouppath-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) => stringpath-to-regexp · pathToRegexp(path: Path | Path[], options?: PathToRegexpOptions | undefined): RegExp & { keys: Key[]; }(path: Path | Path[], options?: (PathToRegexpOptions & ParseOptions) | undefined): { regexp: RegExp; keys: Keys; }
Anggota kelas atau antarmuka yang dihapus member import Sebelum TokenData.delimiterpath-to-regexpstringMatchResult.indexpath-to-regexpnumberMatchOptions.loosepath-to-regexpboolean | undefinedMatchOptions.startpath-to-regexpboolean | undefinedMatchOptions.strictpath-to-regexpboolean | undefinedMatchOptions.encodePathpath-to-regexpEncode | undefinedParseOptions.delimiterpath-to-regexpstring | undefinedCompileOptions.loosepath-to-regexpboolean | undefinedCompileOptions.strictpath-to-regexpboolean | undefinedCompileOptions.validatepath-to-regexpboolean | undefinedCompileOptions.sensitivepath-to-regexpboolean | undefinedCompileOptions.encodePathpath-to-regexpEncode | undefinedPathToRegexpOptions.loosepath-to-regexpboolean | undefinedPathToRegexpOptions.startpath-to-regexpboolean | undefinedPathToRegexpOptions.strictpath-to-regexpboolean | undefinedPathToRegexpOptions.encodePathpath-to-regexpEncode | undefined
Anggota kelas atau antarmuka yang berubah member Sebelum Sesudah TokenData.constructor(tokens: Token[], delimiter: string): TokenData(tokens: Token[], originalPath?: string | undefined): TokenData
Baru ditandai usang Tidak ada yang terdeteksi.
Perubahan persyaratan (engines, dependensi peer) Sebelum Sesudah engines.node>=16—
Ekspor baru (7) import export kind path-to-regexpKeystype path-to-regexpTextinterface path-to-regexpGroupinterface path-to-regexpWildcardinterface path-to-regexpParameterinterface path-to-regexpPathErrorclass path-to-regexpstringifyfunction
Pertanyaan umum
Apa saja perubahan tidak kompatibel saat memperbarui path-to-regexp dari 7 ke 8? Antara path-to-regexp 7.2.0 dan 8.4.2, Vigia menemukan 0 ekspor yang dihapus, 5 tanda tangan yang berubah, dan 17 anggota kelas atau antarmuka yang dihapus atau berubah.
Apa yang ditandai usang di path-to-regexp 8? 0 ekspor atau anggota baru ditandai usang di path-to-regexp 8.4.2.
Untuk agen
GET https://vigia.coredls.cloud/v1/packages/npm/path-to-regexp/upgrade?from=7.2.0&to=8.4.2