@sprlab/wccompiler 0.5.11 → 0.5.12

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.
@@ -67,11 +67,16 @@ function __effect(fn) {
67
67
  let _active = true;
68
68
  const run = () => {
69
69
  if (!_active) return;
70
- if (typeof _cleanup === 'function') _cleanup();
71
- const prev = __currentEffect;
72
- __currentEffect = run;
73
- _cleanup = fn();
74
- __currentEffect = prev;
70
+ try {
71
+ if (typeof _cleanup === 'function') _cleanup();
72
+ const prev = __currentEffect;
73
+ __currentEffect = run;
74
+ _cleanup = fn();
75
+ __currentEffect = prev;
76
+ } catch (e) {
77
+ console.error('[wcc] Effect error:', e);
78
+ _active = false;
79
+ }
75
80
  };
76
81
  run();
77
82
  return () => { _active = false; if (typeof _cleanup === 'function') _cleanup(); };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sprlab/wccompiler",
3
- "version": "0.5.11",
3
+ "version": "0.5.12",
4
4
  "description": "Zero-runtime compiler that transforms .wcc single-file components into native web components with signals-based reactivity",
5
5
  "type": "module",
6
6
  "bin": {