Passer de path-to-regexp 7.x à 8.x
Comparaison de l’API publique de path-to-regexp 7.2.0 et 8.4.2, calculée automatiquement à partir de leurs types TypeScript. Une signature modifiée est un changement incompatible possible, pas une certitude.
Résumé
| Chemins d’importation supprimés | 0 |
|---|---|
| Exports supprimés | 0 |
| Signatures modifiées | 5 |
| Membres de classes ou d’interfaces supprimés | 16 |
| Membres de classes ou d’interfaces modifiés | 1 |
| Nouvelles dépréciations | 0 |
| Changements d’exigences (engines, dépendances peer) | 1 |
| Nouveaux exports | 7 |
Exports supprimés
Aucun détecté.
Signatures modifiées
| export | Avant | Après |
|---|---|---|
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; } |
Membres de classes ou d’interfaces supprimés
| member | import | Avant |
|---|---|---|
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 |
Membres de classes ou d’interfaces modifiés
| member | Avant | Après |
|---|---|---|
TokenData.constructor | (tokens: Token[], delimiter: string): TokenData | (tokens: Token[], originalPath?: string | undefined): TokenData |
Nouvelles dépréciations
Aucun détecté.
Changements d’exigences (engines, dépendances peer)
| Avant | Après | |
|---|---|---|
engines.node | >=16 | — |
Nouveaux exports (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 |
Questions fréquentes
Quels sont les changements incompatibles en passant de path-to-regexp 7 à 8 ?
Entre path-to-regexp 7.2.0 et 8.4.2, Vigia a trouvé 0 exports supprimés, 5 signatures modifiées et 17 membres de classes ou d’interfaces supprimés ou modifiés.
Qu’est-ce qui a été déprécié dans path-to-regexp 8 ?
0 exports ou membres sont désormais marqués comme dépréciés dans path-to-regexp 8.4.2.
Pour les agents
GET https://vigia.coredls.cloud/v1/packages/npm/path-to-regexp/upgrade?from=7.2.0&to=8.4.2