@builder.io/mitosis 0.13.0 → 0.13.1

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.
@@ -304,23 +304,21 @@ Please add a initial value for every state property even if it's \`undefined\`.`
304
304
  : `if (typeof window !== 'undefined') {
305
305
  ${(_3 = json.hooks.onUpdate) === null || _3 === void 0 ? void 0 : _3.map(({ code, depsArray }) =>
306
306
  /**
307
- * We need allowSignalWrites only for Angular 17 https://angular.dev/api/core/CreateEffectOptions#allowSignalWrites
308
- * TODO: remove on 2025-05-15 https://angular.dev/reference/releases#actively-supported-versions
307
+ * `allowSignalWrites` is required for Angular < 19 to permit signal writes
308
+ * inside effects. It was deprecated in Angular 19 (writes are always allowed)
309
+ * and logging it there produces console noise, so we gate it on the runtime
310
+ * Angular version to keep backwards compatibility with v17/v18.
309
311
  */
310
312
  `effect(() => {
311
313
  ${(depsArray === null || depsArray === void 0 ? void 0 : depsArray.length)
312
314
  ? `
313
315
  // --- Mitosis: Workaround to make sure the effect() is triggered ---
314
316
  ${depsArray.join('\n')}
315
- // ---
317
+ // ---
316
318
  `
317
319
  : ''}
318
320
  ${code}
319
- },
320
- {
321
- allowSignalWrites: true, // Enable writing to signals inside effects
322
- }
323
- );`).join('\n')}
321
+ }, Number(VERSION.major) < 19 ? ({ allowSignalWrites: true } as any) : undefined);`).join('\n')}
324
322
  }
325
323
  `}}
326
324
 
@@ -13,6 +13,7 @@ const getAngularCoreImportsAsString = ({ refs, output, input, model, onPush, eff
13
13
  output,
14
14
  input,
15
15
  effect,
16
+ VERSION: effect,
16
17
  signal,
17
18
  computed,
18
19
  ChangeDetectionStrategy: onPush,
package/package.json CHANGED
@@ -22,7 +22,7 @@
22
22
  "name": "Builder.io",
23
23
  "url": "https://www.builder.io"
24
24
  },
25
- "version": "0.13.0",
25
+ "version": "0.13.1",
26
26
  "homepage": "https://github.com/BuilderIO/mitosis",
27
27
  "main": "./dist/src/index.js",
28
28
  "exports": {