[PR #5557] 🛠 Upgrade crdt package #13051

Closed
opened 2026-04-10 21:45:57 -05:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/actualbudget/actual/pull/5557

State: closed
Merged: No


I'm letting this go stale

I think it's worth doing at some point but probably when we've got a server bundler so we can benefit from not having the crdt npm package.


Note

  • Worth testing this one with your server.
  • This could be a controversial one, happy to abandon this PR if we think it's not worth it given we rarely change crdt.

When upgrading loot-core to vite I ran into an issue where crdt's generated proto file was not compatible out of the box. To account for that I had to make a polyfill. This PR regenerates the proto file in a more compatible format.

Benefits:

  • We can remove the polyfills that were needed to satisfy vite
  • The proto file is now much easier to generate - you don't need to install anything extra, just run yarn proto:generate
  • I have changed the sync-server to reference the crdt package via workspace instead of npm package. It means locally we use the workspace for the latest code, but we do still need to publish @actual-app/crdt because it's still a dependency of server.

Tested:

  • Test old server with new client (updated crdt)
    • messages still sync - compatible
  • Test new server (updated crdt) with old client
    • messages still sync - compatible
  • Test the sync-server npm package - the build will need updated to ensure crdt is built first
  • Run it for a few days
  • Test the dockerfile (built locally)
**Original Pull Request:** https://github.com/actualbudget/actual/pull/5557 **State:** closed **Merged:** No --- <!-- Thank you for submitting a pull request! Make sure to follow the instructions to write release notes for your PR — it should only take a minute or two: https://github.com/actualbudget/docs#writing-good-release-notes. Try running yarn generate:release-notes *before* pushing your PR for an interactive experience. --> # I'm letting this go stale I think it's worth doing at some point but probably when we've got a server bundler so we can benefit from not having the crdt npm package. --- >[!NOTE] > - Worth testing this one with your server. > - This could be a controversial one, happy to abandon this PR if we think it's not worth it given we rarely change crdt. When upgrading loot-core to vite I ran into an issue where crdt's generated proto file was not compatible out of the box. To account for that I had to make a polyfill. This PR regenerates the proto file in a more compatible format. Benefits: - We can remove the polyfills that were needed to satisfy vite - The proto file is now much easier to generate - you don't need to install anything extra, just run `yarn proto:generate` - I have changed the sync-server to reference the crdt package via workspace instead of npm package. It means locally we use the workspace for the latest code, but we do still need to publish @actual-app/crdt because it's still a dependency of server. Tested: - [x] Test old server with new client (updated crdt) - messages still sync - compatible - [x] Test new server (updated crdt) with old client - messages still sync - compatible - [x] Test the sync-server npm package - the build will need updated to ensure crdt is built first - [x] Run it for a few days - [x] Test the dockerfile (built locally)
GiteaMirror added the pull-request label 2026-04-10 21:45:57 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#13051