Update Rspack v2 dev-server defaults - #1179
Conversation
|
Warning Review limit reached
Next review available in: 11 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (8)
WalkthroughRspack support is restricted to v2 only ( ChangesRspack v2-only upgrade
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related issues
Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR moves Rspack support to the v2-only stack. The main changes are:
Confidence Score: 5/5This looks safe to merge after small diagnostic and dependency-hardening cleanups.
lib/shakapacker/doctor.rb and lib/shakapacker/bundler_switcher.rb Important Files Changed
Reviews (1): Last reviewed commit: "Update Rspack v2 dev-server defaults" | Re-trigger Greptile |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/blog/2026-05-10-shakapacker-10-1-supplemental-packages.md`:
- Line 16: Update the “optional peers” wording in the blog post so it no longer
lists `@rspack/dev-server` as opt-in; the earlier supplemental-packages section
already makes it required. Adjust the later paragraph that describes optional
peers to match the behavior of shakapacker-rspack, keeping the wording
consistent with the supplemental package list and the mention of
shakapacker-webpack.
In `@lib/shakapacker/doctor.rb`:
- Around line 979-985: The version check in rspack_major_version_for currently
prefers installed_rspack_major_version over the declared
package_json_dependency_version, which can mask unsupported package.json ranges
when node_modules is newer. Update the doctor logic so the diagnostic validates
both sources independently: keep using rspack_major_from_specifier for the
declared dependency and installed_rspack_major_version for the resolved install,
and ensure the check fails if either one maps to an unsupported major. Apply the
same behavior to the related helper path in the 1025-1030 logic so `@rspack/cli`
and rspack-manifest-plugin do not pass just because the local install is newer.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 1669ef8b-9465-4480-82bc-19af3b49c7b8
⛔ Files ignored due to path filters (3)
spec/dummy/package-lock.jsonis excluded by!**/package-lock.jsonspec/dummy/yarn.lockis excluded by!**/yarn.lock,!**/*.lockyarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (32)
CHANGELOG.mdRakefiledocs/blog/2026-05-10-shakapacker-10-1-supplemental-packages.mddocs/common-upgrades.mddocs/dependency-strategy.mddocs/installation.mddocs/migration/v10.1-supplemental-packages.mddocs/optional-peer-dependencies.mddocs/peer-dependencies.mddocs/rspack.mddocs/rspack_migration_guide.mdlib/install/package.jsonlib/install/template.rblib/shakapacker/bundler_switcher.rblib/shakapacker/doctor.rbpackage.jsonpackage/environments/development.tspackages/shakapacker-rspack/README.mdpackages/shakapacker-rspack/package.jsonspec/dummy/README.mdspec/dummy/package.jsonspec/generator_specs/e2e_template/template.rbspec/shakapacker/bundler_switcher_spec.rbspec/shakapacker/dev_server_runner_spec.rbspec/shakapacker/doctor_optional_peer_spec.rbspec/shakapacker/doctor_spec.rbspec/shakapacker/optional_dependencies_spec.rbspec/shakapacker/rake_tasks_spec.rbtest/package/environments/development-rspack-react-refresh.test.jstest/package/rspack/index.test.jstest/packages/install-smoke.test.jstest/packages/package-metadata.test.js
78cf7a6 to
d243f45
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d243f458fb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Code ReviewThis PR updates Rspack support to target v2 only, adds Two issues found: 1. Bug —
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 74f4ed42b7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Review: Update Rspack v2 dev-server defaultsThis PR targets Rspack v2 exclusively: it bumps all Two issues worth addressing: 1.
|
249b4c9 to
20bff84
Compare
Code ReviewThis PR makes a well-structured upgrade to Rspack v2 support: drops v1 compatibility, sets lazyCompilation: false for dev-server configs, adds @rspack/dev-server to the required stack, tightens the doctor checks, and drops legacy React Refresh export-shape fallbacks. The package_names helper that strips version suffixes for removal/display is correctly applied at every call site. Test coverage is thorough. Three findings survived verification, ranked by severity: 1. Doctor requires @rspack/dev-server declared for ALL rspack setups — including production-only apps check_rspack_peer_deps lists @rspack/dev-server in essential_rspack with no guard for whether the dev server is actually in use. Any app whose package.json does not explicitly declare @rspack/dev-server in some section will get: 'Missing essential rspack dependency: @rspack/dev-server (^2.0.0)'. Two affected populations: (a) Production/CI-only rspack apps that only run rake assets:precompile — @rspack/dev-server arrives as a transitive dep of @rspack/cli@^2.0.0 but is not declared, so the doctor warns. (b) npm 7+ supplemental-package users whose app package.json contains only shakapacker-rspack — the peers are auto-installed into node_modules but not declared in the app manifest. Inline comment on the specific line below. 2. package_version_below? uses any? on [declared_floor, installed] — generates false positives package_version_from_specifier('^5.0.0') returns Gem::Version('5.0.0') (the range floor). The check [Gem::Version('5.0.0'), Gem::Version('5.3.0')].any? { |v| v < Gem::Version('5.2.2') } returns true even though 5.3.0 satisfies the requirement. So an app declaring rspack-manifest-plugin ^5.0.0 with 5.3.0 installed receives 'Unsupported rspack-manifest-plugin version' even though its runtime is fine. Consider using only the installed version when available, or change the error text to 'declared range floor is stale' rather than 'Unsupported version'. Inline comment on the specific line below. 3. Comment above DEFAULT_RSPACK_DEPS is now incorrect The comment says 'package names only, no versions' but the constant now holds version-decorated strings like @rspack/cli@^2.0.0. Inline comment below. |
20bff84 to
78c16fb
Compare
Review: Update Rspack v2 dev-server defaultsThis PR upgrades Rspack support to v2-only, makes 1.
|
Review — Update Rspack v2 dev-server defaultsThis PR migrates Shakapacker's Rspack support to v2-only, adds 1.
|
Review SummaryThis PR updates Shakapacker's Rspack support to v2-only: it tightens installer package ranges, adds Bugs
Smaller issues
|
f5232c1 to
9618b51
Compare
Review: Update Rspack v2 dev-server defaultsThis PR updates Shakapacker's Rspack support to v2-only, sets Four things worth addressing before merge: 1. css-loader floor bump in 2. 3. 4. |
9618b51 to
75b1877
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 75b1877f45
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
75b1877 to
4b833df
Compare
## Summary Stamps the **`v10.2.0`** release section in `CHANGELOG.md` and adds the user-visible entries that were still missing for PRs merged since `v10.1.0`. Header format matches the repo convention (`## [v10.2.0] - July 3, 2026`) and is parseable by `rakelib/release.rake`'s `extract_changelog_section` (`## [v<npm-version>]`), so `bundle exec rake release` / `sync_github_release` will pick up the notes automatically. ### Changelog changes - **Version header**: inserted `## [v10.2.0] - July 3, 2026` immediately after `## [Unreleased]`; all accumulated entries now live under it, and `## [Unreleased]` is empty. - **Compare links**: `[unreleased]` now compares `v10.2.0...main`; added `[v10.2.0]: …/compare/v10.1.0...v10.2.0`. ### New entries added (were missing) | PR | Section | Note | | --- | --- | --- | | [#1187](#1187) | Added | Babel 8 peer dependency support + preset option compatibility | | [#1184](#1184) | Added | Folded into the #695 AI-prompt entry (gates the React on Rails section on app detection) | | [#1142](#1142) | Fixed | Rspack dev-server config no longer loads in static watch mode (fixes #1137) | ### Already documented (carried into v10.2.0) `#1180`, `#695`, `#1141`, `#1150`, `#1179`, `#1192`, `#1127`, `#1178`, `#1161`, `#1147`. ### Reviewed and intentionally excluded (not user-visible) Docs: `#1145`, `#1148`, `#1152`, `#1155`, `#1183`, `#1188`, `#1189`, `#1193`. CI: `#1151`, `#1168`, `#1171`. Tests / fixtures: `#1128`, `#1154`, `#1167`, `#1186`. Workflow / agent tooling: `#1153`, `#1176`, `#1182`. (`#1107` is already documented under `## [v10.1.0]`.) ## Next step After merge, run the repo's release task (no args) — it reads `v10.2.0` from the changelog and creates the GitHub release from this section. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Summary
Before / After
#984 / default preservation evidence
Test plan
Refs #984.
Summary by CodeRabbit
New Features
lazyCompilation: falseduring development, while still allowing custom overrides.Bug Fixes
Documentation