Repository navigation
chore(deps): upgrade sitemap to v10, remove the empty sitemap guards - #13116
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
✅ [V2]
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Size Change: 0 B Total Size: 12.1 MB ℹ️ View Unchanged
|
|
Size Change: 0 B Total Size: 12.1 MB ℹ️ View Unchanged
|
⚡️ Lighthouse report for the deploy preview of this PR
|
Bumps [sitemap](https://github.com/ekalinin/sitemap.js) from 9.0.1 to 10.0.0. - [Release notes](https://github.com/ekalinin/sitemap.js/releases) - [Changelog](https://github.com/ekalinin/sitemap.js/blob/master/CHANGELOG.md) - [Commits](ekalinin/sitemap.js@9.0.1...10.0.0) --- updated-dependencies: - dependency-name: sitemap dependency-version: 10.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
…akes useless sitemap v10 no longer throws EmptySitemap, and createSitemap() already returns null before serializing an empty list of items. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4f3616d to
3346a28
Compare
…pty urlset Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
Motivation
Upgrade
sitemapfrom v9 to v10, replacing the Dependabot PR #13092 to also clean up the code that v10 makes useless.v10 no longer throws
EmptySitemapwhen ending a stream with no items, so the guard insitemapItemsToXmlString()that replaced that error with a clearer one is now useless. It was also unreachable:createSitemap()already returnsnullfor an empty list of items, so that we keep not writing anysitemap.xmlfile instead of an empty<urlset>, which isn't valid against the sitemap XSD. ThesitemapRoutes.length === 0early return was redundant too,Promise.all([])already resolves to[].The other v10 breaking changes don't affect us:
require(esm), our Node.js>=26.13requirement is above the new>=22.22.1one.SitemapStreamemits item errors instead of throwing them fromwrite():streamToPromise()still rejects, an invalidlastmodstill fails the build.priorityand alternate link validation: warnings instead of invalid output or crashes, only for customcreateSitemapItems()items.simpleSitemapAndIndex,xmlNS, parsers and CLI changes: APIs we don't use.Test Plan
Unit tests, CI. The
sitemapItemsToXmlString()test for no items now captures the empty<urlset>that v10 outputs, and the existingcreateSitemap()tests already cover thenullreturn for sites with no routes andcreateSitemapItems()returning no items.Test links
Deploy preview: https://deploy-preview-13116--docusaurus-2.netlify.app/sitemap.xml
Related issues/PRs
Replaces #13092
🤖 Generated with Claude Code
Summary by CodeRabbit