fix: regression in types for ProgressPlugin#21036
Conversation
|
|
This PR is packaged and the instant preview is available (d6cdebe). Install it locally:
npm i -D webpack@https://pkg.pr.new/webpack@d6cdebe
yarn add -D webpack@https://pkg.pr.new/webpack@d6cdebe
pnpm add -D webpack@https://pkg.pr.new/webpack@d6cdebe |
There was a problem hiding this comment.
Pull request overview
Fixes a TypeScript types regression for ProgressPlugin.createDefaultHandler by aligning the generated declaration with the actual optionality of the progressBar argument in the implementation.
Changes:
- Mark
ProgressPlugin.createDefaultHandler’sprogressBarparameter as optional in the generatedtypes.d.ts. - Update the JSDoc in
lib/ProgressPlugin.jsto express thatprogressBaris optional (false=), which drives the generated typings.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| types.d.ts | Updates the generated createDefaultHandler signature so progressBar is optional (progressBar?: ...). |
| lib/ProgressPlugin.js | Adjusts JSDoc to make progressBar optional, matching runtime behavior and enabling correct type generation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #21036 +/- ##
==========================================
- Coverage 91.58% 91.58% -0.01%
==========================================
Files 573 573
Lines 59555 59555
Branches 16084 16084
==========================================
- Hits 54542 54541 -1
- Misses 5013 5014 +1
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 not alter performance
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes
|
Summary
fix types regression for progress plugin
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
No