Skip to content

feat: add standalone TSRX runtime packages - #1398

Open
aleclarson wants to merge 3 commits into
Ripple-TS:mainfrom
aleclarson:feat/runtime-helper-packages
Open

feat: add standalone TSRX runtime packages#1398
aleclarson wants to merge 3 commits into
Ripple-TS:mainfrom
aleclarson:feat/runtime-helper-packages

Conversation

@aleclarson

@aleclarson aleclarson commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

The default remains compiler-owned imports so existing applications need no dependency changes, while library publishers can opt into runtimeImports: direct and depend only on the core-free shared runtime plus the matching renderer runtime.

  • Review whether helper ownership and renderer peer dependencies match the intended package boundaries.
  • Confirm import selection stays isolated to each compilation and preserves existing compiler-package imports by default.
  • Check that Vite, Rspack, Bun, and React Turbopack propagate the option through CSS, loader, and dependency-scan paths.
  • Focused tests cover compatibility subpaths, emitted imports, runtime behavior, types, plugin forwarding, and package boundaries.

Closes #1300.


Note

Medium Risk
Wide surface area across compile output and all bundler plugins, but default behavior is unchanged and coverage targets import paths and package boundaries.

Overview
Introduces @tsrx/runtime (shared ref/iterable/language helpers) and per-renderer @tsrx/*-runtime packages, moving implementations out of @tsrx/core while compiler packages re-export them for backward compatibility.

Compilers gain runtimeImports: 'compiler' | 'direct' (default unchanged). In direct mode, emitted helper imports target the small runtime packages instead of @tsrx/react/ref-style compiler subpaths—intended for published libraries that should not depend on the compiler at runtime.

The same option is threaded through Vite, Rspack, Bun, and React Turbopack plugins (including CSS re-compile and dep-scan paths). Tests and package-boundary checks verify emitted imports and that runtime packages stay free of @tsrx/core.

Reviewed by Cursor Bugbot for commit beccadb. Bugbot is set up for automated code reviews on this repo. Configure here.

@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

@aleclarson is attempting to deploy a commit to the Ripple Team Team on Vercel.

A member of the Team first needs to authorize it.

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is ON, but it could not run because the branch was deleted or merged before autofix could start.

Reviewed by Cursor Bugbot for commit beccadb. Configure here.


const real_path = to_real_path(id.split('?')[0]);
const source = await readFile(real_path, 'utf-8');
let { code, css, map } = compile(source, real_path);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solid Vite scan skips runtime option

Medium Severity

The Solid Vite plugin builds compile_options with runtimeImports and uses it in load, but the dep-scan plugin still passes the bare compile function. With runtimeImports: 'direct', optimizeDeps scanning emits compiler-package helper imports instead of @tsrx/solid-runtime, so the runtime package can be missed until request time.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit beccadb. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Split runtime helpers out of compiler packages

1 participant