rusackas commented on code in PR #39837:
URL: https://github.com/apache/superset/pull/39837#discussion_r3238611454
##########
docs/src/theme/DocVersionBadge/index.js:
##########
@@ -40,8 +40,8 @@ export default function DocVersionBadge() {
const isVersioned = [
'default', // main docs
'components',
- 'tutorials',
- 'developer_portal',
+ 'admin_docs',
+ 'developer_docs',
Review Comment:
Fixed in 8ef030a. Replaced the `'/' + pluginId` derivation with an explicit
`PLUGIN_ID_TO_BASE_PATH` map matching `docusaurus.config.ts` (`default` →
`/user-docs`, `components` → `/components`, `admin_docs` → `/admin-docs`,
`developer_docs` → `/developer-docs`). The previous code was also silently
broken for the `default` plugin (assumed `/docs` but actual routeBasePath is
`user-docs`) — that's now correct too.
##########
docs/src/theme/DocVersionBadge/index.js:
##########
@@ -40,8 +40,8 @@ export default function DocVersionBadge() {
const isVersioned = [
'default', // main docs
'components',
- 'tutorials',
- 'developer_portal',
+ 'admin_docs',
+ 'developer_docs',
Review Comment:
Yep, fixed in 8ef030a — same fix as the other two threads on this file.
Added an explicit pluginId → routeBasePath map, removed the underscore/hyphen
mismatch for admin_docs / developer_docs, and corrected the pre-existing
`default` → `/docs` bug (actual routeBasePath is `user-docs`).
##########
docs/scripts/manage-versions.mjs:
##########
@@ -211,16 +370,19 @@ function removeVersion(section, version) {
function printUsage() {
console.log(`
Usage:
- node scripts/manage-versions.js add <section> <version>
+ node scripts/manage-versions.js add <section> <version> [--skip-generate]
node scripts/manage-versions.js remove <section> <version>
Where:
- - section: 'docs', 'developer_portal', or 'components'
+ - section: 'docs', 'developer_docs', 'admin_docs', or 'components'
- version: version string (e.g., '1.2.0', '2.0.0')
+ - --skip-generate: skip refreshing auto-generated docs before snapshotting
+ (use when you've already placed a fresh databases.json
+ from CI and want to preserve it)
Examples:
node scripts/manage-versions.js add docs 2.0.0
- node scripts/manage-versions.js add developer_portal 1.3.0
+ node scripts/manage-versions.js add developer_docs 1.3.0
node scripts/manage-versions.js remove components 1.0.0
Review Comment:
Fixed in 8ef030a. All six `.js` references in `printUsage()` (usage lines +
examples) now correctly say `.mjs` — `node scripts/manage-versions.mjs add docs
2.0.0` etc.
##########
docs/scripts/manage-versions.mjs:
##########
@@ -30,9 +30,11 @@ const __dirname = path.dirname(__filename);
const CONFIG_FILE = path.join(__dirname, '..', 'versions-config.json');
// Parse command line arguments
-const args = process.argv.slice(2);
+const rawArgs = process.argv.slice(2);
+const skipGenerate = rawArgs.includes('--skip-generate');
+const args = rawArgs.filter((a) => a !== '--skip-generate');
const command = args[0]; // 'add' or 'remove'
-const section = args[1]; // 'docs', 'developer_portal', or 'components'
+const section = args[1]; // 'docs', 'developer_docs', or 'components'
Review Comment:
Fixed in 8ef030a — same change as the other thread on this line. Inline
comment now includes `admin_docs`.
##########
docs/scripts/manage-versions.mjs:
##########
@@ -211,16 +370,19 @@ function removeVersion(section, version) {
function printUsage() {
console.log(`
Usage:
- node scripts/manage-versions.js add <section> <version>
+ node scripts/manage-versions.js add <section> <version> [--skip-generate]
node scripts/manage-versions.js remove <section> <version>
Review Comment:
Fixed in 8ef030a — same change as the other thread on this section. All six
occurrences (`add` / `remove` usage lines + four examples) now use `.mjs`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]