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 compatibility with node 18 #50

Merged
merged 1 commit into from Aug 17, 2022

Conversation

mattlewis92
Copy link
Contributor

Opening up for discussion, I don't think it would really be seen as a breaking change for the cache to be invalidated, but open to suggestions!

Fixes #49

Copy link
Owner

@gilmoreorless gilmoreorless left a comment

Choose a reason for hiding this comment

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

Thank you for this! I have a separate "Canary" build that runs on a monthly schedule with the latest versions of webpack, moment-timezone, and I thought NodeJS. It hadn't been failing so I thought it was all good.

Turns out that "check latest" didn't really mean latest in older versions of the GitHub action. I've upgraded the canary build to use the latest, and now it correctly fails for Node 18 on main: https://github.com/gilmoreorless/moment-timezone-data-webpack-plugin/runs/7879641982

@@ -11,11 +11,12 @@ const rGeneratedFile = /[\\/]node_modules[\\/]\.cache[\\/]moment-timezone-data-w
function buildWebpack(pluginOptions, testOptions = {}) {
const compilerOptions = {
mode: 'development',
devtool: 'hidden-source-map',
devtool: 'eval',
Copy link
Owner

Choose a reason for hiding this comment

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

Was there a particular reason for this change? Just curious. (hidden-source-map is my usual default for dev projects, but in these tests it doesn't really matter.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The hidden-source-map option also uses md4 hashing so throws the same error. I couldn't see an option to change this so just changed the source map option to something that didn't use md4

Copy link
Owner

Choose a reason for hiding this comment

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

Cool, that makes sense. 😄

@@ -21,7 +21,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node: [12, 14, 16]
node: [12, 14, 16, 18]
Copy link
Owner

Choose a reason for hiding this comment

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

👍

@gilmoreorless
Copy link
Owner

I'll get a release out with this change in the next few days. Just need to check a couple of other compatibility things before I publish it.

@gilmoreorless gilmoreorless merged commit 14ba7d8 into gilmoreorless:main Aug 17, 2022
@mattlewis92 mattlewis92 deleted the fix-node-18 branch August 17, 2022 13:40
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.

Fails with node 18
2 participants