Files
superset2/docs/scripts
Claude Code 22ce3239fc chore(docs): freeze @site/-aliased data imports at version cut too
Extend freezeDataImports to also handle MDX imports that use the
Docusaurus `@site/` alias (e.g. feature-flags.mdx imports
`@site/static/feature-flags.json` to render the feature-flag tables).
Previously these were skipped because the regex only matched escaping
relative paths, so the snapshot kept reading the live JSON — meaning a
6.1.0 snapshot would silently grow new flags every time someone added
one in master.

The freeze now matches both prefixes:
- `from '../../foo/bar.json'` — relative escape (existing)
- `from '@site/static/foo.json'` — site-root alias (new)

`@site/` always resolves against the docs root, so we don't need the
depth check; instead we just skip any import that resolves inside the
section root (which would be copied with the section anyway).

Verified end-to-end with a throwaway admin_docs cut: the snapshot's
feature-flags page renders all 62 current feature flags from a frozen
JSON, alongside the country-map-tools freeze.
2026-05-11 10:02:09 -07:00
..