-
Notifications
You must be signed in to change notification settings - Fork 55
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
Chore / maintenance 2024 q4 #656
Conversation
Visit the preview URL for this PR (updated for commit d00edb1): https://ottwebapp--pr656-chore-maintenance-20-0tdlbo2d.web.app (expires Fri, 03 Jan 2025 14:52:47 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: c198f8a3a199ba8747819f7f1e45cf602b777529 |
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.
Nice maintenance PR. Thanks for the elaborate motivation per commit/change. The end result looks clean.
5cbcb46
to
d00edb1
Compare
Maintenance 2024 Q4
As the title already suggests, this PR is a maintenance update which means that we fix security vulnerabilities by upgrading dependencies. In some cases there is no update available and we need to use resolutions to upgrade nested dependencies.
We also look into packages that can be replaced or migrated to more modern packages, fix deprecation warnings and do some housekeeping.
I've split each change per commit with self explaining changes, but here is a list of the changes including the motivation where necessary:
chore: add access bridge test env
When running
$ yarn test
locally, I ran into an error. By adding aenv.test
file in theaccess-bridge
platform this error is cleared. I could then also remove the redundant env overrides in the unit test workflow file.chore: upgrade yup to 1.4.0
Yup had a major upgrade (0.32.11 -> 1.4.0) which came with a few breaking changes. The biggest in this project was the usage of
SchemaOf
which is renamed toObjectSchema
. But after the upgrade, the typings (correctly) spotted many mistakes between the yup schema and TS types. So, I corrected them in the yup schema. This could mean that the config validation becomes more strict. Especially in cases where we don't expectnull
values. @AntonLantukh do you have the exact typings used in the app config API so we can ensure that we have the correct validation schema now?PS I also considered to migrate to zod...
chore: upgrade date-fns to 4.1.0
date-fns also had a major upgrade (3.6.0 -> 4.1.0) which adds timezone support. It didn't had breaking changes for us.
chore: upgrade marked to 15.0.3
Marked had many major releases (4.3.0 -> 15.0.3). We don't need the separate
@types/marked
package anymore because the codebase has been rewritten to TypeScript. There are some changes in the render pipeline which meant I had to revert some recent changes to disable images when rendering inline markdown (video details, footer, ...).chore: upgrade i18next to 24.0.2 and react-i18next to 15.1.3
No changes were needed for the i18next (22 -> 24) upgrade.
chore: upgrade vite to 5.4.11
chore: upgrade vitest to 2.1.6
This was no major upgrade but I did it separate anyway to ensure this was tested isolated. Vite v6 has been released 7 days ago, but I didn't want to migrate this yet and give this a little more time to mature.
... some minor fixes in between ...
chore: update workflows to node 22
Node 22 is the active release now, so I upgraded the Node workflows to use version 22.
chore: upgrade to sass-embedded
It is suggested by Vite to use the
sass-embedded
package over thesass
package and use themodern-compiler
API. There was also a warning for this in the Vite output when runningyarn test
oryarn start
.chore: fix sass deprecation warnings
After upgrading to
sass
(orsass-embedded
1.81.1) a few warnings showed in the console. Most of them are related to this: https://sass-lang.com/documentation/breaking-changes/mixed-decls/. The problem is that when using mixings like so;The sass deprecation detection notified that we should use the
& {}
workaround. I was able to fix this by changing the declaration order in stylelint. This results in:The remaining commits should be clear by itself.