From dc11cdbb6a536c7797651009851e357a532b6224 Mon Sep 17 00:00:00 2001 From: doxa-maps-88655c70 <88627970+doxa-maps-88655c70@users.noreply.github.com> Date: Fri, 25 Sep 2026 05:17:07 +0000 Subject: [PATCH] check:shared-reached: pin the unmount-guard marker to ensureEngineCSS only MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The first regex for map-unmount-guard also matched useShadowStyles as the current source compiles it: if(!n)return;const i=n.getRootNode();if(!(i instanceof ShadowRoot)||… The freshly built plugin-studio bundle, which has no useMapInstance at all, matched it. So any consumer rebuilt against today's useShadowStyles would have been counted as carrying the fix whether or not it did. The marker now requires ensureEngineCSS's early exit, "…ShadowRoot))return", where useShadowStyles continues with "||". Proven both ways on a rebuilt doxa-simple-map: built from the guarded source it matches, built with the guard stripped it does not. The studio bundle no longer matches. --- internal/check-shared-component-reached-bundles.mjs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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)',