[PR #7352] [MERGED] replace nordigen-node with our own GoCardless implementation #14157

Closed
opened 2026-04-10 22:14:44 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/7352
Author: @matt-fidd
Created: 4/1/2026
Status: Merged
Merged: 4/7/2026
Merged by: @matt-fidd

Base: masterHead: drop-nordigen-dep


📝 Commits (9)

  • 3685ca5 implement our own GoCardless api class
  • d8c6720 switch the service to use the new api
  • d94deb6 drop deps
  • 50cd59d note
  • 519a46f guard against request forgery
  • a7ae156 strip empty params from the request body, add error logging
  • 7b88bd5 coderabbit suggestions
  • af70d04 fix test, make institution nullable
  • 00c82c3 Merge branch 'master' into drop-nordigen-dep

📊 Changes

12 files changed (+950 additions, -781 deletions)

View changed files

📝 package.json (+0 -1)
📝 packages/sync-server/package.json (+0 -2)
📝 packages/sync-server/src/app-gocardless/app-gocardless.js (+34 -21)
📝 packages/sync-server/src/app-gocardless/errors.ts (+26 -16)
📝 packages/sync-server/src/app-gocardless/gocardless-node.types.ts (+14 -7)
📝 packages/sync-server/src/app-gocardless/gocardless.types.ts (+8 -6)
packages/sync-server/src/app-gocardless/services/gocardless-api.ts (+327 -0)
packages/sync-server/src/app-gocardless/services/gocardless-service.js (+0 -650)
packages/sync-server/src/app-gocardless/services/gocardless-service.ts (+510 -0)
📝 packages/sync-server/src/app-gocardless/services/tests/gocardless-service.spec.js (+24 -19)
upcoming-release-notes/7352.md (+6 -0)
📝 yarn.lock (+1 -59)

📄 Description

Description

We've used nordigen-node to talk to the GoCardless API forever, but it hasn't been touched since 2022 and brings in transitive dependencies that expose us to supply chain attacks, add to the server size, and aren't necessary since fetch was made native in node. It has also been limiting in the past when GoCardless added in the rate limits and we couldn't get the headers out of the package.

Swapping this out is potentially controversial as GoCardless Bank Account Data isn't even actively supported for new customers, but until they sunset it properly I can't see it being taken out of Actual, so we may as well "do it right".

Doing this also lets us type GoCardless properly, I've written the api layer in TS and updated the downstream code to use types as and where it can. As we expand typing through sync-server, this should keep us a little safer than we once were.

The server size isn't reported on PRs, but this saves us fetching about 1MB of dependencies

[YN0013] │ No new packages added to the project, but 6 were removed (- 962.03 KiB).

https://github.com/actualbudget/actual/issues/1483 ?

Testing

Tested locally by linking a new account, syncing transactions, then unlinking. All worked as expected.
GoCardless service tests also pass

Checklist

  • Release notes added (see link above)
  • No obvious regressions in affected areas
  • Self-review has been performed - I understand what each change in the code does and why it is needed

Bundle Stats

Bundle Files count Total bundle size % Changed
desktop-client 27 → 28 12.09 MB → 12.17 MB (+81.33 kB) +0.66%
loot-core 1 4.83 MB 0%
api 4 4.06 MB 0%
cli 1 7.88 MB 0%
View detailed bundle stats

desktop-client

Total

Files count Total bundle size % Changed
27 → 28 12.09 MB → 12.17 MB (+81.33 kB) +0.66%
Changeset
File Δ Size
locale/zh-Hans.json 🆕 +81.33 kB 0 B → 81.33 kB
src/languages.ts 📈 +109 B (+6.91%) 1.54 kB → 1.65 kB
View detailed bundle breakdown

Added

Asset File Size % Changed
static/js/zh-Hans.js 0 B → 81.33 kB (+81.33 kB) -

Removed
No assets were removed

Bigger
No assets were bigger

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
static/js/index.js 3.23 MB 0%
static/js/BackgroundImage.js 119.98 kB 0%
static/js/FormulaEditor.js 846.44 kB 0%
static/js/ReportRouter.js 1.02 MB 0%
static/js/TransactionList.js 81.29 kB 0%
static/js/ca.js 182.91 kB 0%
static/js/da.js 104.66 kB 0%
static/js/de.js 174.79 kB 0%
static/js/en-GB.js 7.16 kB 0%
static/js/en.js 170.76 kB 0%
static/js/es.js 182.18 kB 0%
static/js/fr.js 177.47 kB 0%
static/js/indexeddb-main-thread-worker-e59fee74.js 13.46 kB 0%
static/js/it.js 166.25 kB 0%
static/js/narrow.js 354.5 kB 0%
static/js/nb-NO.js 152.2 kB 0%
static/js/nl.js 108.93 kB 0%
static/js/pl.js 88.34 kB 0%
static/js/pt-BR.js 177.84 kB 0%
static/js/resize-observer.js 18.03 kB 0%
static/js/sv.js 80.58 kB 0%
static/js/th.js 179.94 kB 0%
static/js/theme.js 30.68 kB 0%
static/js/uk.js 213.14 kB 0%
static/js/useTransactionBatchActions.js 4.29 MB 0%
static/js/wide.js 418 B 0%
static/js/workbox-window.prod.es5.js 7.28 kB 0%

loot-core

Total

Files count Total bundle size % Changed
1 4.83 MB 0%
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.CwpE34S5.js 4.83 MB 0%

api

Total

Files count Total bundle size % Changed
4 4.06 MB 0%
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
index.js 3.84 MB 0%
from-Bl-Hslp4.js 167.73 kB 0%
multipart-parser-BnDysoMr.js 8.1 kB 0%
src-iMkUmuwR.js 43.64 kB 0%

cli

Total

Files count Total bundle size % Changed
1 7.88 MB 0%
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
cli.js 7.88 MB 0%

🔄 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/7352 **Author:** [@matt-fidd](https://github.com/matt-fidd) **Created:** 4/1/2026 **Status:** ✅ Merged **Merged:** 4/7/2026 **Merged by:** [@matt-fidd](https://github.com/matt-fidd) **Base:** `master` ← **Head:** `drop-nordigen-dep` --- ### 📝 Commits (9) - [`3685ca5`](https://github.com/actualbudget/actual/commit/3685ca5a335f0d7862fe4d6fe2a82d6289413d25) implement our own GoCardless api class - [`d8c6720`](https://github.com/actualbudget/actual/commit/d8c6720f2141bb015d6ad08042838310b66bb062) switch the service to use the new api - [`d94deb6`](https://github.com/actualbudget/actual/commit/d94deb60d74863953c99a9feb5026badb380c5d7) drop deps - [`50cd59d`](https://github.com/actualbudget/actual/commit/50cd59d266c70e84cdba54a5ce105309e39d4d13) note - [`519a46f`](https://github.com/actualbudget/actual/commit/519a46f6c6287d0af18641db9dc1f19d7e356f8d) guard against request forgery - [`a7ae156`](https://github.com/actualbudget/actual/commit/a7ae15638e3f47517ebc2e3d24c92af1be0d4f3e) strip empty params from the request body, add error logging - [`7b88bd5`](https://github.com/actualbudget/actual/commit/7b88bd57af1394d2a043a3037741c6f5f2a961fd) coderabbit suggestions - [`af70d04`](https://github.com/actualbudget/actual/commit/af70d046812742f2070e24474be20e682d74bdde) fix test, make institution nullable - [`00c82c3`](https://github.com/actualbudget/actual/commit/00c82c3220755817c4e4c49e62a3e17aed9e4d0f) Merge branch 'master' into drop-nordigen-dep ### 📊 Changes **12 files changed** (+950 additions, -781 deletions) <details> <summary>View changed files</summary> 📝 `package.json` (+0 -1) 📝 `packages/sync-server/package.json` (+0 -2) 📝 `packages/sync-server/src/app-gocardless/app-gocardless.js` (+34 -21) 📝 `packages/sync-server/src/app-gocardless/errors.ts` (+26 -16) 📝 `packages/sync-server/src/app-gocardless/gocardless-node.types.ts` (+14 -7) 📝 `packages/sync-server/src/app-gocardless/gocardless.types.ts` (+8 -6) ➕ `packages/sync-server/src/app-gocardless/services/gocardless-api.ts` (+327 -0) ➖ `packages/sync-server/src/app-gocardless/services/gocardless-service.js` (+0 -650) ➕ `packages/sync-server/src/app-gocardless/services/gocardless-service.ts` (+510 -0) 📝 `packages/sync-server/src/app-gocardless/services/tests/gocardless-service.spec.js` (+24 -19) ➕ `upcoming-release-notes/7352.md` (+6 -0) 📝 `yarn.lock` (+1 -59) </details> ### 📄 Description <!-- 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. --> ## Description <!-- What does this PR do? Why is it needed? Please give context on the "why?": why do we need this change? What problem is it solving for you?--> We've used `nordigen-node` to talk to the GoCardless API forever, but it hasn't been touched since 2022 and brings in transitive dependencies that expose us to supply chain attacks, add to the server size, and aren't necessary since `fetch` was made native in node. It has also been limiting in the past when GoCardless added in the rate limits and we couldn't get the headers out of the package. Swapping this out is potentially controversial as GoCardless Bank Account Data isn't even actively supported for new customers, but until they sunset it properly I can't see it being taken out of Actual, so we may as well "do it right". Doing this also lets us type GoCardless properly, I've written the api layer in TS and updated the downstream code to use types as and where it can. As we expand typing through `sync-server`, this should keep us a little safer than we once were. The server size isn't reported on PRs, but this saves us fetching about 1MB of dependencies ```sh ➤ [YN0013] │ No new packages added to the project, but 6 were removed (- 962.03 KiB). ``` ## Related issue(s) <!-- e.g. Fixes #123, Relates to #456 --> https://github.com/actualbudget/actual/issues/1483 ? ## Testing <!-- What did you test? How can we reproduce the issue you are fixing or how can we test the feature you built? --> Tested locally by linking a new account, syncing transactions, then unlinking. All worked as expected. GoCardless service tests also pass ## Checklist - [x] Release notes added (see link above) - [x] No obvious regressions in affected areas - [x] Self-review has been performed - I understand what each change in the code does and why it is needed <!--- actual-bot-sections ---> <!--- bundlestats-action-comment key:combined start ---> ### Bundle Stats Bundle | Files count | Total bundle size | % Changed ------ | ----------- | ----------------- | --------- desktop-client | 27 → 28 | 12.09 MB → 12.17 MB (+81.33 kB) | +0.66% loot-core | 1 | 4.83 MB | 0% api | 4 | 4.06 MB | 0% cli | 1 | 7.88 MB | 0% <details> <summary>View detailed bundle stats</summary> #### desktop-client **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 27 → 28 | 12.09 MB → 12.17 MB (+81.33 kB) | +0.66% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `locale/zh-Hans.json` | 🆕 +81.33 kB | 0 B → 81.33 kB `src/languages.ts` | 📈 +109 B (+6.91%) | 1.54 kB → 1.65 kB </details> <details> <summary>View detailed bundle breakdown</summary> <div> **Added** Asset | File Size | % Changed ----- | --------- | --------- static/js/zh-Hans.js | 0 B → 81.33 kB (+81.33 kB) | - **Removed** No assets were removed **Bigger** No assets were bigger **Smaller** No assets were smaller **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- static/js/index.js | 3.23 MB | 0% static/js/BackgroundImage.js | 119.98 kB | 0% static/js/FormulaEditor.js | 846.44 kB | 0% static/js/ReportRouter.js | 1.02 MB | 0% static/js/TransactionList.js | 81.29 kB | 0% static/js/ca.js | 182.91 kB | 0% static/js/da.js | 104.66 kB | 0% static/js/de.js | 174.79 kB | 0% static/js/en-GB.js | 7.16 kB | 0% static/js/en.js | 170.76 kB | 0% static/js/es.js | 182.18 kB | 0% static/js/fr.js | 177.47 kB | 0% static/js/indexeddb-main-thread-worker-e59fee74.js | 13.46 kB | 0% static/js/it.js | 166.25 kB | 0% static/js/narrow.js | 354.5 kB | 0% static/js/nb-NO.js | 152.2 kB | 0% static/js/nl.js | 108.93 kB | 0% static/js/pl.js | 88.34 kB | 0% static/js/pt-BR.js | 177.84 kB | 0% static/js/resize-observer.js | 18.03 kB | 0% static/js/sv.js | 80.58 kB | 0% static/js/th.js | 179.94 kB | 0% static/js/theme.js | 30.68 kB | 0% static/js/uk.js | 213.14 kB | 0% static/js/useTransactionBatchActions.js | 4.29 MB | 0% static/js/wide.js | 418 B | 0% static/js/workbox-window.prod.es5.js | 7.28 kB | 0% </div> </details> --- #### loot-core **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 4.83 MB | 0% <details> <summary>View detailed bundle breakdown</summary> <div> **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.CwpE34S5.js | 4.83 MB | 0% </div> </details> --- #### api **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 4 | 4.06 MB | 0% <details> <summary>View detailed bundle breakdown</summary> <div> **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 ----- | --------- | --------- index.js | 3.84 MB | 0% from-Bl-Hslp4.js | 167.73 kB | 0% multipart-parser-BnDysoMr.js | 8.1 kB | 0% src-iMkUmuwR.js | 43.64 kB | 0% </div> </details> --- #### cli **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 7.88 MB | 0% <details> <summary>View detailed bundle breakdown</summary> <div> **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 ----- | --------- | --------- cli.js | 7.88 MB | 0% </div> </details> </details> <!--- bundlestats-action-comment key:combined end ---> --- <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-04-10 22:14:44 -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#14157