[PR #396] [MERGED] Avoid pulling in the bundled app from API in backend #3104

Closed
opened 2026-02-28 20:36:24 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/396
Author: @jlongster
Created: 12/2/2022
Status: Merged
Merged: 12/2/2022
Merged by: @jlongster

Base: masterHead: jlongster-avoid-api-bundle


📝 Commits (1)

  • c4d1303 Import only what's needed from the API for importer packages

📊 Changes

3 files changed (+13 additions, -6 deletions)

View changed files

📝 packages/api/index.js (+1 -2)
📝 packages/import-ynab4/importer.js (+7 -3)
📝 packages/import-ynab5/importer.js (+5 -1)

📄 Description

The backend imports the import-ynab4 and import-ynab5 packages, which we pulling in @actual-app/api directly. When we switched to the API using a full bundled version of the app, this is a problem. The importer packages are special because they are inlined directly into Actual, so although they invoke the API they are actually just running directly against Actual when in the app.

We can import just the methods from the API instead, which avoids pulling in the whole bundle. This fixes building the backend, and unblocks us to cut a release. Building the backend previously took many minutes (and resulted in a huge bundle) because it was embedding the API build; now it takes ~30 seconds.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/actualbudget/actual/pull/396 **Author:** [@jlongster](https://github.com/jlongster) **Created:** 12/2/2022 **Status:** ✅ Merged **Merged:** 12/2/2022 **Merged by:** [@jlongster](https://github.com/jlongster) **Base:** `master` ← **Head:** `jlongster-avoid-api-bundle` --- ### 📝 Commits (1) - [`c4d1303`](https://github.com/actualbudget/actual/commit/c4d1303691dd01f7fec5528b86216e46702e687d) Import only what's needed from the API for importer packages ### 📊 Changes **3 files changed** (+13 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `packages/api/index.js` (+1 -2) 📝 `packages/import-ynab4/importer.js` (+7 -3) 📝 `packages/import-ynab5/importer.js` (+5 -1) </details> ### 📄 Description The backend imports the `import-ynab4` and `import-ynab5` packages, which we pulling in `@actual-app/api` directly. When we switched to the API using a full bundled version of the app, this is a problem. The importer packages are special because they are inlined directly into Actual, so although they invoke the API they are actually just running directly against Actual when in the app. We can import just the methods from the API instead, which avoids pulling in the whole bundle. This fixes building the backend, and unblocks us to cut a release. Building the backend previously took many minutes (and resulted in a huge bundle) because it was embedding the API build; now it takes ~30 seconds. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-02-28 20:36:24 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#3104