@kubb/ast 5.0.0-beta.93 → 5.0.0-beta.94

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.
package/dist/index.cjs CHANGED
@@ -1149,10 +1149,11 @@ function transformChildren(node, visitor, recurse) {
1149
1149
  if (next !== value) (updates ??= {})[key] = next;
1150
1150
  }
1151
1151
  }
1152
- return updates ? {
1152
+ if (!updates) return node;
1153
+ return {
1153
1154
  ...node,
1154
1155
  ...updates
1155
- } : node;
1156
+ };
1156
1157
  }
1157
1158
  /**
1158
1159
  * Lazy depth-first collection pass. Yields every non-null value returned by
@@ -1419,7 +1420,7 @@ function extractRefName(ref) {
1419
1420
  */
1420
1421
  function resolveRefName(node) {
1421
1422
  if (!node || node.type !== "ref") return null;
1422
- if (node.ref) return extractRefName(node.ref) ?? node.name ?? node.schema?.name ?? null;
1423
+ if (node.ref) return extractRefName(node.ref);
1423
1424
  return node.name ?? node.schema?.name ?? null;
1424
1425
  }
1425
1426
  /**
@@ -1475,7 +1476,7 @@ function syncSchemaRef(node) {
1475
1476
  });
1476
1477
  }
1477
1478
  /**
1478
- * Type guard that returns `true` when a schema emits as a plain `string` type.
1479
+ * Returns `true` when a schema emits as a plain `string` type.
1479
1480
  *
1480
1481
  * Covers `string`, `uuid`, `email`, `url`, and `datetime` types. For `date` and `time`
1481
1482
  * types, returns `true` only when `representation` is `'string'` rather than `'date'`.