@lowdefy/build 4.7.1 → 4.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -18,7 +18,10 @@ import makeId from '../../utils/makeId.js';
18
18
  function makeRefDefinition(refDefinition, parent, refMap, lineNumber, walkerPath) {
19
19
  // Use walker tree path when available for deterministic IDs under parallel
20
20
  // resolution. Falls back to counter for root ref and JIT-created refs.
21
- const id = walkerPath != null ? walkerPath : makeId.next();
21
+ // When a file's root content is itself a _ref, both the outer and inner refs
22
+ // share the same walker path. Fall back to counter to avoid overwriting the
23
+ // outer ref's refMap entry (which would create a self-referencing parent).
24
+ const id = walkerPath != null && refMap[walkerPath] === undefined ? walkerPath : makeId.next();
22
25
  const refDef = {
23
26
  parent,
24
27
  lineNumber