Оновлення path-to-regexp з 7.x до 8.x
Порівняння публічного API path-to-regexp 7.2.0 і 8.4.2, обчислене автоматично за їхніми типами TypeScript. Змінена сигнатура — можлива несумісна зміна, а не гарантія.
Підсумок
| Видалені шляхи імпорту | 0 |
|---|---|
| Видалені експорти | 0 |
| Змінені сигнатури | 5 |
| Видалені члени класів або інтерфейсів | 16 |
| Змінені члени класів або інтерфейсів | 1 |
| Нові застарівання | 0 |
| Зміни вимог (engines, peer-залежності) | 1 |
| Нові експорти | 7 |
Видалені експорти
Не виявлено.
Змінені сигнатури
| export | Було | Стало |
|---|---|---|
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; } |
Видалені члени класів або інтерфейсів
| member | import | Було |
|---|---|---|
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 |
Змінені члени класів або інтерфейсів
| member | Було | Стало |
|---|---|---|
TokenData.constructor | (tokens: Token[], delimiter: string): TokenData | (tokens: Token[], originalPath?: string | undefined): TokenData |
Нові застарівання
Не виявлено.
Зміни вимог (engines, peer-залежності)
| Було | Стало | |
|---|---|---|
engines.node | >=16 | — |
Нові експорти (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 |
Поширені запитання
Які несумісні зміни під час оновлення path-to-regexp з 7 до 8?
Між path-to-regexp 7.2.0 і 8.4.2 Vigia знайшла видалених експортів: 0, змінених сигнатур: 5, видалених або змінених членів класів та інтерфейсів: 17.
Що застаріло в path-to-regexp 8?
У path-to-regexp 8.4.2 новими застарілими позначено експортів або членів: 0.
Для агентів
GET https://vigia.coredls.cloud/v1/packages/npm/path-to-regexp/upgrade?from=7.2.0&to=8.4.2