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

feat: update dependencies and tooling #211

Open
wants to merge 47 commits into
base: develop
Choose a base branch
from

Conversation

Julusian
Copy link
Member

This is a pretty large set of changes which tackles the following:

  • update to yarn 4, and latest lerna
  • update most dependencies
  • update electron to 32 (current latest), and matching nodejs 20 for dev
  • remove @sofie-automation/code-standard-preset. This is because it is a bit stuck with old versions of everything, in particular is uses and old version of typescript-eslint that doesnt work with typescript newer than 5.1 (5.2 was released ~august 2023).
  • Convert everything to be ESM instead of commonjs. A few dependencies had issues with this (see the yarn patches), but most was fine, this allows for the next point
  • Replace webpack with vite

My primary testing has been both dev and packaged builds on linux, and it appears to be happy in both flows.
The built binaries need some additional testing on windows and macos, in particular checking that the ci produced macos builds run on both intel and arm.

If anyone wants to review this, I would suggest skimming each commit in turn. In particular the ones which convert things to esm are large, but mostly just change imports

@Julusian Julusian requested a review from nytamin October 11, 2024 15:02
"bufferutil": "^4.0.7",
"casparcg-connection": "^6.0.6",
"classnames": "^2.3.2",
"@sofie-automation/sorensen": "patch:@sofie-automation/sorensen@npm%3A1.4.3#~/.yarn/patches/@sofie-automation-sorensen-npm-1.4.3-a11a53b994.patch",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's up with the patches? Just esm-module fixes?
Should we PR the changes to the upstream modules as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sorensen one should be upstreamed, and is an esm fix.
The formik one is an incompatibility with updated react types, probably will go away when updating formik, but I didn't want to do a major bump of that yet.
The react-toggle ones are esm fixes, but upstream hasnt had a commit in 2 years, so I suspect trying to upstream it won't get anywhere.

@nytamin
Copy link
Member

nytamin commented Oct 14, 2024

I've looked through the commits up to this point, looks good!

@Julusian
Copy link
Member Author

There is an issue with the sorensen library not loading in the builds, but ci produced builds do launch on windows and linux. macos is being stubborn, because of changes of the notarization flow. hopefully this will be resolved once a new secret is added

@Julusian
Copy link
Member Author

@nytamin I think I am done on this

I have tested the produced binaries on macos-arm64 and windows, and they launch and a very quick test of the ui seems to behave. I haven't tried connecting them to casparcg or anything though.

One outstanding issue, is the macos build failure on PRs, I am hoping that will go away with updating electron-builder, but when I tried to do that it caused other issues so I skipped that and haven't gone back to try again.

Removing the sorensen patch is being worked on, just waiting for a final publish of the lib upstream (v1.5.0 didn't work)

@Julusian Julusian marked this pull request as ready for review October 22, 2024 15:22
@Julusian Julusian requested a review from nytamin October 22, 2024 15:22
Copy link

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