-
Notifications
You must be signed in to change notification settings - Fork 340
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
Outdated javascript dependencies #6343
Comments
I'd be interested to update webpack 5, so that we could maybe later fix sulu/skeleton#88 by introducing module federation. The good news is that ckeditor seems to have fixed their issue with Webpack 5. But the linked commit from ckeditor has not been released yet. And when thinking about it, since multiple ckeditor packages are in use, it might be hard to get all of that working when not being able to rely on releases, so it might be worthwhile waiting for the release to start working on this. While this is nothing that you can have an influence on, there is a second question that I feel has to be asked: Would you consider upgrading to webpack 5 to be a breaking change? I think strictly speaking it is, since Sulu allows to extend the admin interface by adjusting its webpack config, and upgrading to webpack 5 might cause many custom admin build to fail. Is that something that should be done for 3.0 only? EDIT: |
Thats great news and would allow us to update most of the packages listed above 🥳
Yes, strictly speaking it would be a breaking change. But I think we decided to tolerate breaking changes in the frontend part in minor releases, so it would be okay for me to do this in a possible |
With the already exist dll builds we maybe get rid of the whole CKEditor webpack specific configurations already: https://jsfiddle.net/vtg19hry/ That would be in my case the best for ckeditor as I really don't want that we need to maintain ckeditor specific webpack configs. |
Looks like the next ckeditor version 30.0 will be using webpack 5 and postcss 8: ckeditor/ckeditor5-dev#764 |
React 18 was released, I added it to the list, I think there should be not a lot required to upgrade to it: https://reactjs.org/blog/2022/03/08/react-18-upgrade-guide.html |
In todays CMS Garden meeting @MrTango presented the Module Federation implementation of Plone 6. So we can find inspiration there how to configure webpack as it requires special configuration that all dependencies are provided as own module federation and they did work together with some webpack module federation dev to get it work well together. So when we tackle the module federation issue we can also contact @MrTango to get some insights from Plone and their implementation. |
I did have a look today at webpack 5 update. But as it is a breaking change as webpack does not longer polyfill node libraries and make so some dependency crash I decided that we will move the webpack update to Sulu 3.0. Currenty state can be seen here: #6690. While there are workarounds about this, it would make still projects crash depending on such libraries and so we should do this only in a new major and in that case cleanup our dependencies not depending on any node libraries any more. Still we will update postcss, ckeditor and react in version 2.5 to latest versions. |
Currently |
I added a comment in the issue description about our now hardcoded browserlist because of the webpack 4 terser parser, which can be removed when updating to webpack 5. |
Webpack 5 merged 🎉 Removed it from the list. |
Should we remove the hardcoded browserlist/babel configuration now that Webpack 5 was merged? |
@niklasnatter sure we could also try to update the other webpack loaders. |
Current list from @ckeditor/ckeditor5-dev-utils 30.5.0 30.5.0 31.1.13 sulu-sulu
@ckeditor/ckeditor5-theme-lark 34.2.0 34.2.0 35.3.2 sulu-sulu
@testing-library/react 12.1.5 12.1.5 13.4.0 sulu-sulu
@wojtekmaj/enzyme-adapter-react-17 0.6.7 0.6.7 0.8.0 sulu-sulu
babel-jest 26.6.3 26.6.3 29.3.1 sulu-sulu
babel-loader 8.3.0 8.3.0 9.1.0 sulu-sulu
css-loader 5.2.7 5.2.7 6.7.2 sulu-sulu
dependency-cruiser 11.18.0 11.18.0 12.1.0 sulu-sulu
flow-bin 0.142.0 0.142.0 0.194.0 sulu-sulu
jest 26.6.3 26.6.3 29.3.1 sulu-sulu
mobx 4.15.7 4.15.7 6.7.0 sulu-sulu
mobx-react 5.4.4 5.4.4 7.6.0 sulu-sulu
postcss-import 14.1.0 14.1.0 15.0.1 sulu-sulu
postcss-loader 4.3.0 4.3.0 7.0.2 sulu-sulu
postcss-nested 5.0.6 5.0.6 6.0.0 sulu-sulu
postcss-simple-vars 6.0.3 6.0.3 7.0.1 sulu-sulu
react 17.0.2 17.0.2 18.2.0 sulu-sulu
react-dom 17.0.2 17.0.2 18.2.0 sulu-sulu
react-styleguidist 11.2.0 11.2.0 13.0.0 sulu-sulu
react-test-renderer 17.0.2 17.0.2 18.2.0 sulu-sulu
stylelint-config-standard-scss 5.0.0 5.0.0 6.1.0 sulu-sulu The first step will mostly be update ckeditor to latest version and check then what else we can update. |
CKEditor update currently blocked by a strange error in: #6926 Did create an upstream issue in ckeditor maybe they know what change is providing: ckeditor/ckeditor5#12971 |
The The I tried to migrate but did fail with the CKEditor here: ckeditor/ckeditor5#12979. Tried to update in #6930 |
I wanted to add a few thoughts on the remaining outdated packages and and how to tackle them. I think there are 3 big set of packages we need to tackle before the next major version. Some of them will affect projects with custom Javascript. Unfortunately, I do not see a way around this and I dont think we should stay on the outdated versions because this will cause more pain on our side in the future. We already have some problems that are caused by outdated packages (we cannot update
|
The required changes only for webpack 4 terser parser were removed, this includes some PRs: sulu/skeleton#211 and sulu/skeleton#211. |
Very intersting about The main difference seems to be it is now: -@observable todos = [];
+@observable accessor todos = []; |
Issue with CSS Loader is fixed in #7329 and part of 2.6.0. We so not longer require file-loader or raw-loader packages as that is now build in in webpack. |
We could maybe give https://github.com/cfaester/enzyme-adapter-react-18 a try to update to react 18. |
Update: Quicktest, https://github.com/cfaester/enzyme-adapter-react-18 it is not a easy way to use just the adapter / update to react 18. It also looks we first would require to update Jest, which first will require update MobX. So my suggestion would be do. MobX -> Jest -> React Maybe on the way we can still move some enzym tests to react testing library. |
Unfortunately, we cannot update some javascript packages because of various reasons. This issue tracks which packages are affected and why we need to use an outdated package version:
enzyme
is not compatible with react@18: https://dev.to/wojtekmaj/enzyme-is-dead-now-what-ekl #6689Webpack 5:
The text was updated successfully, but these errors were encountered: