Commit adb5067
Pin Pro react-on-rails-rsc peer to an explicit ^19.0.5 range (#4082)
## Why
`packages/react-on-rails-pro/package.json` declared the optional peer
`"react-on-rails-rsc": "*"`. The wildcard accepts **any** version —
including pre-`19.0.5` builds that lack the RSC CSS FOUC fix, and a
future major (`20.x`) — and, because semver `*` never matches
prereleases, RC rollouts already require explicit overrides. So `*`
provided no convenience while admitting known-bad floors.
This replaces `"*"` with an explicit `^19.0.5` (= `>=19.0.5 <20.0.0`):
- **Floor `19.0.5`** — the RSC CSS FOUC fix requirement (the stable pin
landed in #3634), so pre-FOUC builds are excluded.
- **Ceiling `<20.0.0`** — a new `react-on-rails-rsc` major is a
deliberate, reviewed bump rather than silently accepted.
- Within the `19.x` line (`19.0.x`, `19.2.x`, …), the **actual
per-version compatibility gate is the Pro node-renderer runtime version
check** (`rscPeerSupport.ts`, which tiers rsc `19.0.x`↔react `19.0.4+`
and rsc `19.2.x`↔react `19.2.7+`), not this advisory optional peer
range. `^19.0.5` intentionally admits the supported `19.2.x` line so the
React 19.2 path isn't blocked by a peer warning.
## No regression to the React 19.2 soak
The in-repo Pro/RSC dummy resolves `react-on-rails-rsc@19.2.0-rc.1` (a
prerelease) via a direct dependency + pnpm override. Both `"*"` and
`^19.0.5` exclude prereleases by semver, so resolution is unchanged:
`pnpm install` produces **zero** `react-on-rails-rsc` peer warnings
before and after, and `pnpm-lock.yaml` is byte-identical (md5
unchanged).
## Changes
- `packages/react-on-rails-pro/package.json`: peer `react-on-rails-rsc`
`"*"` → `"^19.0.5"` (stays `optional`; devDependency untouched).
- `docs/pro/react-server-components/upgrading-existing-pro-app.md`: note
documenting the floor/ceiling meaning and that the runtime version check
is the real per-version gate. `llms-full-pro.txt` regenerated to match.
- `CHANGELOG.md`: `[Unreleased]` entry.
## Validation (local, all green)
- `pnpm run type-check`, `pnpm run lint`, `prettier --check`,
`script/check-docs-sidebar`: clean.
- Lockfile unchanged; no new peer warnings vs the `"*"` baseline.
## Notes
- Builds on #3634 (stable `19.0.5` pin). Will be rebased onto merged
#3634 (which flips the install docs from `19.0.5-rc.7` to stable
`19.0.5`, so the doc install version matches this `^19.0.5` floor).
Fixes #3965
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Low Risk**
> Metadata and documentation only; optional peer range is advisory and
does not change runtime RSC rendering logic.
>
> **Overview**
> Replaces the Pro package’s optional `react-on-rails-rsc` peer
dependency from `"*"` with **`^19.0.5`** (`>= 19.0.5 < 20.0.0`), so
npm/pnpm installs are advised against pre-FOUC `19.x` builds and against
an unreviewed `20.x` major while still allowing supported `19.1+` /
`19.2.x` within the line.
>
> RSC upgrade docs (and regenerated `llms-full-pro.txt`) now separate
the **generator’s exact `19.0.5` app pin** from this **broader Pro peer
range**, and note that **`rscPeerSupport.ts` runtime checks** remain the
real per-version gate. **`CHANGELOG.md`** records the change under
`[Unreleased]`.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
09a5c25. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Changed**
* Updated the Pro package’s optional React Server Components peer
dependency from `"*"` to `^19.0.5` (advisory `>= 19.0.5 < 20.0.0`).
* **Documentation**
* Clarified the reason and expected behavior of the new peer range,
including the `19.0.5` minimum, the ceiling before `20.0.0`, and that
actual per-Version compatibility is verified through runtime checks
rather than the peer range alone.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent f66fc1f commit adb5067
4 files changed
Lines changed: 12 additions & 1 deletion
File tree
- docs/pro/react-server-components
- packages/react-on-rails-pro
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
39 | 44 | | |
40 | 45 | | |
41 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7953 | 7953 | | |
7954 | 7954 | | |
7955 | 7955 | | |
| 7956 | + | |
| 7957 | + | |
| 7958 | + | |
| 7959 | + | |
| 7960 | + | |
7956 | 7961 | | |
7957 | 7962 | | |
7958 | 7963 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| |||
0 commit comments