-
Notifications
You must be signed in to change notification settings - Fork 2
Upgrade dependencies to work with Node v22+ #14
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
Conversation
Clears a high vuln in the older version.
to fix `yarn build` on Node 18+
Removes a bunch of transitive vulns
Use `resolutions` to pin transitive dependencies: - The `@types/react*` packages needed to be pinned to v17, else we'd get v19, which caused typing errors. - The rest needed to be pinned to avoid vulns.
Was previously failing with:
```
FAIL src/App.test.tsx
● Test suite failed to run
[BABEL] /home/work/code/fosdem-schedule-element-widget/src/setupTests.ts: Requires Babel "^7.22.0 || >8.0.0-alpha <8.0.0-beta", but was loaded with "7.12.3". If you are sure you have a compatible version of @babel/core, it is likely that something in your build process is loading the wrong version. Inspect the stack trace of this error to look for the first entry that doesn't mention "@babel/core" or "babel-core" to see what is calling Babel. (While processing: "/home/work/code/fosdem-schedule-element-widget/node_modules/@babel/plugin-syntax-import-attributes/lib/index.js")
at Object.assertVersion (node_modules/@babel/core/lib/config/helpers/config-api.js:74:15)
at builder (node_modules/@babel/plugin-syntax-import-attributes/src/index.ts:8:7)
at node_modules/@babel/helper-plugin-utils/src/index.ts:64:12
at node_modules/@babel/core/lib/config/full.js:211:14
at Function.<anonymous> (node_modules/@babel/core/lib/gensync-utils/async.js:26:3)
at evaluateSync (node_modules/gensync/index.js:251:28)
at cachedFunction (node_modules/@babel/core/lib/config/caching.js:68:46)
at cachedFunction.next (<anonymous>)
at loadPluginDescriptor (node_modules/@babel/core/lib/config/full.js:247:42)
at loadPluginDescriptor.next (<anonymous>)
at loadPluginDescriptors (node_modules/@babel/core/lib/config/full.js:158:30)
at loadPluginDescriptors.next (<anonymous>)
at node_modules/@babel/core/lib/config/full.js:186:21
at loadFullConfig (node_modules/@babel/core/lib/config/full.js:169:5)
at loadFullConfig.next (<anonymous>)
at transform (node_modules/@babel/core/lib/transform.js:25:45)
at transform.next (<anonymous>)
```
Required to fix the build.
reivilibre
left a comment
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.
If it's tested to work in both dev & docker build, then I accept this, but the webpack config is virtually unreviewable to me. Mercifully it's just a build tool.
I find myself in awe at the amount of stuff needed to build a schedule widget 😅. If I was dealing with this more often I'd probably suggest switching to Vite, but it's not worth the hassle atm
You need to store the result in a variable before exporting it, apparently.
Prevent login from working during testing. It's possible this isn't added automatically anymore, or matrix.org just requires it now. Either way, needed to happen!

Fixes a bunch of flagged packages.
Codex CLI was used to do most of this. The only commit I don't fully understand is:
config/webpack.config.jsappears to be mainly updating to new config option namesconfig/webpackDevServer.config.jsappears to be mostly boilerplateRecommended to review commit-by-commit.