Skip to content
Snippets Groups Projects
  1. May 27, 2023
  2. Apr 23, 2023
  3. Apr 16, 2023
  4. Apr 12, 2023
  5. Apr 10, 2023
    • Alberto Gasparin's avatar
      Convert commonjs to esm (#877) · cd00da76
      Alberto Gasparin authored
      This PR converts everything (aside from electron) from CommonJS to ESM.
      It is needed to reduce the changes that will happen during the migration
      to Typescript (as TS does not play nice with CJS).
      
      Basically:
      - rewrite `require()` to `import`
      - rewrite `module.exports` to `exports`
      - introduce `ts-node` to run importers so we can convert them to TS too
      
      Lastly, sorry for this larg-ish PR, not my preference but when I tried
      to reduce its scope, I would end up with mixed commons/esm that was even
      more tricky to handle.
      Unverified
      cd00da76
  6. Apr 07, 2023
  7. Mar 29, 2023
  8. Mar 21, 2023
  9. Mar 12, 2023
    • James Long's avatar
      Route aggregate queries in transaction grouped mode through the correct layer... · df8f5853
      James Long authored
      Route aggregate queries in transaction grouped mode through the correct layer to remove deleted transactions (#247)
      
      I recently migrated my personal usage of Actual over to the open-source
      version and imported a bunch of transactions. I have a _lot_ of history
      in Actual, including a lot of weird edge cases like deleted split
      transactions. While reconciling I noticed that my account balance shown
      at the top was incorrect, even though the running balance was current.
      
      Digging into this, I discovered that we aren't correctly handling
      aggregate queries when querying transactions in the "grouped" mode.
      Aggregate queries don't make sense in the "grouped" mode. Grouped means
      that you want a list of transactions that include both the parent and
      child transactions (when they are split). If you are summing up all the
      amount, you only want to consider non-parent transactions. So we switch
      it back to "inline" mode, but the way we did this previously was to
      manually stitch the query together.
      
      Even though was add SQL to ignore deleted transactions, we still
      possibly include them. A child transaction may not be marked as deleted,
      even though the parent transaction is deleted. When a parent transaction
      is deleted, all child transactions should be considered deleted as well,
      regardless of their tombstone status. This is what the
      `v_transactions_internal_alive` view does. Previously we weren't going
      through this view though, so we could still potentially include split
      transactions even though they've been deleted.
      
      This is little hacky, but it fixes the immediate problem. We fall back
      to the inline mode by modifying the where clause, and we also adjust the
      view that it queries to use the correct one.
      Unverified
      df8f5853
  10. Mar 05, 2023
  11. Feb 10, 2023
  12. Jan 25, 2023
  13. Jan 12, 2023
  14. Jan 10, 2023
  15. Jan 03, 2023
  16. Nov 13, 2022
  17. Sep 02, 2022
  18. Aug 31, 2022
  19. Aug 23, 2022
  20. Jul 24, 2022
  21. Jul 16, 2022
  22. Jun 27, 2022
  23. Apr 29, 2022
Loading