Vigia

Aggiornare path-to-regexp da 7.x a 8.x

Confronto dell’API pubblica di path-to-regexp 7.2.0 e 8.4.2, calcolato automaticamente dai tipi TypeScript. Una firma modificata è una possibile modifica incompatibile, non una certezza.

Riepilogo

Percorsi di import rimossi0
Export rimossi0
Firme modificate5
Membri di classi o interfacce rimossi16
Membri di classi o interfacce modificati1
Nuove deprecazioni0
Requisiti cambiati (engines, dipendenze peer)1
Nuovi export7

Export rimossi

Nessuna rilevata.

Firme modificate

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

Membri di classi o interfacce rimossi

memberimportPrima
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

Membri di classi o interfacce modificati

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

Nuove deprecazioni

Nessuna rilevata.

Requisiti cambiati (engines, dipendenze peer)

PrimaDopo
engines.node>=16—
Nuovi export (7)
importexportkind
path-to-regexpKeystype
path-to-regexpTextinterface
path-to-regexpGroupinterface
path-to-regexpWildcardinterface
path-to-regexpParameterinterface
path-to-regexpPathErrorclass
path-to-regexpstringifyfunction

Domande frequenti

Quali sono le modifiche incompatibili aggiornando path-to-regexp da 7 a 8?

Tra path-to-regexp 7.2.0 e 8.4.2, Vigia ha trovato 0 export rimossi, 5 firme modificate e 17 membri di classi o interfacce rimossi o modificati.

Cosa è stato deprecato in path-to-regexp 8?

0 export o membri risultano ora deprecati in path-to-regexp 8.4.2.

Per gli agenti

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