fix: preserve using declaration initializers in inner graph#20906
Conversation
🦋 Changeset detectedLatest commit: cc586b2 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 (c2639e1). Install it locally:
npm i -D webpack@https://pkg.pr.new/webpack@c2639e1
yarn add -D webpack@https://pkg.pr.new/webpack@c2639e1
pnpm add -D webpack@https://pkg.pr.new/webpack@c2639e1 |
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your changes status has failed because you have indirect coverage changes. Learn more about Unexpected Coverage Changes and reasons for indirect coverage changes. Additional details and impacted files@@ Coverage Diff @@
## main #20906 +/- ##
==========================================
+ Coverage 82.87% 91.32% +8.45%
==========================================
Files 529 562 +33
Lines 53795 55663 +1868
Branches 14193 14720 +527
==========================================
+ Hits 44581 50833 +6252
+ Misses 9214 4830 -4384
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 67.83%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ⚡ | Memory | benchmark "devtool-eval-source-map", scenario '{"name":"mode-development","mode":"development"}' |
1,404.4 KB | 833 KB | +68.6% |
| ❌ | Memory | benchmark "asset-modules-source", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' |
159.5 KB | 368.8 KB | -56.76% |
| ❌ | Memory | benchmark "devtool-eval", scenario '{"name":"mode-development","mode":"development"}' |
595.4 KB | 1,146.3 KB | -48.06% |
| ❌ | Memory | benchmark "devtool-eval-source-map", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' |
276 KB | 857.7 KB | -67.83% |
| ❌ | Memory | benchmark "asset-modules-inline", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' |
219.3 KB | 681.5 KB | -67.82% |
Comparing pure-decl-using (cc586b2) with main (25f937c)
Summary
What kind of change does this PR introduce?
We should consider
usingdeclarations as side effect statement in the inner graph so their initializers are not replaced with null expressions.Error output:
Expected output:
Did you add tests for your changes?
Existing test262 spec test.
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?
No
Use of AI
Partial