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
Conversation
There was a problem hiding this 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', |
There was a problem hiding this comment.
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.)
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
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. |
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