Vigia

将 entities 从 7.x 升级到 8.x

根据 TypeScript 类型自动比较 entities 7.0.1 与 8.1.0 的公开 API。签名变化表示可能存在不兼容变更,并非确定结论。

概要

已删除的导入路径0
已删除的导出9
已修改的签名7
已删除的类或接口成员0
已修改的类或接口成员0
新增弃用1
要求变化(engines、peer 依赖)1
新增导出2

已删除的导出

importexportkind之前
entitiesdecodeHTML4function(htmlString: string, mode?: DecodingMode | undefined): string
entitiesdecodeHTML5function(htmlString: string, mode?: DecodingMode | undefined): string
entitiesencodeHTML4function(input: string): string
entitiesencodeHTML5function(input: string): string
entitiesdecodeStrictfunction(input: string, options?: DecodingOptions | EntityLevel | undefined): string
entitiesdecodeHTML4Strictfunction(htmlString: string): string
entitiesdecodeHTML5Strictfunction(htmlString: string): string
entities/decodefromCodePointvariable(...codePoints: number[]): string
entities/decodedecodeCodePointfunction(codePoint: number): string

已修改的签名

export之前之后
entities · escapeText(data: string): string(data: string): string
entities · escapeUTF8(data: string): string(data: string): string
entities · escapeAttribute(data: string): string(data: string): string
entities/escape · escapeText(data: string): string(data: string): string
entities/escape · escapeUTF8(data: string): string(data: string): string
entities/escape · getCodePoint(c: string, index: number): number(input: string, index: number): number
entities/escape · escapeAttribute(data: string): string(data: string): string

已删除的类或接口成员

未发现。

已修改的类或接口成员

未发现。

新增弃用

export@deprecated
entities/escape · getCodePointUse `String.prototype.codePointAt` directly instead; this export will be removed in the next major.

要求变化(engines、peer 依赖)

之前之后
engines.node>=0.12>=20.19.0
新增导出 (2)
importexportkind
entities/decodereplaceCodePointXMLfunction
entities/escapexmlEncodeRegexvariable

常见问题

将 entities 从 7 升级到 8 有哪些不兼容变更?

在 entities 7.0.1 与 8.1.0 之间,Vigia 发现 9 个已删除的导出、7 个已修改的签名,以及 0 个已删除或修改的类或接口成员。

entities 8 中弃用了哪些内容?

entities 8.1.0 中有 1 个导出或成员新被标记为弃用。

供智能体使用

GET https://vigia.coredls.cloud/v1/packages/npm/entities/upgrade?from=7.0.1&to=8.1.0