The previous import-path fixer only matched two-level relative paths
(`../../src/` and `../../data/`), missing files at deeper nesting in the
section tree. After the 6.1.0 cut for developer_docs, ~50 component MDX
files at depth 3 still referenced `../../../src/components/StorybookWrapper`
(should have been `../../../../src/...`), and the components Button page
referenced `../../../superset-frontend/...` (should have been
`../../../../superset-frontend/...`). The Docusaurus production build
failed with module-not-found errors as a result.
Replace the pattern-specific regex with a depth-aware walker that
- counts the file's nesting depth within the snapshot,
- bumps any relative import whose `../` count exceeds that depth (i.e.
the import escapes the section root and so must compensate for the
extra `version-X.X.X/` directory the snapshot lives under),
- skips fenced code blocks so documented sample imports (e.g. Playwright
page-object examples in developer_docs/testing/e2e-testing.md) are not
rewritten.
Re-cut all four sections under the new fixer. yarn build now passes
locally.
- Snapshot all four versioned docs sections at v6.1.0; master continues to
serve as "Next" (lastVersion: current, banner: unreleased) so editing
master keeps updating the canonical URLs
- Enable the previously-disabled components plugin and version it
- Rename stale "developer_portal" references to "developer_docs" across
package.json scripts, manage-versions.mjs, theme files (DocVersionBadge,
DocVersionBanner), DOCS_CLAUDE.md, and README.md (URL backward-compat
redirect /developer_portal/* preserved)
- Add admin_docs version scripts; drop dead "tutorials" plugin id from
the version badge
- Generalize fixVersionedImports in manage-versions.mjs to walk every
section's snapshot and rewrite ../../src/ and ../../data/ imports,
catching admin_docs and components files that previous version cuts
would have broken
- Remove orphan files: developer_portal_versions.json,
tutorials_versions.json, and stray empty versions.json files inside
components/ and developer_docs/ content directories