Skip to content
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

Merged
merged 20 commits into from
Dec 4, 2024

Conversation

ChristiaanScheermeijer
Copy link
Collaborator

@ChristiaanScheermeijer ChristiaanScheermeijer commented Nov 29, 2024

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 a env.test file in the access-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 to ObjectSchema. 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 expect null 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 the sass package and use the modern-compiler API. There was also a warning for this in the Vite output when running yarn test or yarn start.

chore: fix sass deprecation warnings

After upgrading to sass (or sass-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;

.selector {
  @include mixin;
  font-size: 16px;
}

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:

.selector {
  font-size: 16px;
  @include mixin;
}

The remaining commits should be clear by itself.

Copy link

github-actions bot commented Nov 29, 2024

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

Copy link
Collaborator

@langemike langemike left a 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.

@ChristiaanScheermeijer ChristiaanScheermeijer merged commit 7f5892f into develop Dec 4, 2024
10 checks passed
@ChristiaanScheermeijer ChristiaanScheermeijer deleted the chore/maintenance-2024-q4 branch December 4, 2024 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants