[PR #4163] [MERGED] 🔧 (typescript) change moduleResolution to bundler #5226

Closed
opened 2026-02-28 21:08:32 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/4163
Author: @MatissJanis
Created: 1/15/2025
Status: Merged
Merged: 1/16/2025
Merged by: @MatissJanis

Base: masterHead: matiss/module-resolution


📝 Commits (2)

  • ac05279 🔧 (typescript) change moduleResolution to bundler
  • 9b20940 Some reverts unfortunatelly

📊 Changes

26 files changed (+58 additions, -60 deletions)

View changed files

📝 packages/api/tsconfig.dist.json (+2 -1)
📝 packages/crdt/tsconfig.dist.json (+1 -0)
📝 packages/desktop-client/src/components/Notes.tsx (+2 -2)
📝 packages/desktop-client/src/components/Titlebar.tsx (+2 -2)
📝 packages/desktop-client/src/components/common/Block.tsx (+3 -1)
📝 packages/desktop-client/src/components/common/Button.tsx (+2 -7)
📝 packages/desktop-client/src/components/common/InlineField.tsx (+3 -1)
📝 packages/desktop-client/src/components/common/Input.tsx (+1 -2)
📝 packages/desktop-client/src/components/common/InputWithContent.tsx (+2 -7)
📝 packages/desktop-client/src/components/common/Link.tsx (+1 -2)
📝 packages/desktop-client/src/components/common/Paragraph.tsx (+3 -1)
📝 packages/desktop-client/src/components/common/Text.tsx (+2 -1)
📝 packages/desktop-client/src/components/common/View.tsx (+3 -6)
📝 packages/desktop-client/src/components/forms.tsx (+2 -6)
📝 packages/desktop-client/src/components/modals/EnvelopeBudgetMonthMenuModal.tsx (+2 -2)
📝 packages/desktop-client/src/components/modals/TrackingBudgetMonthMenuModal.tsx (+2 -2)
📝 packages/desktop-client/src/components/reports/graphs/NetWorthGraph.tsx (+2 -2)
📝 packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTable.tsx (+1 -1)
📝 packages/desktop-client/src/components/select/DateSelect.tsx (+1 -2)
📝 packages/desktop-client/src/components/settings/UI.tsx (+2 -2)

...and 6 more files

📄 Description

Changed moduleResolution to bundler. This will allow us to extract the common components into a separate component library that can then be re-used in plugins.

The change of moduleResolution exposed some issues with our current usage of React.CSSProperties. Namely: we are using properties that do not exist in this type, but there were no warnings about this.

There are a couple of potential solutions. Some described here: https://mattrossman.com/2024/01/19/css-variables-with-react-and-typescript

However, I think in the end we will need to bite the bullet and move away from @emotion/css which will also require many type changes. So it will be much easier to do this if we fully control the CSSProperties type. Hence why I extracted it into our codebase. It's definitely not perfect (as it currently is super loose).. but it's a starting point...

ps. - I don't plan to continue working on the CSS tangent. Focusing now on the shared component library and helping the plugins initiative.


🔄 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/4163 **Author:** [@MatissJanis](https://github.com/MatissJanis) **Created:** 1/15/2025 **Status:** ✅ Merged **Merged:** 1/16/2025 **Merged by:** [@MatissJanis](https://github.com/MatissJanis) **Base:** `master` ← **Head:** `matiss/module-resolution` --- ### 📝 Commits (2) - [`ac05279`](https://github.com/actualbudget/actual/commit/ac05279eaed952deb897567a4e547156bd94bfc8) :wrench: (typescript) change moduleResolution to bundler - [`9b20940`](https://github.com/actualbudget/actual/commit/9b209403b1eb85202619d8d001333da3f9de9f36) Some reverts unfortunatelly ### 📊 Changes **26 files changed** (+58 additions, -60 deletions) <details> <summary>View changed files</summary> 📝 `packages/api/tsconfig.dist.json` (+2 -1) 📝 `packages/crdt/tsconfig.dist.json` (+1 -0) 📝 `packages/desktop-client/src/components/Notes.tsx` (+2 -2) 📝 `packages/desktop-client/src/components/Titlebar.tsx` (+2 -2) 📝 `packages/desktop-client/src/components/common/Block.tsx` (+3 -1) 📝 `packages/desktop-client/src/components/common/Button.tsx` (+2 -7) 📝 `packages/desktop-client/src/components/common/InlineField.tsx` (+3 -1) 📝 `packages/desktop-client/src/components/common/Input.tsx` (+1 -2) 📝 `packages/desktop-client/src/components/common/InputWithContent.tsx` (+2 -7) 📝 `packages/desktop-client/src/components/common/Link.tsx` (+1 -2) 📝 `packages/desktop-client/src/components/common/Paragraph.tsx` (+3 -1) 📝 `packages/desktop-client/src/components/common/Text.tsx` (+2 -1) 📝 `packages/desktop-client/src/components/common/View.tsx` (+3 -6) 📝 `packages/desktop-client/src/components/forms.tsx` (+2 -6) 📝 `packages/desktop-client/src/components/modals/EnvelopeBudgetMonthMenuModal.tsx` (+2 -2) 📝 `packages/desktop-client/src/components/modals/TrackingBudgetMonthMenuModal.tsx` (+2 -2) 📝 `packages/desktop-client/src/components/reports/graphs/NetWorthGraph.tsx` (+2 -2) 📝 `packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTable.tsx` (+1 -1) 📝 `packages/desktop-client/src/components/select/DateSelect.tsx` (+1 -2) 📝 `packages/desktop-client/src/components/settings/UI.tsx` (+2 -2) _...and 6 more files_ </details> ### 📄 Description Changed `moduleResolution` to `bundler`. This will allow us to extract the common components into a separate component library that can then be re-used in plugins. The change of `moduleResolution` exposed some issues with our current usage of `React.CSSProperties`. Namely: we are using properties that do not exist in this type, but there were no warnings about this. There are a couple of potential solutions. Some described here: https://mattrossman.com/2024/01/19/css-variables-with-react-and-typescript However, I think in the end we will need to bite the bullet and move away from `@emotion/css` which will also require many type changes. So it will be much easier to do this if we fully control the `CSSProperties` type. Hence why I extracted it into our codebase. It's definitely not perfect (as it currently is super loose).. but it's a starting point... ps. - I don't plan to continue working on the CSS tangent. Focusing now on the shared component library and helping the plugins initiative. --- <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 21:08:32 -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#5226