-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
Update npm dependencies in CHT Conf - post-Node >= 18 #621
Comments
Ideally we'd have the e2e testing suite merged before embarking on this to give us more confidence that nothing has regressed. |
I opened PR #623 to update non-breaking dependencies. That leaves us with those dependencies left to upgrade:
This list doesn't include the deprecated/unmaintained dependencies we might have to replace. WebStorm calls out Like mentioned in the PR description we're:
I'm not sure yet whether updating My next initiative will be to update eslint to v8 to keep compatibility with our current eslint config format allowing us to give app developers and ourselves enough time to migrate to the new eslint config format before updating to v9. |
* upgrade non-breaking dev dependencies * why rewire... * forgot .only * upgrade prod dependencies * silence grandpa eslint who cannot resolve a `require` * not sure why test is passing locally but failing in CI * .only * debug CI * debug CI - try force color in diff * debug CI colors * debug CI colors * okay that fixed it, revert test back and remove logs * .only * remove unnecessary `{ color: true }` parameter * comment eslint ignore * sonar * will this space make sonar happy? * will this? * this should. * clamp `@parcel/watcher` to v2.1.0 because more recent versions either have incompatibilities with npm 10.4 (see parcel-bundler/watcher#156) or the watcher hangs ~5% of the time when unsubscribing (see #623 (comment)) * remove todos
Tackling the webpack upgrade, I'm running into same issue Gareth ran into when trying to update webpack a while ago. Our |
* upgrade `webpack` and `terser-webpack-plugin` * use `xxhash64` hash function (see #540 (review)) * replace the deprecated `webpack.IgnorePlugin` constructor API with the new one * warning is now an object instead of a string * I can't believe it took me 2 days to figure this out 🤦♂️ * simplify webpack config
Follow-up issues: |
Describe the issue
Last time we updated dependencies we were still supporting node 8. Now that we've dropped support for node versions < 18, we can move forward and update the dependencies we couldn't update before.
Describe the improvement you'd like
Update npm dependencies and test to make sure nothing is broken after the updates.
We are behind many major versions of most packages we depend on, some of them are no longer maintained and need replacing like eslint-loader and eslint-plugin-node.
I made an attempt at upgrading ESLint to allow it to accept more recent syntax but it led me to replace eslint-loader with eslint-webpack-plugin, replace eslint-plugin-node with eslint-plugin-n, upgrade webpack to version 5, and then I eventually ran out of time to focus on the issue I was initially dealing with 🤷♂️
One important thing to note is that since cht-conf v3, CHT deployments configurations have their own ESLint configuration (documented here). ESLint v8 deprecates the json config file approach
.eslintrc
for a javascript config fileeslint.config.js
instead. With ESLint v9, they dropped support for it and it no longer works without migrating to the new config format. They provide a CLI that automates some of the work for you but it still needs some manual tweaks to make it work for each project. This represents a breaking change for app devs that needs to be well documented and means a cht-conf v5.For now I would suggest updating ESLint to v8 to support both formats for now and update to v9 (or latest if v9 becomes obsolete) at a later time, when we're comfortable with releasing a cht-conf v5.
EDIT: feedback from a team who recently migrated to ESLint v9 with Flat Config:
I expect similar occurrences with some of our dependencies, ESM/CJS incompatibilities with some others of our dependencies. Node 8.0 was released in 2017 (with the last version 8.17 in 2019) and the ecosystem has evolved a lot in that timeframe, we have 10 major versions of Node to catch up on and I estimate this maintenance to take quite some time (along the lines of weeks, not months - but definitely not days). IMO the part of the code that need extra attention during this process is the compilation code in
src/lib/compilation/*.js
that compiles the contact summary, tasks, and targets when compiling app settings.The text was updated successfully, but these errors were encountered: