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

Add crdt to the API package to fix types #2738

Merged
merged 4 commits into from May 18, 2024
Merged

Add crdt to the API package to fix types #2738

merged 4 commits into from May 18, 2024

Conversation

twk3
Copy link
Contributor

@twk3 twk3 commented May 11, 2024

  • This way we get the crdt types available to users when they use the api
    • Otherwise they may have gotten missing type errors from typescript regarding the server/sync code from loot-core.

Instead of adding crdt as a dependency, I did confirm we could generate just the crdt types and copy them into the api like we do for loot-core. But then we still get an error regarding the google-protobuf types missing. Which is fixed by adding google-protobuf to our api dependencies. Being that a dependency needed to be added to the api either way, I just did the crdt one for now (which includes the google-protobuf dependency)

I believe this is the final unblocker for shipping the types with the API in #2559

@trafico-bot trafico-bot bot added the 🔍 Ready for Review Pull Request is not reviewed yet label May 11, 2024
@github-actions github-actions bot changed the title Add crdt to the API package to fix types [WIP] Add crdt to the API package to fix types May 11, 2024
Copy link

netlify bot commented May 11, 2024

Deploy Preview for actualbudget ready!

Name Link
🔨 Latest commit 10a4f5b
🔍 Latest deploy log https://app.netlify.com/sites/actualbudget/deploys/66476b2b4d3827000894e32e
😎 Deploy Preview https://deploy-preview-2738.demo.actualbudget.org
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@trafico-bot trafico-bot bot added 🚧 WIP Still work-in-progress, please don't review and don't merge and removed 🔍 Ready for Review Pull Request is not reviewed yet labels May 11, 2024
@@ -15,6 +15,7 @@ config.resolve.extensions = [
'.json',
];
config.resolve.fallback = {};
config.externals.push('@actual-app/crdt');
Copy link
Contributor Author

@twk3 twk3 May 11, 2024

Choose a reason for hiding this comment

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

Not necessary, but if we are going to depend on the package in the api, might as well use it rather than have it in the webpack bundle. I did confirm the built API was still working after this change. By importing some transactions via the api.

Copy link
Contributor

github-actions bot commented May 11, 2024

Bundle Stats — desktop-client

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files count Total bundle size % Changed
9 4.72 MB 0%

Changeset

No files were changed

View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

No assets were bigger

Smaller

No assets were smaller

Unchanged

Asset File Size % Changed
static/js/indexeddb-main-thread-worker-e59fee74.js 13.5 kB 0%
static/js/resize-observer.js 18.37 kB 0%
static/js/BackgroundImage.js 122.29 kB 0%
static/js/narrow.js 59.97 kB 0%
static/js/AppliedFilters.js 20.54 kB 0%
static/js/usePreviewTransactions.js 790 B 0%
static/js/wide.js 261.78 kB 0%
static/js/ReportRouter.js 1.23 MB 0%
static/js/index.js 3 MB 0%

Copy link
Contributor

github-actions bot commented May 11, 2024

Bundle Stats — loot-core

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files count Total bundle size % Changed
1 1.2 MB 0%

Changeset

No files were changed

View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

No assets were bigger

Smaller

No assets were smaller

Unchanged

Asset File Size % Changed
kcab.worker.js 1.2 MB 0%

twk3 added 2 commits May 11, 2024 11:19
- This way we get the crdt types supported
@twk3 twk3 changed the title [WIP] Add crdt to the API package to fix types Add crdt to the API package to fix types May 11, 2024
@trafico-bot trafico-bot bot added 🔍 Ready for Review Pull Request is not reviewed yet and removed 🚧 WIP Still work-in-progress, please don't review and don't merge labels May 11, 2024
joel-jeremy
joel-jeremy previously approved these changes May 16, 2024
@trafico-bot trafico-bot bot added ✅ Approved Pull Request has been approved and can be merged and removed 🔍 Ready for Review Pull Request is not reviewed yet labels May 16, 2024
@trafico-bot trafico-bot bot added 🔍 Ready for Review Pull Request is not reviewed yet and removed ✅ Approved Pull Request has been approved and can be merged labels May 17, 2024
@twk3 twk3 requested a review from joel-jeremy May 17, 2024 14:43
@trafico-bot trafico-bot bot added the ✅ Approved Pull Request has been approved and can be merged label May 17, 2024
@twk3 twk3 merged commit f604fda into master May 18, 2024
19 checks passed
@twk3 twk3 deleted the twk3/api-crdt-types branch May 18, 2024 00:07
@trafico-bot trafico-bot bot added ✨ Merged Pull Request has been merged successfully and removed 🔍 Ready for Review Pull Request is not reviewed yet ✅ Approved Pull Request has been approved and can be merged labels May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Merged Pull Request has been merged successfully
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants