Repository navigation
[heft-web-rig] Upgrade webpack 5 to ~5.112.0 - #6180
Draft
Ian Clanton-Thuon (iclanton) wants to merge 2 commits into
Draft
Ian Clanton-Thuon (iclanton) wants to merge 2 commits into
Ian Clanton-Thuon (iclanton) wants to merge 2 commits into
Conversation
Align webpack 5 development and rig pins with the peer requirement introduced by schema-utils 4.8.1. Preserve webpack 4 and the older local-version fixture, adapt localization filename types, preserve license metadata test coverage under export inlining, and refresh generated webpack output snapshots. Keep source-map regression assertions intact. The upgrade remains blocked on a published webpack release containing webpack/webpack#22941.
…dent The new webpack default minimizer salts chunk hashes with its implementation path relative to the virtual compilation context. Linux and Windows CI therefore receive different hashes despite equivalent minified JavaScript. Select the existing repository-standard Terser plugin explicitly in the test helper and regenerate the affected snapshots. Verified all 20 localization tests in production mode without updating snapshots, and verified identical emitted names and code across two virtual checkout contexts. Keep source-map behavior assertions unchanged.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Update the coordinated webpack 5 pins from
~5.105.2to~5.112.0, including@rushstack/heft-web-rig. This addresses installs whereschema-utils@4.8.1resolves transitively and requires the webpack^5.112.0peer range.Draft / release blocker: published webpack still has the source-map
filehash regression described in webpack/webpack#22939. The fix is merged in webpack/webpack#22941 but is not in the latest npm release (5.112.2). The regression reproduces with plain webpack, without Rushstack plugins, on both5.112.0and5.112.2. Keep this draft until a fixed webpack release can be selected; existing source-map assertions remain unchanged.Details
~5.105.0).How it was tested
Node
24.22.1on Linux.rush check,rush update --bypass-policy, frozenrush install --bypass-policy,rush change --verify --target-branch microsoft/main --no-fetch, and the repository formatter pass.5.112.0and schema-utils4.8.1.SourceMapTestfilename/file checks inheft-webpack5-everything-test, and thesourceMap=trueruntime test inwebpack5-module-minifier-plugin. The final affected production graph was rerun on commit1aa7f65f41: only these four source-map assertions and an SDK install-run stdout snapshot under the isolated HOME failed. The SDK suite was then rerun under the normal HOME and passed all six tests. Rush-core passed separately under the isolated HOME (1,924 passed, two skipped), so the environment-sensitive suites were verified separately rather than changing snapshots for local paths. No source-map assertion was changed, skipped, or relaxed.No documentation changes are required. Implementation and test investigation were AI-assisted.
Snapshot portability follow-up
Updated in
f6841959ef.The first CI run reported seven failing minified localization snapshots on Linux and Windows. The new webpack default minimizer includes its implementation-module path relative to the virtual compilation context in the chunk hash. Since these fixtures use a virtual root context, the checkout location changes expected hashes even when the visible minified JavaScript is equivalent.
The test-only MemFSPlugin now explicitly selects terser-webpack-plugin using the repository-standard ~5.3.1 range and the same compression passes, rather than inheriting the path-sensitive default. Regenerated the seven affected snapshot files through Jest; no snapshot assertions were weakened or normalized away.
Validation: production build, ESLint, TypeScript, and API Extractor pass; all 20 localization tests pass in production/CI mode without snapshot updates. A separate two-context compilation check confirms the old default produces different output names, while the updated harness emits identical names and code. rush check, change-file verification, and the repository formatter pass.
The separate upstream source-map release blocker remains unchanged. This PR remains a draft pending that fix; source-map behavior assertions were not edited.