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
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"clean": "rm -rf dist @types"
},
"dependencies": {
"@actual-app/crdt": "workspace:^",
"better-sqlite3": "^9.3.0",
"compare-versions": "^6.1.0",
"node-fetch": "^3.3.2",
Expand Down
1 change: 1 addition & 0 deletions packages/loot-core/webpack/webpack.api.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.

config.output.filename = 'bundle.api.js';
config.output.sourceMapFilename = 'bundle.api.js.map';
config.output.path = path.join(
Expand Down
6 changes: 6 additions & 0 deletions upcoming-release-notes/2738.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
category: Maintenance
authors: [twk3]
---

Include crdt as a dependency in the API to include its types
3 changes: 2 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@actual-app/api@workspace:packages/api"
dependencies:
"@actual-app/crdt": "workspace:^"
"@swc/core": "npm:^1.5.3"
"@swc/jest": "npm:^0.2.36"
"@types/jest": "npm:^27.5.2"
Expand All @@ -37,7 +38,7 @@ __metadata:
languageName: unknown
linkType: soft

"@actual-app/crdt@npm:*, @actual-app/crdt@workspace:packages/crdt":
"@actual-app/crdt@npm:*, @actual-app/crdt@workspace:^, @actual-app/crdt@workspace:packages/crdt":
version: 0.0.0-use.local
resolution: "@actual-app/crdt@workspace:packages/crdt"
dependencies:
Expand Down
Loading