Atualizar path-to-regexp de 7.x para 8.x
Comparação da API pública de path-to-regexp 7.2.0 e 8.4.2, calculada automaticamente a partir dos tipos TypeScript. Uma assinatura alterada é uma possível mudança incompatível, não uma certeza.
Resumo
| Caminhos de importação removidos | 0 |
|---|---|
| Exports removidos | 0 |
| Assinaturas alteradas | 5 |
| Membros de classes ou interfaces removidos | 16 |
| Membros de classes ou interfaces alterados | 1 |
| Novas descontinuações | 0 |
| Mudanças de requisitos (engines, dependências peer) | 1 |
| Novos exports | 7 |
Exports removidos
Nenhuma detectada.
Assinaturas alteradas
| export | Antes | Depois |
|---|---|---|
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; } |
Membros de classes ou interfaces removidos
| member | import | Antes |
|---|---|---|
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 |
Membros de classes ou interfaces alterados
| member | Antes | Depois |
|---|---|---|
TokenData.constructor | (tokens: Token[], delimiter: string): TokenData | (tokens: Token[], originalPath?: string | undefined): TokenData |
Novas descontinuações
Nenhuma detectada.
Mudanças de requisitos (engines, dependências peer)
| Antes | Depois | |
|---|---|---|
engines.node | >=16 | — |
Novos 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 |
Perguntas frequentes
Quais são as mudanças incompatíveis ao atualizar path-to-regexp de 7 para 8?
Entre path-to-regexp 7.2.0 e 8.4.2, o Vigia encontrou 0 exports removidos, 5 assinaturas alteradas e 17 membros de classes ou interfaces removidos ou alterados.
O que foi descontinuado em path-to-regexp 8?
0 exports ou membros foram marcados como descontinuados em path-to-regexp 8.4.2.
Para agentes
GET https://vigia.coredls.cloud/v1/packages/npm/path-to-regexp/upgrade?from=7.2.0&to=8.4.2