Vigia

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 dihapus0
Ekspor yang dihapus0
Tanda tangan yang berubah5
Anggota kelas atau antarmuka yang dihapus16
Anggota kelas atau antarmuka yang berubah1
Baru ditandai usang0
Perubahan persyaratan (engines, dependensi peer)1
Ekspor baru7

Ekspor yang dihapus

Tidak ada yang terdeteksi.

Tanda tangan yang berubah

exportSebelumSesudah
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; }

Anggota kelas atau antarmuka yang dihapus

memberimportSebelum
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

Anggota kelas atau antarmuka yang berubah

memberSebelumSesudah
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)

SebelumSesudah
engines.node>=16—
Ekspor baru (7)
importexportkind
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