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

fix(gatsby): infer shape of warning object #31489

Merged
merged 5 commits into from
Jun 14, 2021
Merged

Conversation

KyleAMathews
Copy link
Contributor

Different parts of webpack seem to be emitting warnings in different shapes. They were all strings it seems in v4 and then became objects in webpack 5 but only mostly? Not really sure. But
this PR tries to just infer the different shapes warnings can come in and handle them.

fixes #31474

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label May 19, 2021
vladar
vladar previously requested changes May 21, 2021
Copy link
Contributor

@vladar vladar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to account for a case when the warnings array is empty.

packages/gatsby/src/utils/webpack-error-utils.ts Outdated Show resolved Hide resolved
packages/gatsby/src/utils/webpack-error-utils.ts Outdated Show resolved Hide resolved
@vladar vladar added topic: webpack/babel Webpack or babel and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels May 21, 2021
@LekoArts LekoArts merged commit 96dc88a into master Jun 14, 2021
@LekoArts LekoArts deleted the handle-string-warnings branch June 14, 2021 07:22
vladar pushed a commit that referenced this pull request Jun 15, 2021
Co-authored-by: Vladimir Razuvaev <[email protected]>
Co-authored-by: gatsbybot <[email protected]>
(cherry picked from commit 96dc88a)
vladar pushed a commit that referenced this pull request Jun 15, 2021
Co-authored-by: Vladimir Razuvaev <[email protected]>
Co-authored-by: gatsbybot <[email protected]>
(cherry picked from commit 96dc88a)

Co-authored-by: Kyle Mathews <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: webpack/babel Webpack or babel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect reportWebpackWarnings usage
3 participants