Nâng cấp sitemap từ 9.x lên 10.x
So sánh API công khai của sitemap 9.0.1 và 10.0.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 | 1 |
| Chữ ký thay đổi | 2 |
| Thành viên lớp hoặc interface bị xóa | 4 |
| Thành viên lớp hoặc interface thay đổi | 6 |
| Mới bị ngừng hỗ trợ | 3 |
| Thay đổi yêu cầu (engines, phụ thuộc peer) | 1 |
| Export mới | 5 |
Export bị xóa
| import | export | kind | Trước |
|---|---|---|---|
sitemap | UndefinedTargetFolder | class | class |
Chữ ký thay đổi
| export | Trước | Sau |
|---|---|---|
sitemap · LIMITS | { readonly MAX_URL_LENGTH: 2048; readonly URL_PROTOCOL_REGEX: RegExp; readonly MIN_SITEMAP_ITEM_LIMIT: 1; readonly MAX_SITEMAP_ITEM_LIMIT: 50000; readonly MAX_VIDEO_TITLE_LENGTH: 100; readonly MAX_VIDEO_DESCRIPTION_LENGTH: 2048; readonly MAX_VIDEO_CATEGORY_LENGTH: 256; readonly MAX_TAGS_PER_VIDEO: 32; readonly MAX_NEWS_TITLE_LENGTH: 200; readonly MAX_NEWS_NAME_LENGTH: 256; readonly MAX_IMAGE_CAPTION_LENGTH: 512; readonly MAX_IMAGE_TITLE_LENGTH: 512; readonly MAX_IMAGES_PER_URL: 1000; readonly MAX_VIDEOS_PER_URL: 100; readonly MAX_LINKS_PER_URL: 100; readonly MAX_URL_ENTRIES: 50000; readonly IS… | { readonly MAX_URL_LENGTH: 2048; readonly URL_PROTOCOL_REGEX: RegExp; readonly MIN_SITEMAP_ITEM_LIMIT: 1; readonly MAX_SITEMAP_ITEM_LIMIT: 50000; readonly MIN_PRIORITY: 0; readonly MAX_PRIORITY: 1; readonly PRIORITY_STRING_REGEX: RegExp; readonly MIN_VIDEO_DURATION: 0; readonly MAX_VIDEO_DURATION: 28800; readonly MIN_VIDEO_RATING: 0; readonly MAX_VIDEO_RATING: 5; readonly MIN_VIDEO_VIEW_COUNT: 0; readonly MAX_VIDEO_TITLE_LENGTH: 100; readonly MAX_VIDEO_DESCRIPTION_LENGTH: 2048; readonly MAX_VIDEO_CATEGORY_LENGTH: 256; readonly MAX_TAGS_PER_VIDEO: 32; readonly MAX_NEWS_TITLE_LENGTH: 200; readon… |
sitemap · simpleSitemapAndIndex | ({ hostname, sitemapHostname, sourceData, destinationDir, limit, gzip, publicBasePath, xslUrl, }: SimpleSitemapAndIndexOptions): Promise<void> | ({ hostname, sitemapHostname, sourceData, destinationDir, limit, gzip, publicBasePath, xslUrl, logger, }: SimpleSitemapAndIndexOptions): Promise<void> |
Thành viên lớp hoặc interface bị xóa
| member | import | Trước |
|---|---|---|
SitemapStream.smiStream | sitemap | any |
SitemapAndIndexStream.currentSitemap | sitemap | any |
SitemapAndIndexStream.isCreatingSitemap | sitemap | any |
SitemapAndIndexStream.currentSitemapPipeline | sitemap | any |
Thành viên lớp hoặc interface thay đổi
| member | Trước | Sau |
|---|---|---|
SitemapStream.errorHandler | ErrorHandler | undefined | (error: Error, level: ErrorLevel): void |
InvalidAttrValue.constructor | (key: string, val: any, validator: RegExp): InvalidAttrValue | (key: string, val: any, validator: RegExp, url?: string | undefined): InvalidAttrValue |
SitemapItemLoose.priority | number | undefined | string | number | undefined |
XMLToSitemapItemStream.err | any | (msg: string): void |
XMLToSitemapItemStream.logger | (level: "log" | "warn" | "error" | "info", ...message: any): void | (level: "log" | "warn" | "error" | "info", ...message: any[]): void |
XMLToSitemapIndexStream.err | any | (msg: string): void |
Mới bị ngừng hỗ trợ
| export | @deprecated |
|---|---|
sitemap · EmptySitemap | No longer thrown: since 10.0.0, `SitemapStream` emits an empty `<urlset>` when it ends without items. Kept so existing imports still resolve. |
sitemap · SitemapStream.xmlNS | Use `xmlns` |
sitemap · XMLToSitemapItemStream.urlCount | Use entryCount |
Thay đổi yêu cầu (engines, phụ thuộc peer)
| Trước | Sau | |
|---|---|---|
engines.node | >=20.19.5 | >=22.22.1 |
Export mới (5)
| import | export | kind |
|---|---|---|
sitemap | Logger | type |
sitemap | InvalidURLError | class |
sitemap | InvalidVideoYesNo | class |
sitemap | InvalidLinkHreflang | class |
sitemap | SaxParserStreamOptions | interface |
Cung cấp dữ liệu này cho tác tử AI của bạn
Vigia là máy chủ MCP miễn phí: tác tử lập trình của bạn kiểm tra phiên bản, thay đổi phá vỡ tương thích và lỗ hổng trước khi viết mã. Không cần đăng ký, không cần khóa API.
claude mcp add --transport http vigia https://vigia.coredls.cloud/mcp
Thêm vào CursorThêm vào VS Code★ Gắn sao trên GitHub
Mọi ứng dụng MCP khác
{ "mcpServers": { "vigia": { "url": "https://vigia.coredls.cloud/mcp" } } }Kỹ năng cho tác tử (SKILL.md): cho tác tử biết khi nào dùng Vigia · GitHub Action cho pull request
Câu hỏi thường gặp
Nâng cấp sitemap từ 9 lên 10 có những thay đổi không tương thích nào?
Giữa sitemap 9.0.1 và 10.0.0, Vigia tìm thấy 1 export bị xóa, 2 chữ ký thay đổi và 10 thành viên lớp hoặc interface bị xóa hay thay đổi.
Những gì bị ngừng hỗ trợ trong sitemap 10?
3 export hoặc thành viên mới bị đánh dấu ngừng hỗ trợ trong sitemap 10.0.0.
Dành cho tác tử
GET https://vigia.coredls.cloud/v1/packages/npm/sitemap/upgrade?from=9.0.1&to=10.0.0