Trang chủ › Hướng dẫn nâng cấp › entities › 7 → 8 Nâng cấp entities từ 7.x lên 8.x
So sánh API công khai của entities 7.0.1 và 8.1.0, được tính tự động từ kiểu TypeScript. Chữ ký thay đổi là thay đổi có thể không tương thích, không phải điều chắc chắn.
Tóm tắt Đường dẫn import bị xóa 0 Export bị xóa 9 Chữ ký thay đổi 7 Thành viên lớp hoặc interface bị xóa 0 Thành viên lớp hoặc interface thay đổi 0 Mới bị ngừng hỗ trợ 1 Thay đổi yêu cầu (engines, phụ thuộc peer) 1 Export mới 2
Export bị xóa import export kind Trước entitiesdecodeHTML4function (htmlString: string, mode?: DecodingMode | undefined): stringentitiesdecodeHTML5function (htmlString: string, mode?: DecodingMode | undefined): stringentitiesencodeHTML4function (input: string): stringentitiesencodeHTML5function (input: string): stringentitiesdecodeStrictfunction (input: string, options?: DecodingOptions | EntityLevel | undefined): stringentitiesdecodeHTML4Strictfunction (htmlString: string): stringentitiesdecodeHTML5Strictfunction (htmlString: string): stringentities/decodefromCodePointvariable (...codePoints: number[]): stringentities/decodedecodeCodePointfunction (codePoint: number): string
Chữ ký thay đổi export Trước Sau entities · escapeText(data: string): string(data: string): stringentities · escapeUTF8(data: string): string(data: string): stringentities · escapeAttribute(data: string): string(data: string): stringentities/escape · escapeText(data: string): string(data: string): stringentities/escape · escapeUTF8(data: string): string(data: string): stringentities/escape · getCodePoint(c: string, index: number): number(input: string, index: number): numberentities/escape · escapeAttribute(data: string): string(data: string): string
Thành viên lớp hoặc interface bị xóa Không phát hiện.
Thành viên lớp hoặc interface thay đổi Không phát hiện.
Mới bị ngừng hỗ trợ export @deprecated entities/escape · getCodePointUse `String.prototype.codePointAt` directly instead; this export
will be removed in the next major.
Thay đổi yêu cầu (engines, phụ thuộc peer) Trước Sau engines.node>=0.12>=20.19.0
Export mới (2) import export kind entities/decodereplaceCodePointXMLfunction entities/escapexmlEncodeRegexvariable
Câu hỏi thường gặp
Nâng cấp entities từ 7 lên 8 có những thay đổi không tương thích nào? Giữa entities 7.0.1 và 8.1.0, Vigia tìm thấy 9 export bị xóa, 7 chữ ký thay đổi và 0 thành viên lớp hoặc interface bị xóa hay thay đổi.
Những gì bị ngừng hỗ trợ trong entities 8? 1 export hoặc thành viên mới bị đánh dấu ngừng hỗ trợ trong entities 8.1.0.
Dành cho tác tử
GET https://vigia.coredls.cloud/v1/packages/npm/entities/upgrade?from=7.0.1&to=8.1.0