Repository navigation
fix(start-plugin-core): declare image and news namespaces in sitemap.xml - #8692
Conversation
🦋 Changeset detectedLatest commit: 81b4fb3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
🚀 Changeset Version Preview3 package(s) bumped directly, 6 bumped as dependents. 🟩 Patch bumps
|
|
View your CI Pipeline Execution ↗ for commit 81b4fb3
☁️ Nx Cloud last updated this comment at |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to The sitemap namespace fix is mergeable after normal checks. Pre-merge checks ·
|
Bundle Size BenchmarksThis pull request does not affect bundle size in any measured scenario. |
Merging this PR will not alter performanceℹ️ 3 benchmarks have no flame graph
Comparing Footnotes
|
The sitemap writer emitted image:* and news:* elements, but <urlset> only declared the default sitemap namespace and xmlns:xhtml. xmlbuilder2 serialized those elements with xmlns="" and an undeclared prefix, so sitemaps with images or news were not namespace-well-formed XML. Declare xmlns:image and xmlns:news on <urlset>. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
a080023 to
81b4fb3
Compare
Bug
createXmlinpackages/start-plugin-core/src/build-sitemap.tsdeclared only the default sitemap namespace andxmlns:xhtmlon<urlset>, but the writer also emitsimage:*andnews:*elements. Any sitemap with images or news came out as<image:image xmlns="">with an undeclared prefix, so it was not namespace-well-formed XML. Strict parsers reject it. For example, xmlbuilder2's own parser fails with "The operation is not allowed by Namespaces in XML".Fix
Declare both prefixes on
<urlset>:xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"xmlns:news="http://www.google.com/schemas/sitemap-news/0.9"Tests
The regression tests (golden tests against Google's example sitemaps, plus value-rule tests) are in the stacked PR #8693. Its image and news golden tests fail without this fix.
Validation
@tanstack/start-plugin-core:test:unit: 47 files, 820 passed, 1 expected fail (the existingit.failsintests/compiler.test.ts)@tanstack/start-plugin-core:test:types: pass@tanstack/start-plugin-core:test:eslint: passBuild-time only, with no client JavaScript changes. Includes a patch changeset.
🤖 Generated with Claude Code