Skip to content

chore: remove obsolete webpack <5.106.0 pin#3175

Merged
ihabadham merged 2 commits intomainfrom
ihabadham/chore/remove-webpack-5.106-pin
Apr 19, 2026
Merged

chore: remove obsolete webpack <5.106.0 pin#3175
ihabadham merged 2 commits intomainfrom
ihabadham/chore/remove-webpack-5.106-pin

Conversation

@ihabadham
Copy link
Copy Markdown
Collaborator

@ihabadham ihabadham commented Apr 18, 2026

Summary

Webpack 5.106.1 (released 2026-04-10) shipped the upstream fix for the ExecJS SSR regression (ReferenceError: __WEBPACK_DEFAULT_EXPORT__ is not defined) that made us pin <5.106.0 in the first place. 5.106.2 followed on 2026-04-15. The pin is no longer needed.

Changes

This PR is two commits:

  1. Revert of fix: cap webpack <5.106.0 to prevent ExecJS SSR breakage #3095 — pure git revert, no edits. Removes:

    • package.json pnpm override "webpack": ">=5.76.0 <5.106.0"
    • Per-workspace pins in react_on_rails/spec/dummy/package.json, react_on_rails_pro/spec/dummy/package.json, and react_on_rails_pro/spec/execjs-compatible-dummy/package.json
    • The companion comments in root package.json
    • Reverts pnpm-lock.yaml to pre-fix: cap webpack <5.106.0 to prevent ExecJS SSR breakage #3095 state.
  2. Remove the rake-level pin added in Scaffold CI workflow and build scripts for first-run consistency #3097 — drops the pin_webpack_version method from react_on_rails/rakelib/shakapacker_examples.rake and its single call site in install_example_node_dependencies. Generated example apps will now install webpack 5.106.x uncapped. This is the pin Remove webpack <5.106.0 pin once 5.106.x SSR regression is fixed upstream #3166 was originally filed about.

References

Closes #3166.

Test plan

  • CI passes (gem-tests, package-js-tests, pro-integration-tests)
  • Example-app generation (via the rake task) installs webpack 5.106.x without the SSR regression

Summary by CodeRabbit

  • Chores
    • Removed webpack version pinning logic from build configuration helpers
    • Updated webpack dependencies across example and test environments with revised version constraints
    • Simplified pnpm override metadata by removing webpack-related override constraints and associated audit notes

ihabadham and others added 2 commits April 18, 2026 22:09
Webpack 5.106.1 (released 2026-04-10) ships the fix for the anonymous
default export regression that caused ReferenceError:
__WEBPACK_DEFAULT_EXPORT__ is not defined in ExecJS-based SSR
(webpack/webpack#20796). The pin added to shakapacker_examples.rake is
no longer needed — generated example apps will now install webpack
5.106.x uncapped.

The companion package.json / pnpm.override pins were removed in the
preceding revert commit.

Closes #3166.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 18, 2026

Walkthrough

This PR removes webpack version pinning previously applied across multiple configuration files and build logic to work around a known webpack 5.106.0 SSR regression. The pin has been removed from pnpm overrides, a rake helper method has been deleted, and version constraints have been updated in multiple package.json files.

Changes

Cohort / File(s) Summary
pnpm Configuration
package.json
Removed webpack override constraint ("webpack": ">=5.76.0 <5.106.0") from pnpm overrides block and deleted related advisory comments about the webpack SSR regression. Retained yaml override constraint.
Build Helper Removal
react_on_rails/rakelib/shakapacker_examples.rake
Deleted pin_webpack_version(dir) helper method and its invocation during install_example_node_dependencies(example_type). Eliminated all JSON parsing, error-handling, and conditional write logic associated with webpack pinning.
Example App Dependencies
react_on_rails/spec/dummy/package.json
Updated webpack devDependency from range constraint >=5.76.0 <5.106.0 to caret pinning ^5.104.1.
Pro Dummy App Dependencies
react_on_rails_pro/spec/dummy/package.json, react_on_rails_pro/spec/execjs-compatible-dummy/package.json
Updated webpack version constraints from range >=5.76.0 <5.106.0 to major version spec 5, allowing any compatible webpack v5.x release.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A webpack pin is finally free,
No more constraints on 5.106!
The SSR regression is gone, hooray—
Our builds hop forward, brighter day.
package.json sings with glee,
Simplicity restored, at last we're spree! 🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore: remove obsolete webpack <5.106.0 pin' accurately and concisely describes the main change—removing the temporary webpack version constraint that is no longer needed after upstream fixes.
Linked Issues check ✅ Passed The PR fully addresses linked issue #3166 by removing the webpack pin from both the rake file and package.json files, and verifies the upstream fix from #20796 (webpack 5.106.1+) that resolved the SSR regression.
Out of Scope Changes check ✅ Passed All changes are directly scoped to removing the webpack <5.106.0 pin constraints and related code, with no unrelated modifications introduced.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ihabadham/chore/remove-webpack-5.106-pin

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
react-on-rails/client bundled (gzip) 62.76 KB (0%)
react-on-rails/client bundled (gzip) (time) 62.76 KB (0%)
react-on-rails/client bundled (brotli) 53.86 KB (0%)
react-on-rails/client bundled (brotli) (time) 53.86 KB (0%)
react-on-rails-pro/client bundled (gzip) 63.71 KB (0%)
react-on-rails-pro/client bundled (gzip) (time) 63.71 KB (0%)
react-on-rails-pro/client bundled (brotli) 54.63 KB (0%)
react-on-rails-pro/client bundled (brotli) (time) 54.63 KB (0%)
registerServerComponent/client bundled (gzip) 127.53 KB (0%)
registerServerComponent/client bundled (gzip) (time) 127.53 KB (0%)
registerServerComponent/client bundled (brotli) 61.7 KB (0%)
registerServerComponent/client bundled (brotli) (time) 61.7 KB (0%)
wrapServerComponentRenderer/client bundled (gzip) 122.02 KB (0%)
wrapServerComponentRenderer/client bundled (gzip) (time) 122.02 KB (0%)
wrapServerComponentRenderer/client bundled (brotli) 56.68 KB (-0.11% 🔽)
wrapServerComponentRenderer/client bundled (brotli) (time) 56.73 KB (0%)

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 18, 2026

Greptile Summary

This PR removes the temporary webpack <5.106.0 version pin added in #3095, now that webpack 5.106.1 (released 2026-04-10) ships the upstream fix for the ExecJS SSR regression (ReferenceError: __WEBPACK_DEFAULT_EXPORT__ is not defined). It consists of a clean git revert of the per-workspace package.json and pnpm-lock.yaml pins, plus a targeted removal of the pin_webpack_version helper and its call site from shakapacker_examples.rake.

Confidence Score: 5/5

Safe to merge — changes are a clean revert of a temporary workaround, with the upstream fix confirmed shipped in webpack 5.106.1.

All six files contain only the removal of the webpack upper-bound pin and its companion comments/helpers. No new logic is introduced, no security surface changes, and the upstream regression that motivated the pin is resolved. All remaining webpack specifiers (^5.104.1, "5") resolve correctly to 5.106.x.

No files require special attention.

Important Files Changed

Filename Overview
package.json Removes pnpm override "webpack": ">=5.76.0 <5.106.0" and its two companion comments — clean and correct
react_on_rails/rakelib/shakapacker_examples.rake Removes the pin_webpack_version helper method and its call in install_example_node_dependencies; generated example apps will now install webpack 5.106.x uncapped
react_on_rails/spec/dummy/package.json Restores webpack to ^5.104.1 (its pre-#3095 value) from the constrained >=5.76.0 <5.106.0 range; will resolve to 5.106.x
react_on_rails_pro/spec/dummy/package.json Restores webpack to "5" (its pre-#3095 value), resolves to latest webpack 5.x including 5.106.x
react_on_rails_pro/spec/execjs-compatible-dummy/package.json Restores webpack to "5" in the ExecJS-compatible dummy; relies on the 5.106.1 bug fix being present in the resolved version
pnpm-lock.yaml Regenerated lock file reflecting removal of the webpack upper-bound overrides; correct outcome of the revert

Reviews (1): Last reviewed commit: "chore: remove now-obsolete webpack 5.106..." | Re-trigger Greptile

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
react_on_rails/spec/dummy/package.json (1)

61-61: Align the dummy app webpack specifiers.

Line 61 uses ^5.104.1, while the Pro dummy manifests in this PR use 5. For consistency across spec/dummy manifests and to avoid version conflicts, align this specifier:

-    "webpack": "^5.104.1",
+    "webpack": "5",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@react_on_rails/spec/dummy/package.json` at line 61, Update the webpack
dependency specifier in the dummy app package.json so it matches the Pro dummy
manifests: change the "webpack" entry currently set to "^5.104.1" to use the
simplified "5" specifier (i.e., replace the value for the "webpack" key in
package.json).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@react_on_rails/spec/dummy/package.json`:
- Line 61: Update the webpack dependency specifier in the dummy app package.json
so it matches the Pro dummy manifests: change the "webpack" entry currently set
to "^5.104.1" to use the simplified "5" specifier (i.e., replace the value for
the "webpack" key in package.json).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ddd41c3b-9016-4d2e-a6f6-10ba1e81ba89

📥 Commits

Reviewing files that changed from the base of the PR and between c4d8687 and c6738b3.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (5)
  • package.json
  • react_on_rails/rakelib/shakapacker_examples.rake
  • react_on_rails/spec/dummy/package.json
  • react_on_rails_pro/spec/dummy/package.json
  • react_on_rails_pro/spec/execjs-compatible-dummy/package.json
💤 Files with no reviewable changes (1)
  • react_on_rails/rakelib/shakapacker_examples.rake

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Apr 18, 2026

Code Review: PR 3175 - Remove obsolete webpack pin. Overview: Clean two-commit structure. Key concern: lockfile resolves to 5.104.1/5.105.2 not 5.106.x - pre-fix versions - so CI never exercises the upstream fix. Inconsistent specifiers: react_on_rails/spec/dummy uses caret-5.104.1 while pro dummies use major-5. Rake removal is clean.

Comment thread react_on_rails/spec/dummy/package.json
Comment thread react_on_rails_pro/spec/dummy/package.json
Comment thread react_on_rails_pro/spec/execjs-compatible-dummy/package.json
@ihabadham
Copy link
Copy Markdown
Collaborator Author

Consolidated response to the summary-level review comments (claude[bot], coderabbit nitpick, greptile-apps).

On the "lockfile doesn't reach 5.106.x" concern (claude[bot] PR summary + inline threads on react_on_rails_pro/spec/dummy/package.json:72 and react_on_rails_pro/spec/execjs-compatible-dummy/package.json:36): empirically validated via this PR's own CI run. The examples (3.4, latest) job installed webpack 5.106.2 in rake-generated example apps and compiled successfully multiple times (webpack 5.106.2 compiled successfully in 1373 ms ×4 in the log). The rake-generated apps use npm install in fresh directories with no lockfile, so they resolve each install to the latest matching semver — meaning the upstream fix IS being exercised on the exact path that originally broke at 5.106.0. Monorepo workspaces staying on pre-regression 5.104.1/5.105.2 isn't a correctness issue because those versions predate the bug entirely (regression was introduced at 5.106.0, fixed at 5.106.1, so anything below 5.106.0 is safe). Not doing a monorepo-wide pnpm update webpack --recursive in this PR; that can happen as normal maintenance.

On specifier alignment ^5.104.1 vs "5" (coderabbit nitpick + claude[bot] inline on react_on_rails/spec/dummy/package.json:61): deferring. This codebase routinely carries 6–8 distinct versions of common packages (commander, whatwg-url, find-up, schema-utils, jsdom, etc.) in the lockfile without issue. pnpm.overrides in this repo are explicitly reserved for security caps per the comment block in root package.json ("Generated via pnpm audit --fix, with manual caps added to prevent major version jumps"). Unification-for-consistency isn't a stated convention here; pnpm is also philosophically fine with multi-version. Not a merge blocker.

On greptile-apps' "all specifiers resolve correctly to 5.106.x": factually incorrect — verified via pnpm list webpack --recursive, workspaces resolve to 5.104.1 / 5.105.2, not 5.106.x. The merge-safe conclusion greptile landed on is coincidentally correct, but via a different path than it analyzed (the fix is exercised via rake-gen CI, not via monorepo lockfile). Flagging here so future review scans don't cite the 5/5 confidence score uncritically.

@ihabadham
Copy link
Copy Markdown
Collaborator Author

Address-review summary

Scan scope: full PR history (first /address-review run on this PR; no prior summary cutoff).

Mattered

  • Lockfile coverage of the upstream fix (claude[bot] PR summary + inline threads on react_on_rails_pro/spec/dummy/package.json:72 and react_on_rails_pro/spec/execjs-compatible-dummy/package.json:36): Deferred with rationale. Empirically validated via the examples (3.4, latest) CI job on this PR — webpack 5.106.2 compiled successfully ×4 in rake-generated example apps. Monorepo workspaces staying on pre-regression 5.105.2/5.104.1 is safe (bug introduced at 5.106.0, fixed at 5.106.1; anything below is unaffected). Threads resolved.

Optional

  • Specifier alignment ^5.104.1 vs "5" on react_on_rails/spec/dummy/package.json:61 (coderabbit nitpick + claude[bot] inline): Declined with rationale. Codebase norm is multi-version coexistence (lockfile currently carries 6–8 versions of commander, whatwg-url, find-up, schema-utils, jsdom, etc.); pnpm.overrides here are reserved for security caps per the existing comment block in root package.json. Thread resolved.

Skipped

  • greptile-apps summary "all specifiers resolve correctly to 5.106.x": Factually incorrect (verified via pnpm list webpack --recursive: workspaces resolve to 5.104.1 / 5.105.2). Merge-safe conclusion is coincidentally right but reached via a mechanism greptile didn't analyze. Flagged in the consolidated response comment so future scans don't cite the 5/5 confidence score uncritically.
  • coderabbitai walkthrough / github-actions size-limit / coderabbitai APPROVED + empty claude[bot] review containers: Bot boilerplate and status posts. No action.

Next default scan starts after this comment. Say check all reviews to rescan the full PR.

@ihabadham ihabadham merged commit 5c56db0 into main Apr 19, 2026
52 checks passed
@ihabadham ihabadham deleted the ihabadham/chore/remove-webpack-5.106-pin branch April 19, 2026 04:22
justin808 added a commit that referenced this pull request Apr 23, 2026
…ons-docs

* origin/main:
  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)
  docs: remove fabricated DevConsole reference, link verified RSC tools (#2527) (#3163)

# Conflicts:
#	docs/oss/building-features/node-renderer/js-configuration.md
justin808 added a commit that referenced this pull request Apr 23, 2026
…ging' into jg/3122-rolling-deploy-adapter

* origin/jg/3122-unify-renderer-cache-staging: (39 commits)
  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)
  docs: remove fabricated DevConsole reference, link verified RSC tools (#2527) (#3163)
  Scaffold CI workflow and build scripts for first-run consistency (#3097)
  Add OPTIONAL triage tier and fix recommendations to /address-review (#3161)
  chore: sync Gemfile.lock with term-ansicolor 1.11.3 (#3164)
  Simplify the docs sidebar and Pro landing pages (#3119)
  ...
justin808 added a commit that referenced this pull request Apr 23, 2026
* 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
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.

Remove webpack <5.106.0 pin once 5.106.x SSR regression is fixed upstream

1 participant