Repository navigation
v0.1.3
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 likeonClick={(e) => { if (...) {...} }}is now correctly left untouched. - Improved State Tracking: The transformer now uses
inOpeningTagandattrBraceDepthtracking 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 bundleddist/folder. This simplifies debugging and ensures full JSDoc/type preservation. - Vite Plugin Types: Added
src/compiler/vite-plugin.d.tswith 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 oldgetJsxDepth()with a more comprehensive context tracker that returnsjsxDepth,inOpeningTag,attrBraceDepth, andshouldTransform. - Better Event Types: Added
onKeyPressto the JSX intrinsic type definitions.