@tsrx/preact@0.1.31

Ripple-TS/ripple@tsrx/preact@0.1.31Jun 13, 2026by github-actions[bot]

AI Summary

This release enforces stricter syntax rules by disallowing `return` statements inside directive blocks such as `@try`, `@catch`, and `@pending`.

Key Highlights

  • Return statements are now forbidden inside `@try`, `@catch`, and `@pending` blocks.
  • Consistent error messaging across all targets (ripple, react, preact, solid, vue).
  • Markup must be output directly within the block instead of being returned.

New Features

  • Enhanced syntax validation for template directives

Full Release Notes

### Patch Changes

- [#1269](https://github.com/Ripple-TS/ripple/pull/1269)
  [`8747e8f`](https://github.com/Ripple-TS/ripple/commit/8747e8f306628443d3c4d73bce0d79e986f5966e)
  Thanks [@leonidaz](https://github.com/leonidaz)! - Disallow `return` statements
  inside `@try`/`@catch`/`@pending` blocks.

  `return` is only valid in the JS setup at the top of a `@{ … }` code block —
  never inside a `@`-directive block. `@if`/`@for`/`@switch` already rejected
  returns; `@try`/`@catch`/`@pending` previously allowed `return <markup>`
  (lowering it into a reactive boundary fallback). They now reject any `return`
  (with or without an argument) with the same
  `Return statements are not allowed inside TSRX templates` diagnostic,
  consistently across every target (ripple, react, preact, solid, vue). Render
  markup by writing it as the block's output instead of returning it. Returns
  inside nested ordinary functions are unaffected.

- Updated dependencies
  [[`8747e8f`](https://github.com/Ripple-TS/ripple/commit/8747e8f306628443d3c4d73bce0d79e986f5966e),
  [`8747e8f`](https://github.com/Ripple-TS/ripple/commit/8747e8f306628443d3c4d73bce0d79e986f5966e)]:
  - @tsrx/core@0.1.31