mirror of
https://github.com/apache/superset.git
synced 2026-05-22 00:05:15 +00:00
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.
13 KiB
13 KiB