diff --git a/internal/check-shared-component-reached-bundles.mjs b/internal/check-shared-component-reached-bundles.mjs index 178870cca..afa5c211b 100644 --- a/internal/check-shared-component-reached-bundles.mjs +++ b/internal/check-shared-component-reached-bundles.mjs @@ -63,12 +63,15 @@ const MARKERS = [ // The built shape keeps its structure through minification even though names change: // unguarded const o=e.getRootNode();if(!(o instanceof ShadowRoot)) // guarded if(!e)return;const o=e.getRootNode();if(!(o instanceof ShadowRoot)) - // The `instanceof ShadowRoot` tail pins it to ensureEngineCSS: useShadowStyles has its own - // (older) `if(!a)return;…getRootNode()` guard, which must not count. + // The `instanceof ShadowRoot))return` tail pins it to ensureEngineCSS: useShadowStyles has its + // own `if(!n)return;const i=n.getRootNode();if(!(i instanceof ShadowRoot)||…` — which matched the + // first version of this regex and would have counted a rebuilt bundle as fixed WITHOUT the guard. + // The trailing `)return` is ensureEngineCSS's early exit; useShadowStyles continues with `||`. + // Proven both ways on a rebuilt doxa-simple-map: guarded source matches, guard stripped does not. id: 'map-unmount-guard', component: 'library/composables/useMapInstance.js', sourceRe: /if \(!element\) return\n\s*const root = element\.getRootNode\(\)/, - builtRe: /if\(!([\w$]+)\)return;const ([\w$]+)=\1\.getRootNode\(\);if\(!\(\2 instanceof ShadowRoot\)\)/, + builtRe: /if\(!([\w$]+)\)return;const ([\w$]+)=\1\.getRootNode\(\);if\(!\(\2 instanceof ShadowRoot\)\)return/, marker: 'if (!element) return (ensureEngineCSS)', landed: 'studio, 2026-09-25', why: 'a map whose pane unmounts mid-initialise no longer throws "reading getRootNode" (check-map-unmount-mid-init)',