Vigia

Оновлення 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 · 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; }

Видалені члени класів або інтерфейсів

memberimportБуло
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

Змінені члени класів або інтерфейсів

memberБулоСтало
TokenData.constructor(tokens: Token[], delimiter: string): TokenData(tokens: Token[], originalPath?: string | undefined): TokenData

Нові застарівання

Не виявлено.

Зміни вимог (engines, peer-залежності)

БулоСтало
engines.node>=16—
Нові експорти (7)
importexportkind
path-to-regexpKeystype
path-to-regexpTextinterface
path-to-regexpGroupinterface
path-to-regexpWildcardinterface
path-to-regexpParameterinterface
path-to-regexpPathErrorclass
path-to-regexpstringifyfunction

Поширені запитання

Які несумісні зміни під час оновлення 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