Skip to content

Commit eeb5651

Browse files
committed
Merge remote-tracking branch 'origin/main' into jg/3172-pin-pnpm-ci
* origin/main: fix(specs): boot dummy specs without readline and drop redundant pnpm workspace (#3190) docs: add RSC migration success stories page (#1985) (#3162) Fix Bencher reporting permanently broken on pushes to main (#3148) docs: add example migrations guide (#3126) docs: remove defunct guavapass.com reference (#3199) chore: remove redundant --rsc-pro install generator flag (#3105) ci: warn (don't fail) on Bencher main regression (#3168) test: enable RSpec --profile to surface slowest package tests (#3176) fix(node-renderer): expose performance in VM context when supportModules (#3158) docs: remove stale immediate_hydration references (#3139) (#3159) docs: restore absolute URL for node-renderer testing example (#3179) Bump Rspack dependencies to v2 (^2.0.0-0) (#3084) chore: remove obsolete webpack <5.106.0 pin (#3175) Move Node Renderer entry point to renderer/ directory (#3165) docs: address RSC pitfalls review follow-ups (#3155) (#3156) # Conflicts: # CHANGELOG.md
2 parents e8798b2 + b1f443f commit eeb5651

70 files changed

Lines changed: 1471 additions & 631 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/benchmark.yml

Lines changed: 140 additions & 84 deletions
Large diffs are not rendered by default.

.lychee.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ exclude = [
2626
# ============================================================================
2727
'^https://(www\.)?npmjs\.(org|com)', # Returns 403 for automated requests
2828
'^https://medium\.com', # Returns 403 for automated requests
29+
'^https://careersatdoordash\.com', # Cloudflare bot challenge returns 403
2930
'^https://www\.linkedin\.com',
3031
'^https://reactrails\.slack\.com',
3132
'^https://docs\.google\.com', # Private docs require auth

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,26 @@ After a release, run `/update-changelog` in Claude Code to analyze commits, writ
2424

2525
### [Unreleased]
2626

27+
#### Removed
28+
29+
- **[Pro]** **Removed the `--rsc-pro` install generator flag**: `--rsc` already implies Pro, so the separate mode was unnecessary. Behaviors previously gated on `--rsc-pro` (Pro verification checklist, prerelease install note, exact Pro gem pin on prereleases) now fire on `--rsc` installs. See also [Issue 3104](https://github.com/shakacode/react_on_rails/issues/3104), which tracks unrelated silent-failure bugs in the Pro upgrade automation. [PR 3105](https://github.com/shakacode/react_on_rails/pull/3105) by [ihabadham](https://github.com/ihabadham).
30+
31+
#### Changed
32+
33+
- **[Pro]** **Pro generator now creates the Node Renderer at `renderer/node-renderer.js`**: The canonical location for the Node Renderer entry point is now a dedicated top-level `renderer/` directory instead of `client/`, making it straightforward to exclude from production Docker builds that strip JS sources after bundling. Docs and Pro `spec/dummy` now use the new path consistently. Existing apps are unaffected — the generator skips files that already exist (including a legacy `client/node-renderer.js`). Fixes [Issue 3073](https://github.com/shakacode/react_on_rails/issues/3073). [PR 3165](https://github.com/shakacode/react_on_rails/pull/3165) by [justin808](https://github.com/justin808).
34+
2735
#### Fixed
2836

2937
- **Scaffolded CI workflow pins a pnpm version when `packageManager` is absent**: The generated `.github/workflows/ci.yml` now emits `with: version:` for `pnpm/action-setup@v4` when pnpm is detected from `pnpm-lock.yaml` alone, preventing the setup step from failing before dependency install. When `packageManager` is declared in `package.json`, the version key is omitted so the action can read the pin from there. Fixes [Issue 3172](https://github.com/shakacode/react_on_rails/issues/3172). [PR 3174](https://github.com/shakacode/react_on_rails/pull/3174) by [justin808](https://github.com/justin808).
38+
- **[Pro]** **Node renderer now exposes `performance` when `supportModules: true`**: React 19's development build of `React.lazy` calls `performance.now()`, which previously threw `ReferenceError: performance is not defined` inside the node renderer's VM context unless users manually added `performance` via `additionalContext`. `performance` is now included in the default globals alongside `Buffer`, `process`, etc. Fixes [Issue 3154](https://github.com/shakacode/react_on_rails/issues/3154). [PR 3158](https://github.com/shakacode/react_on_rails/pull/3158) by [justin808](https://github.com/justin808).
3039
- **Client startup now recovers if initialization begins during `interactive` after `DOMContentLoaded` already fired**: React on Rails now still initializes the page when the client bundle starts in the browser timing window after `DOMContentLoaded` but before the document reaches `complete`. Fixes [Issue 3150](https://github.com/shakacode/react_on_rails/issues/3150). [PR 3151](https://github.com/shakacode/react_on_rails/pull/3151) by [ihabadham](https://github.com/ihabadham).
3140
- **Doctor accepts TypeScript server bundle entrypoints**: `react_on_rails:doctor` now resolves common source entrypoint suffixes (`.js`, `.jsx`, `.ts`, `.tsx`, `.mjs`, `.cjs`) before warning that the server bundle is missing, preventing false positives when apps use `server-bundle.ts`. [PR 3111](https://github.com/shakacode/react_on_rails/pull/3111) by [justin808](https://github.com/justin808).
3241
- **Doctor no longer fails custom projects for a missing generated `bin/dev`**: `react_on_rails:doctor` now downgrades a missing official React on Rails `bin/dev` launcher from an error to a warning and adds explicit guidance when a custom `./dev` script is detected, so custom projects can pass diagnostics when their development setup is intentional. Fixes [Issue 3103](https://github.com/shakacode/react_on_rails/issues/3103). [PR 3117](https://github.com/shakacode/react_on_rails/pull/3117) by [justin808](https://github.com/justin808).
3342

43+
#### Changed
44+
45+
- **Rspack install scaffolding now targets Rspack v2**: `react_on_rails:install --rspack` and `bin/switch-bundler` now generate the Rspack v2 package line (`@rspack/core@^2.0.0-0`, `@rspack/cli@^2.0.0-0`, `@rspack/plugin-react-refresh@^2.0.0`) while keeping `rspack-manifest-plugin@^5.0.0`, which is already compatible. Closes [Issue 3082](https://github.com/shakacode/react_on_rails/issues/3082). [PR 3084](https://github.com/shakacode/react_on_rails/pull/3084) by [justin808](https://github.com/justin808).
46+
3447
### [16.6.0] - 2026-04-09
3548

3649
#### Removed

PROJECTS.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ _Please support the project by [emailing Justin Gordon](mailto:justin@shakacode.
2020
- **[OppenheimerFunds](https://www.oppenheimerfunds.com/)**, investment site.
2121
- **[KissKissBankBank](https://www.kisskissbankbank.com/)**, large French crowdfunding platform.
2222
- **HVMN**: Web ecommerce site for "biohacking" products.
23-
- **[GuavaPass](https://guavapass.com/)**: Coaching client of [ShakaCode](https://www.shakacode.com) and React on Rails fan!
2423
- **[Pivotal Tracker](http://www.pivotaltracker.com/)**: The first (and most-loved) agile project management tool built on Rails. React on Rails has greatly simplified integration and workflow for our React components in Rails!
2524
- **[Estately](https://www.estately.com)**: Home search.
2625
- **[Blink Inc](https://www.blinkinc.com)**: Website and more built by [ShakaCode](https://www.shakacode.com).

benchmarks/bench-node-renderer.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def read_protocol_version
2323

2424
def read_password_from_config
2525
config_path = File.expand_path(
26-
"../react_on_rails_pro/spec/dummy/client/node-renderer.js",
26+
"../react_on_rails_pro/spec/dummy/renderer/node-renderer.js",
2727
__dir__
2828
)
2929
config_content = File.read(config_path)

docs/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ React on Rails is one product with two tiers: open source for Rails + React inte
2222

2323
### Evaluating Rails + React options
2424

25-
- [Examples and migration references](https://reactonrails.com/examples)
25+
- [Example migrations](./oss/migrating/example-migrations.md) — curated migration references and proof criteria
26+
- [Examples gallery](https://reactonrails.com/examples) — reactonrails.com showcase apps
2627
- [Compare with alternatives](./oss/getting-started/comparing-react-on-rails-to-alternatives.md) — decision guide covering Hotwire, Inertia, Next.js, and more
2728
- [Migrate from react-rails](./oss/migrating/migrating-from-react-rails.md)
28-
- [Published migration example repo (Rails 7)](https://github.com/shakacode/react-on-rails-migration-example)
2929

3030
## Dive deeper when you need it
3131

docs/oss/api-reference/generator-details.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ can pass the redux option if you'd like to have redux setup for you automaticall
5050
Passing the --pro generator option sets up React on Rails Pro with Node
5151
server rendering, fragment caching, and code-splitting support.
5252
Requires the react_on_rails_pro gem (add it to your Gemfile first).
53-
Creates the Pro initializer, node-renderer.js, and adds the Node Renderer
53+
Creates the Pro initializer, renderer/node-renderer.js, and adds the Node Renderer
5454
process to Procfile.dev.
5555
5656
* RSC (React Server Components)
@@ -215,7 +215,7 @@ rails generate react_on_rails:install --pro
215215
**What gets created:**
216216

217217
- `config/initializers/react_on_rails_pro.rb` - Pro configuration with Node Renderer settings
218-
- `client/node-renderer.js` - Node Renderer bootstrap file
218+
- `renderer/node-renderer.js` - Node Renderer bootstrap file
219219
- Node Renderer process added to `Procfile.dev`
220220
- Pro npm packages (`react-on-rails-pro`, `react-on-rails-pro-node-renderer`)
221221

docs/oss/api-reference/ruby-api-pro.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ Streams a server-rendered React component using React 18's `renderToPipeableStre
4747

4848
Requires the controller to use `stream_view_containing_react_components`.
4949

50-
Options: same as `react_component` plus:
50+
Options: same as `react_component`.
5151

52-
- `:immediate_hydration` (default: `true`) — controls hydration timing
52+
> **Note (Pro):** React on Rails Pro hydrates streamed components early (before `DOMContentLoaded`) automatically — no per-component toggle is exposed.
5353
5454
```ruby
5555
<%= stream_react_component("App", props: { data: @data }) %>

docs/oss/building-features/code-splitting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ in your webpack configuration. That turns off the polyfills for things like `__d
252252
253253
### Node Renderer
254254
255-
In your `node-renderer.js` file which runs node renderer, you need to specify `supportModules` options as follows:
255+
In your `renderer/node-renderer.js` file which runs node renderer, you need to specify `supportModules` options as follows:
256256
257257
```js
258258
const path = require('path');

docs/oss/building-features/node-renderer/basics.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ See the [Memory Leaks guide](../../../pro/js-memory-leaks.md) for common leak pa
2727

2828
**node-renderer** is a standalone Node application to serve React SSR requests from a **Rails** client. You don't need any **Ruby** code to setup and launch it. You can configure with the command line or with a launch file.
2929

30-
> **Generator shortcut:** Running `rails generate react_on_rails:install --pro` (or `rails generate react_on_rails:pro` for existing apps) automatically creates `client/node-renderer.js`, adds the Node Renderer process to `Procfile.dev`, and installs the required npm packages. See [Installation](../../../pro/installation.md) for details. The manual setup below is for apps that need custom configuration.
30+
> **Generator shortcut:** Running `rails generate react_on_rails:install --pro` (or `rails generate react_on_rails:pro` for existing apps) automatically creates `renderer/node-renderer.js`, adds the Node Renderer process to `Procfile.dev`, and installs the required npm packages. See [Installation](../../../pro/installation.md) for details. The manual setup below is for apps that need custom configuration.
3131
3232
## Simple Command Line for node-renderer
3333

@@ -65,7 +65,7 @@ For the most control over the setup, create a JavaScript file to start the NodeR
6565
# or: yarn add react-on-rails-pro-node-renderer
6666
# or: bun add react-on-rails-pro-node-renderer
6767
```
68-
4. Configure a JavaScript file that will launch the rendering server per the docs in [Node Renderer JavaScript Configuration](./js-configuration.md). For example, create a file `node-renderer.js`. Here is a simple example that uses all the defaults except for serverBundleCachePath:
68+
4. Configure a JavaScript file that will launch the rendering server per the docs in [Node Renderer JavaScript Configuration](./js-configuration.md). For example, create a file `renderer/node-renderer.js`. Here is a simple example that uses all the defaults except for serverBundleCachePath:
6969

7070
```javascript
7171
import path from 'path';
@@ -78,7 +78,7 @@ For the most control over the setup, create a JavaScript file to start the NodeR
7878
reactOnRailsProNodeRenderer(config);
7979
```
8080

81-
5. Now you can launch your renderer server with `node node-renderer.js`. You will probably add a script to your `package.json`.
81+
5. Now you can launch your renderer server with `node renderer/node-renderer.js`. You will probably add a script to your `package.json`.
8282
6. You can use a command line argument of `-p SOME_PORT` to override any configured or ENV value for the port.
8383

8484
## Setup Rails Application
@@ -157,13 +157,14 @@ The Node Renderer must be started as a background process before running tests.
157157
# .github/workflows/test.yml (GitHub Actions example)
158158
jobs:
159159
test:
160+
runs-on: ubuntu-latest
160161
env:
161162
# Job-level: both the renderer and Rails test steps need this
162163
RENDERER_PASSWORD: ${{ secrets.RENDERER_PASSWORD }}
163164
steps:
164165
- name: Start Node Renderer
165166
run: |
166-
node client/node-renderer.js &
167+
node renderer/node-renderer.js &
167168
# Wait for the renderer to be ready.
168169
# The renderer uses cleartext HTTP/2 (h2c), so use --http2-prior-knowledge for the probe.
169170
# --max-time 2 prevents hangs if the port is open but the process is stalled.

0 commit comments

Comments
 (0)