@kubb/renderer-jsx 5.0.0-beta.11 → 5.0.0-beta.13

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
@@ -4,14 +4,17 @@ const require_jsx_runtime$1 = require("./jsx-runtime.cjs");
4
4
  let _kubb_ast = require("@kubb/ast");
5
5
  //#region ../../internals/utils/src/context.ts
6
6
  /**
7
- * Context stack for tracking the current context values
7
+ * Context stack for tracking the current context values.
8
+ *
9
+ * WeakMap keyed by symbol so entries are GC-eligible once no external code
10
+ * holds a reference to the context key — important for long-running agent
11
+ * builds where plugins create and discard context keys across repeated runs.
8
12
  *
9
- * Note: This uses a global Map for simplicity in code generation scenarios.
10
13
  * For concurrent runtime execution, consider using AsyncLocalStorage or
11
14
  * instance-based context management.
12
15
  */
13
- const contextStack = /* @__PURE__ */ new Map();
14
- const contextDefaults = /* @__PURE__ */ new Map();
16
+ const contextStack = /* @__PURE__ */ new WeakMap();
17
+ const contextDefaults = /* @__PURE__ */ new WeakMap();
15
18
  /**
16
19
  * Provides a value to descendant components (Vue 3 style)
17
20
  *
package/dist/index.js CHANGED
@@ -4,14 +4,17 @@ import { Fragment, jsx } from "./jsx-runtime.js";
4
4
  import { createArrowFunction, createBreak, createConst, createExport, createFunction, createImport, createJsx, createSource, createText, createType } from "@kubb/ast";
5
5
  //#region ../../internals/utils/src/context.ts
6
6
  /**
7
- * Context stack for tracking the current context values
7
+ * Context stack for tracking the current context values.
8
+ *
9
+ * WeakMap keyed by symbol so entries are GC-eligible once no external code
10
+ * holds a reference to the context key — important for long-running agent
11
+ * builds where plugins create and discard context keys across repeated runs.
8
12
  *
9
- * Note: This uses a global Map for simplicity in code generation scenarios.
10
13
  * For concurrent runtime execution, consider using AsyncLocalStorage or
11
14
  * instance-based context management.
12
15
  */
13
- const contextStack = /* @__PURE__ */ new Map();
14
- const contextDefaults = /* @__PURE__ */ new Map();
16
+ const contextStack = /* @__PURE__ */ new WeakMap();
17
+ const contextDefaults = /* @__PURE__ */ new WeakMap();
15
18
  /**
16
19
  * Provides a value to descendant components (Vue 3 style)
17
20
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/renderer-jsx",
3
- "version": "5.0.0-beta.11",
3
+ "version": "5.0.0-beta.13",
4
4
  "description": "JSX-based renderer for Kubb. Provides a custom React runtime, reconciler, and built-in components (File, Function, Type, Const) for component-based, type-safe code generation.",
5
5
  "keywords": [
6
6
  "codegen",
@@ -75,7 +75,7 @@
75
75
  "registry": "https://registry.npmjs.org/"
76
76
  },
77
77
  "dependencies": {
78
- "@kubb/ast": "5.0.0-beta.11"
78
+ "@kubb/ast": "5.0.0-beta.13"
79
79
  },
80
80
  "devDependencies": {
81
81
  "@types/react": "^19.2.14",