[PR #113] [CLOSED] Remove logic from sync/index and only use the index file for exporting functions #44848

Closed
opened 2026-04-26 06:48:21 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/113
Author: @TomAFrench
Created: 7/1/2022
Status: Closed

Base: masterHead: sync-refactor


📝 Commits (6)

  • 02221f7 refactor: move logic from sync/index to sync/sync and use index for exporting
  • b8ac5c2 refactor: store syncing mode in its own file
  • 0cb309d refactor: move applyMessages into its own file
  • 3283aad refactor: move getMessagesSince to utils
  • a8ec789 refactor: move receiveMessages to sync-receive
  • 3aeff9c refactor: break off full sync and sending messages

📊 Changes

7 files changed (+794 additions, -750 deletions)

View changed files

packages/loot-core/src/server/sync/full.js (+284 -0)
📝 packages/loot-core/src/server/sync/index.js (+22 -750)
packages/loot-core/src/server/sync/sync-apply.js (+343 -0)
packages/loot-core/src/server/sync/sync-receive.js (+24 -0)
packages/loot-core/src/server/sync/sync-send.js (+63 -0)
packages/loot-core/src/server/sync/syncing-mode.js (+37 -0)
packages/loot-core/src/server/sync/utils.js (+21 -0)

📄 Description

I tend to only use /index files for reexporting functions which are defined in that directory (except in the most trivial cases). The main benefit being that you have a clear interface and the extra level of abstraction makes it much easier to refactor functions within that directory.

sync/index is a fairly complex file which could do with some breaking up in preparation for a larger project I have planned so I've pushed the logic into sync/sync to be broken down over time.

Edit: I've gone a little further and broken sync/sync into a few files


🔄 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/113 **Author:** [@TomAFrench](https://github.com/TomAFrench) **Created:** 7/1/2022 **Status:** ❌ Closed **Base:** `master` ← **Head:** `sync-refactor` --- ### 📝 Commits (6) - [`02221f7`](https://github.com/actualbudget/actual/commit/02221f76e30c9fbfb29fb0041af19eeefa2144b3) refactor: move logic from sync/index to sync/sync and use index for exporting - [`b8ac5c2`](https://github.com/actualbudget/actual/commit/b8ac5c24128c8c30533bab08aa1376dc8e76a8a3) refactor: store syncing mode in its own file - [`0cb309d`](https://github.com/actualbudget/actual/commit/0cb309da383e1a7a2465834c66847460aea84b88) refactor: move applyMessages into its own file - [`3283aad`](https://github.com/actualbudget/actual/commit/3283aad1771d4cc6b236bbbd6e6399d92424bc8f) refactor: move getMessagesSince to utils - [`a8ec789`](https://github.com/actualbudget/actual/commit/a8ec789024715c0c11a42de07fce29b39af41848) refactor: move receiveMessages to sync-receive - [`3aeff9c`](https://github.com/actualbudget/actual/commit/3aeff9cf0a7d33a015a7479b73089940cf701f57) refactor: break off full sync and sending messages ### 📊 Changes **7 files changed** (+794 additions, -750 deletions) <details> <summary>View changed files</summary> ➕ `packages/loot-core/src/server/sync/full.js` (+284 -0) 📝 `packages/loot-core/src/server/sync/index.js` (+22 -750) ➕ `packages/loot-core/src/server/sync/sync-apply.js` (+343 -0) ➕ `packages/loot-core/src/server/sync/sync-receive.js` (+24 -0) ➕ `packages/loot-core/src/server/sync/sync-send.js` (+63 -0) ➕ `packages/loot-core/src/server/sync/syncing-mode.js` (+37 -0) ➕ `packages/loot-core/src/server/sync/utils.js` (+21 -0) </details> ### 📄 Description I tend to only use `/index` files for reexporting functions which are defined in that directory (except in the most trivial cases). The main benefit being that you have a clear interface and the extra level of abstraction makes it much easier to refactor functions within that directory. `sync/index` is a fairly complex file which could do with some breaking up in preparation for a larger project I have planned so I've pushed the logic into `sync/sync` to be broken down over time. Edit: I've gone a little further and broken `sync/sync` into a few files --- <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-26 06:48:22 -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#44848