ripple 0.2.141 → 0.2.142

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/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Ripple is an elegant TypeScript UI framework",
4
4
  "license": "MIT",
5
5
  "author": "Dominic Gannaway",
6
- "version": "0.2.141",
6
+ "version": "0.2.142",
7
7
  "type": "module",
8
8
  "module": "src/runtime/index-client.js",
9
9
  "main": "src/runtime/index-client.js",
@@ -81,6 +81,6 @@
81
81
  "typescript": "^5.9.2"
82
82
  },
83
83
  "peerDependencies": {
84
- "ripple": "0.2.141"
84
+ "ripple": "0.2.142"
85
85
  }
86
86
  }
@@ -1379,7 +1379,7 @@ const visitors = {
1379
1379
  }
1380
1380
 
1381
1381
  const left = object(argument);
1382
- const binding = context.state.scope.get(left.name);
1382
+ const binding = left && context.state.scope.get(left.name);
1383
1383
  const transformers = left && binding?.transform;
1384
1384
 
1385
1385
  if (left === argument) {
@@ -342,6 +342,23 @@ export component App() {
342
342
 
343
343
  <div>{test}</div>
344
344
  }
345
+ `;
346
+ expect(() => compile(code, 'test.ripple')).not.toThrow();
347
+ });
348
+
349
+ it('should not error on `this` MemberExpression with a UpdateExpression', () => {
350
+ const code = `
351
+ class Test {
352
+ constructor() {
353
+ this.count = 0;
354
+ this.count++; // This should not fail
355
+ }
356
+ }
357
+
358
+ export component App() {
359
+ const test = new Test();
360
+ <div>{test.count}</div>
361
+ }
345
362
  `;
346
363
  expect(() => compile(code, 'test.ripple')).not.toThrow();
347
364
  });