@tsrx/ripple@0.1.37

withastro/astro@tsrx/ripple@0.1.37Jul 7, 2026by github-actions[bot]

AI Summary

Major internal refactoring of the AST parser to use raw JSX shapes and implement copy-on-write patterns.

Key Highlights

  • Parser now returns raw JSX AST shapes instead of Ripple-normalized types
  • Implemented copy-on-write implementation to prevent AST mutation
  • Restored Volar source walk mappings for scoped CSS class attributes

Breaking Changes

  • Ripple-specific node types (Element, TsrxFragment, Text, TSRXExpression, Attribute, SpreadAttribute) are no longer produced
  • Builders for Ripple-specific node types (text, tsrx_fragment, tsrx_expression) have been removed

Full Release Notes

### Patch Changes

- [#1324](https://github.com/Ripple-TS/ripple/pull/1324)
  [`1925074`](https://github.com/Ripple-TS/ripple/commit/1925074254de0e61c8578cba136c50ea8f89cd35)
  Thanks [@leonidaz](https://github.com/leonidaz)! - `parse()` now returns the
  parser's raw AST instead of the Ripple-normalized one: template nodes keep their
  JSX shapes (`JSXElement`, `JSXFragment`, `JSXText`, `JSXExpressionContainer`,
  `JSXAttribute`, `JSXStyleElement`) and control-flow directives keep their
  `JSX…Expression` forms. The Ripple-specific
  `Element`/`TsrxFragment`/`Text`/`TSRXExpression`/`Attribute`/`SpreadAttribute`
  node types are no longer produced; the analyzer and client/server transforms
  consume the parser AST directly.

  The analyzer and transforms are also copy-on-write now — they never mutate the
  parsed AST — so `compile_to_volar_mappings` no longer clones the tree, and the
  Volar source walk sees the analyzer's scoped-CSS metadata: class attributes on
  scoped elements get their CSS hover and go-to-definition mappings back.

- Updated dependencies
  [[`1925074`](https://github.com/Ripple-TS/ripple/commit/1925074254de0e61c8578cba136c50ea8f89cd35)]:
  - @tsrx/core@0.1.36