fix: include missing generator options in updateHash for persistent cache correctness#20821
Conversation
🦋 Changeset detectedLatest commit: 95548fb The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
This PR is packaged and the instant preview is available (3f5fe0d). Install it locally:
npm i -D webpack@https://pkg.pr.new/webpack@3f5fe0d
yarn add -D webpack@https://pkg.pr.new/webpack@3f5fe0d
pnpm add -D webpack@https://pkg.pr.new/webpack@3f5fe0d |
Codecov Report❌ Patch coverage is
❌ Your patch status has failed because the patch coverage (57.14%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #20821 +/- ##
==========================================
- Coverage 91.40% 91.40% -0.01%
==========================================
Files 561 561
Lines 55359 55366 +7
Branches 14610 14612 +2
==========================================
+ Hits 50603 50607 +4
- Misses 4756 4759 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Merging this PR will degrade performance by 25.83%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | Memory | benchmark "css-modules", scenario '{"name":"mode-production","mode":"production"}' |
7 MB | 9.5 MB | -25.83% |
| ⚡ | Memory | benchmark "lodash", scenario '{"name":"mode-development","mode":"development"}' |
5.3 MB | 4.1 MB | +28.49% |
Comparing fix/generator-updatehash-completeness (95548fb) with main (9211be0)
1392fec to
7a3c40b
Compare
…ache correctness CssGenerator was missing `exportsOnly`, JsonGenerator was missing `JSONParse`, and WebAssemblyGenerator was missing `mangleImports` in their updateHash methods. This could cause stale cached code generation results when these options change between builds with filesystem cache.
7a3c40b to
95548fb
Compare
Summary
Fixes #20801 (review)
CssGenerator was missing
exportsOnly, JsonGenerator was missingJSONParse, and WebAssemblyGenerator was missingmangleImportsin their updateHash methods. This could cause stale cached code generation results when these options change between builds with filesystem cache.What kind of change does this PR introduce?
fix
Did you add tests for your changes?
Existing
Does this PR introduce a breaking change?
No
If relevant, what needs to be documented once your changes are merged or what have you already documented?
Nothing
Use of AI
Partial