Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document webpack change: deprecate stats.warningsFilter in favor of ignoreWarnings #3995

Closed
webpack-bot opened this issue Sep 20, 2020 · 6 comments · Fixed by #4027
Closed

Comments

@webpack-bot
Copy link

A pull request by @sokra was merged and maintainers requested a documentation change.

See pull request: webpack/webpack#11506


improve warnings and errors handling in stats
respect warningsFilter for warnings count
include child compilation warnings and errors in count
show hint for child compilation errors and warnings
add config.ignoreWarnings
deprecate stats.warningsFilter

What kind of change does this PR introduce?
refactoring

Did you add tests for your changes?
yes

Does this PR introduce a breaking change?
no, only deprecation

What needs to be documented once your changes are merged?

  • stats.warningsFilter is deprecated
  • ignoreWarnings is the new option
    • RegExp
    • {module?: RegExp, file?: RegExp, message?: RegExp}
    • function(WebpackError, Compilation): boolean
@snitin315
Copy link
Member

Taking on this.

@u01jmg3
Copy link
Contributor

u01jmg3 commented Oct 17, 2020

@snitin315, @EugeneHlushko: is this correct? Shouldn't it be documented as ignoreWarnings and not stats.ignoreWarnings?

Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
 - configuration.stats has an unknown property 'ignoreWarnings'. These properties are valid:
   object { all?, assets?, assetsSort?, assetsSpace?, builtAt?, cached?, cachedAssets?, cachedModules?, children?, chunkGroupAuxiliary?, chunkGroupChildren?, chunkGroupMaxAssets?, chunkGroups?, chunkModules?, chunkOrigins?, chunkRelations?, chunks?, chunksSort?, colors?, context?, dependentModules?, depth?, entrypoints?, env?, errorDetails?, errorStack?, errors?, errorsCount?, exclude?, excludeAssets?, excludeModules?, groupAssetsByChunk?, groupAssetsByEmitStatus?, groupAssetsByExtension?, groupAssetsByInfo?, groupAssetsByPath?, groupModulesByAttributes?, groupModulesByCacheStatus?, groupModulesByExtension?, groupModulesByPath?, hash?, ids?, logging?, loggingDebug?, loggingTrace?, moduleAssets?, moduleTrace?, modules?, modulesSort?, modulesSpace?, nestedModules?, optimizationBailout?, orphanModules?, outputPath?, performance?, preset?, providedExports?, publicPath?, reasons?, relatedAssets?, runtimeModules?, source?, timings?, usedExports?, version?, warnings?, warningsCount?, warningsFilter? }
   -> Stats options object.

@snitin315
Copy link
Member

snitin315 commented Oct 17, 2020

Yes, Indeed. My bad 😞, It should be ignoreWarnings. Can you send a PR fixing it ?

@u01jmg3
Copy link
Contributor

u01jmg3 commented Oct 17, 2020

I can do but what file should this documentation live in? Currently it's in stats.md but this is no longer correct for the ignoreWarnings option.

@snitin315
Copy link
Member

I think other-options.md will be appropriate.

@u01jmg3
Copy link
Contributor

u01jmg3 commented Oct 17, 2020

@snitin315: see #4076

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants