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 rimossi | 0 |
|---|---|
| Export rimossi | 0 |
| Firme modificate | 5 |
| Membri di classi o interfacce rimossi | 16 |
| Membri di classi o interfacce modificati | 1 |
| Nuove deprecazioni | 0 |
| Requisiti cambiati (engines, dipendenze peer) | 1 |
| Nuovi export | 7 |
Export rimossi
Nessuna rilevata.
Firme modificate
| export | Prima | Dopo |
|---|---|---|
path-to-regexp · Key | interface | Parameter | Wildcard |
path-to-regexp · Token | string | Key | Text | 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
| member | import | Prima |
|---|---|---|
TokenData.delimiter | path-to-regexp | string |
MatchResult.index | path-to-regexp | number |
MatchOptions.loose | path-to-regexp | boolean | undefined |
MatchOptions.start | path-to-regexp | boolean | undefined |
MatchOptions.strict | path-to-regexp | boolean | undefined |
MatchOptions.encodePath | path-to-regexp | Encode | undefined |
ParseOptions.delimiter | path-to-regexp | string | undefined |
CompileOptions.loose | path-to-regexp | boolean | undefined |
CompileOptions.strict | path-to-regexp | boolean | undefined |
CompileOptions.validate | path-to-regexp | boolean | undefined |
CompileOptions.sensitive | path-to-regexp | boolean | undefined |
CompileOptions.encodePath | path-to-regexp | Encode | undefined |
PathToRegexpOptions.loose | path-to-regexp | boolean | undefined |
PathToRegexpOptions.start | path-to-regexp | boolean | undefined |
PathToRegexpOptions.strict | path-to-regexp | boolean | undefined |
PathToRegexpOptions.encodePath | path-to-regexp | Encode | undefined |
Membri di classi o interfacce modificati
| member | Prima | Dopo |
|---|---|---|
TokenData.constructor | (tokens: Token[], delimiter: string): TokenData | (tokens: Token[], originalPath?: string | undefined): TokenData |
Nuove deprecazioni
Nessuna rilevata.
Requisiti cambiati (engines, dipendenze peer)
| Prima | Dopo | |
|---|---|---|
engines.node | >=16 | — |
Nuovi export (7)
| import | export | kind |
|---|---|---|
path-to-regexp | Keys | type |
path-to-regexp | Text | interface |
path-to-regexp | Group | interface |
path-to-regexp | Wildcard | interface |
path-to-regexp | Parameter | interface |
path-to-regexp | PathError | class |
path-to-regexp | stringify | function |
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