refactor: replace glob-to-regexp with watchpack globToRegExp#21176
Conversation
🦋 Changeset detectedLatest commit: 63e193f 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 (c5b0667). Install it locally:
npm i -D webpack@https://pkg.pr.new/webpack@c5b0667
yarn add -D webpack@https://pkg.pr.new/webpack@c5b0667
pnpm add -D webpack@https://pkg.pr.new/webpack@c5b0667 |
Merging this PR will degrade performance by 33.24%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | Memory | benchmark "side-effects-reexport", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' |
761.8 KB | 1,188.5 KB | -35.9% |
| ❌ | Memory | benchmark "many-chunks-esm", scenario '{"name":"mode-production","mode":"production"}' |
7.2 MB | 10.4 MB | -30.47% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing refactor-dep (63e193f) with main (0bf661b)
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #21176 +/- ##
==========================================
+ Coverage 92.60% 92.66% +0.06%
==========================================
Files 586 587 +1
Lines 63823 63961 +138
Branches 17691 17726 +35
==========================================
+ Hits 59101 59271 +170
+ Misses 4722 4690 -32
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
Drops the direct
glob-to-regexpdependency by reusingwatchpack'sutil.globToRegExp(exposed since watchpack 2.5.2, with the same globstar + extended semantics), shrinking webpack's dependency tree.What kind of change does this PR introduce?
refactor
Did you add tests for your changes?
No
Does this PR introduce a breaking change?
No
If relevant, what needs to be documented once your ce you already documented?
n/a
Use of AI
Yes