Skip to content

Use md5 hash for caching on node v17#918

Merged
nicolo-ribaudo merged 3 commits intobabel:mainfrom
Reptarsrage:main
Oct 20, 2021
Merged

Use md5 hash for caching on node v17#918
nicolo-ribaudo merged 3 commits intobabel:mainfrom
Reptarsrage:main

Conversation

@Reptarsrage
Copy link
Copy Markdown
Contributor

@Reptarsrage Reptarsrage commented Oct 20, 2021

Please check if the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior? (You can also link to an open issue here)
#917

What is the new behavior?
Webpack builds will succeed with latest node version 17.0.0 if you set the new "hashType" configuration value to "md5".

Does this PR introduce a breaking change?

  • Yes
  • No

@Reptarsrage
Copy link
Copy Markdown
Contributor Author

Reptarsrage commented Oct 20, 2021

Looks like "md4" is now considered "legacy" in OpenSSL 3.0 and is not supported without some tweaking (source, source). This change allows users to specify a supported hash algorithm.

@Reptarsrage Reptarsrage changed the title Fixing outdated "md4" hash algorithm Adding new configuration value to work around outdated "md4" hash algorithm in node v17 Oct 20, 2021
@nicolo-ribaudo
Copy link
Copy Markdown
Member

Would it be a breaking change to just switch to md5 by default?

@JLHwung
Copy link
Copy Markdown
Contributor

JLHwung commented Oct 20, 2021

Would it be a breaking change to just switch to md5 by default?

Changing hash algorithm will invalidate current cache. I think offering a hashType is overkill, we can use md5 on Node >= 17 and migrate to md5 in next major.

@Reptarsrage
Copy link
Copy Markdown
Contributor Author

@JLHwung I switched the change to conditionally switch to md5 if it detects node v17.0.0 or higher.

Copy link
Copy Markdown
Contributor

@JLHwung JLHwung left a comment

Choose a reason for hiding this comment

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

Thanks!

Copy link
Copy Markdown
Member

@nicolo-ribaudo nicolo-ribaudo left a comment

Choose a reason for hiding this comment

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

Thanks!

@nicolo-ribaudo nicolo-ribaudo changed the title Adding new configuration value to work around outdated "md4" hash algorithm in node v17 Use md5 has for caching on node v17 Oct 20, 2021
@nicolo-ribaudo nicolo-ribaudo merged commit 0093525 into babel:main Oct 20, 2021
@JLHwung JLHwung changed the title Use md5 has for caching on node v17 Use md5 hash for caching on node v17 Oct 20, 2021
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 this pull request may close these issues.

3 participants