From 206e9b9a28364067a0754ba7576bdd6c2f2c5b2d Mon Sep 17 00:00:00 2001 From: Claude Code Date: Tue, 12 May 2026 17:16:04 -0700 Subject: [PATCH] chore(docs): don't auto-bump lastVersion when cutting a new version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Superset's docs site keeps `lastVersion: 'current'` in every section so the canonical URLs (`/docs/...`, `/admin-docs/...`, etc.) always render master content, with cut versions accessible only via their explicit version segment. The script's previous "auto-bump on first cut" behavior was a generic Docusaurus default that doesn't match this intent — for a section's first cut it would silently set lastVersion to the new version, redirecting the canonical URL to the historical snapshot. Drop the auto-bump. Operators who want the new version to become the canonical URL can edit versions-config.json after cutting. --- docs/scripts/manage-versions.mjs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/scripts/manage-versions.mjs b/docs/scripts/manage-versions.mjs index 163e200c64d..9735a6c55ee 100644 --- a/docs/scripts/manage-versions.mjs +++ b/docs/scripts/manage-versions.mjs @@ -269,10 +269,12 @@ function addVersion(section, version) { banner: 'none' }; - // Optionally update lastVersion if this is the first non-current version - if (config[section].onlyIncludeVersions.length === 2) { - config[section].lastVersion = version; - } + // Note: we deliberately do NOT auto-bump `lastVersion` to the new + // version. Superset's docs site keeps `lastVersion: 'current'` so the + // canonical URLs (`/docs/...`, `/admin-docs/...`, etc.) always render + // master content; cut versions are accessed only via their explicit + // version segment. If you want a different policy, edit + // versions-config.json after cutting. saveConfig(config); console.log(`✅ Version ${version} added successfully to ${section}`);