Skip to content

Conversation

iclanton
Copy link

@iclanton iclanton commented Sep 6, 2023

Summary

🤖 Generated by Copilot at f67b661

This pull request adds Node.js 18.17.1 to the CI pipeline and updates the terser-webpack-plugin dependency to fix security issues.

Details

🤖 Generated by Copilot at f67b661

  • Add and update matrix entries for Node.js version 18.17.1 in the CI pipeline (link, link, link) in azure-pipelines.yml

@webpack-bot
Copy link
Contributor

For maintainers only:

  • This needs to be documented (issue in webpack/webpack.js.org will be filed when merged)
  • This needs to be backported to webpack 4 (issue will be created when merged)

@@ -25,7 +25,7 @@
"node-libs-browser": "^2.2.1",
"schema-utils": "^1.0.0",
"tapable": "^1.1.3",
"terser-webpack-plugin": "^1.4.3",
"terser-webpack-plugin": "^4.2.3",
Copy link
Member

Choose a reason for hiding this comment

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

CI is failing. Probably because terser-webpack-plugin dropped support for Node <10.13, can you install the older version on CI when the node is if that is the case?

Copy link
Member

Choose a reason for hiding this comment

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

I agree I think this is a suitable solution especially given this won't be touched again (🤞 ) after we land this change.

Choose a reason for hiding this comment

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

Other than the CI failures, technically webpack4 still declares a Node 6+ requirement, so the requirement may need to be updated if it's not made backward compatible - although probably a nitpick given how ancient and EOL even Node 10 is now (security EOL 30 April 2021).

webpack/package.json

Lines 95 to 97 in dfffd6a

"engines": {
"node": ">=6.11.5"
},

@Shubhanshu88
Copy link

Thanks for the md4 issue fix in v4.47.0, will the terser-webpack-plugin package bump be available in v4.48.0?

@nguyenvu9405
Copy link

nguyenvu9405 commented Oct 10, 2023

Is there any update on this one? I also encountered an error thrown from terser-webpack-plugin when upgrading to Node v18.18.0 and Webpack v4.47.0. This PR would help to resolve the error.

@chadlwilson
Copy link

@nguyenvu9405 You may be able to work around this with a forced resolution/override in your package.json.

Yarn 2+

  "resolutions": {
    "webpack@npm:4.47.0/terser-webpack-plugin": "^4.2.3"
  },

NPM

  "overrides": {
    "webpack@4.47.0": {
      "terser-webpack-plugin": "^4.2.3"
    }
  }

@nguyenvu9405
Copy link

Thank you @chadlwilson , I have applied that solution and it worked. But it is a work-around, so I hope this PR can be merged to resolve it officially.

sciencewhiz added a commit to sciencewhiz/vscode-wpilib that referenced this pull request Oct 26, 2023
change webpack hash function to sha256 to avoid insecure hash error
override terser version until webpack 4.48 is released to fix insecure
hash error. webpack/webpack#17659
sciencewhiz added a commit to sciencewhiz/vscode-wpilib that referenced this pull request Oct 26, 2023
change webpack hash function to sha256 to avoid insecure hash error
override terser version until webpack 4.48 is released to fix insecure
hash error. webpack/webpack#17659
sciencewhiz added a commit to sciencewhiz/vscode-wpilib that referenced this pull request Oct 26, 2023
change webpack hash function to sha256 to avoid insecure hash error
override terser version until webpack 4.48 is released to fix insecure
hash error. webpack/webpack#17659
sciencewhiz added a commit to sciencewhiz/vscode-wpilib that referenced this pull request Oct 26, 2023
change webpack hash function to sha256 to avoid insecure hash error.

override terser version until webpack 4.48 is released to fix insecure
hash error. webpack/webpack#17659
sciencewhiz added a commit to sciencewhiz/vscode-wpilib that referenced this pull request Oct 26, 2023
change webpack hash function to sha256 to avoid insecure hash error.

override terser version until webpack 4.48 is released to fix insecure
hash error. webpack/webpack#17659
GarboMuffin added a commit to TurboWarp/scratch-gui that referenced this pull request Dec 31, 2023
@icleolion
Copy link

+1 from me for getting this merged in to avoid having to use the NPM override please.

@alexander-akait
Copy link
Member

I can accept the fix md4 in terser-webpack-plugin@1, so let's do it firstly and then just bump the patch version here

rap1ds added a commit to sharetribe/flex-sdk-js that referenced this pull request May 13, 2024
yarn run build failed to run, due to following error:

    ERROR in sharetribe-flex-sdk-web.js from Terser
    Error: error:0308010C:digital envelope routines::unsupported

Read more here: webpack/webpack#14532

To fix the issue:

- Upgrade webpack to 4.47.0 (see: webpack/webpack#17628)
- Add `resolutions` block for terser-webpack-plugin until this PR is
  merged (webpack/webpack#17659)
@alexander-akait
Copy link
Member

Fixed by webpack-contrib/terser-webpack-plugin#608, you can update deps locally because of ^

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

Successfully merging this pull request may close these issues.

9 participants