@pyreon/compiler 0.7.9 → 0.7.10

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pyreon/compiler",
3
- "version": "0.7.9",
3
+ "version": "0.7.10",
4
4
  "description": "Template and JSX compiler for Pyreon",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -362,6 +362,13 @@ describe("JSX transform — edge cases", () => {
362
362
  expect(t("<div>{items().map(x => x)}</div>")).toContain("() =>")
363
363
  })
364
364
 
365
+ test("emits _bindText for method calls (runtime handles fallback)", () => {
366
+ // value.toLocaleString() — compiler emits _bindText, runtime falls back
367
+ // to renderEffect if source lacks .direct()
368
+ const result = t("<div><p>{value.toLocaleString()}</p></div>")
369
+ expect(result).toContain("_bindText(value.toLocaleString,")
370
+ })
371
+
365
372
  test("wraps nested call in array expression", () => {
366
373
  expect(t("<div>{[getItem()]}</div>")).toContain("() =>")
367
374
  })