Skip to content

v0.1.3

Choose a tag to compare

@ZtaMDev ZtaMDev released this 25 Dec 03:14
· 38 commits to main since this release

Round v0.1.3 Release Notes

Transformer Precision & Source Distribution

This release brings critical improvements to the compiler's context detection and switches to a simpler, unbundled distribution model.

Compiler Fixes

  • Prop Context Detection: Fixed a critical bug where control flow statements (if, for, switch) inside JSX attribute expressions (like event handlers) were incorrectly transformed. Standard JavaScript inside props like onClick={(e) => { if (...) {...} }} is now correctly left untouched.
  • Improved State Tracking: The transformer now uses inOpeningTag and attrBraceDepth tracking to precisely distinguish between JSX children context (where Round syntax applies) and attribute expressions (where standard JS should be preserved).

Distribution Changes

  • Source-Based Distribution: The package now ships the src/ directory directly instead of a bundled dist/ folder. This simplifies debugging and ensures full JSDoc/type preservation.
  • Vite Plugin Types: Added src/compiler/vite-plugin.d.ts with proper TypeScript definitions for the Vite plugin export.

Round Extension v0.1.3 Release Notes

LSP Synchronization

The VS Code extension's Language Server has been updated to match the core transformer improvements.

  • Prop Context Fix: The LSP transformer now correctly skips transformations inside attribute expressions, fixing hover, completions, and diagnostics for code inside event handlers.
  • New getJsxContext() Function: Replaces the old getJsxDepth() with a more comprehensive context tracker that returns jsxDepth, inOpeningTag, attrBraceDepth, and shouldTransform.
  • Better Event Types: Added onKeyPress to the JSX intrinsic type definitions.