[PR #816] [MERGED] Start Typescript inception #57001

Closed
opened 2026-05-06 20:55:18 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/816
Author: @albertogasparin
Created: 3/26/2023
Status: Merged
Merged: 3/28/2023
Merged by: @j-f1

Base: masterHead: chore/allow-ts-inception


📝 Commits (4)

  • 9744993 Allow TS inception
  • 913a7ec Add loot core migration example
  • 4679849 Merge branch 'master' into chore/allow-ts-inception
  • 1638161 Release notes

📊 Changes

16 files changed (+127 additions, -21 deletions)

View changed files

.github/workflows/typecheck.yml (+18 -0)
📝 package.json (+3 -1)
📝 packages/desktop-client/config-overrides.js (+10 -7)
📝 packages/desktop-client/src/util/withThemeColor.tsx (+0 -0)
📝 packages/loot-core/.babelrc (+2 -2)
📝 packages/loot-core/jest.config.js (+1 -0)
📝 packages/loot-core/jest.web.config.js (+9 -1)
📝 packages/loot-core/package.json (+1 -0)
📝 packages/loot-core/src/client/reducers/prefs.js (+1 -1)
📝 packages/loot-core/src/shared/util.ts (+6 -1)
📝 packages/loot-core/webpack/webpack.api.config.js (+12 -1)
📝 packages/loot-core/webpack/webpack.browser.config.js (+11 -3)
📝 packages/loot-core/webpack/webpack.desktop.config.js (+9 -1)
📝 tsconfig.json (+15 -2)
upcoming-release-notes/816.md (+6 -0)
📝 yarn.lock (+23 -1)

📄 Description

There were a couple of tentatives to move to Typescript ( #577 ), but given my experience migrating large codebases, I'm suggesting a different approach. Rather than requiring TS specific libs and converting entry points, we can mix and match starting from leaf nodes and using tsc as separate type-only check. My recommendation to get to the bottom of it is:

  1. merge this, so builds and tests can accept ts/tsx files without problems
  2. start renaming files from js to ts/tsx . If we just rename files without touching too much code git will maintain history (that is the reason why strict is false for now and I've included a renamed file here as proof)
  3. after merging the rename, optionally fix the types using yarn typecheck command
  4. Once we have renamed all the things, we can turn on strict, do another pass of type fixes and make the typecheck job required.

I've also added a new CI job to typecheck, so we can keep an eye on the errors and once we have strict enabled we can make it mandatory. Unless you have specific requirements, I'd also keep typechecking and builds as separate tasks, as that enables moving to faster bundlers in future.


🔄 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/816 **Author:** [@albertogasparin](https://github.com/albertogasparin) **Created:** 3/26/2023 **Status:** ✅ Merged **Merged:** 3/28/2023 **Merged by:** [@j-f1](https://github.com/j-f1) **Base:** `master` ← **Head:** `chore/allow-ts-inception` --- ### 📝 Commits (4) - [`9744993`](https://github.com/actualbudget/actual/commit/97449934fff5f9a57e1a209dc2fd55cffb65a2dc) Allow TS inception - [`913a7ec`](https://github.com/actualbudget/actual/commit/913a7ec27d95938bd6e222f75cc6e96dd59103c7) Add loot core migration example - [`4679849`](https://github.com/actualbudget/actual/commit/46798494f5239a62b8147bc3afde5f4fff6b8232) Merge branch 'master' into chore/allow-ts-inception - [`1638161`](https://github.com/actualbudget/actual/commit/1638161f0319718c69e820bc7762b182e1d28d01) Release notes ### 📊 Changes **16 files changed** (+127 additions, -21 deletions) <details> <summary>View changed files</summary> ➕ `.github/workflows/typecheck.yml` (+18 -0) 📝 `package.json` (+3 -1) 📝 `packages/desktop-client/config-overrides.js` (+10 -7) 📝 `packages/desktop-client/src/util/withThemeColor.tsx` (+0 -0) 📝 `packages/loot-core/.babelrc` (+2 -2) 📝 `packages/loot-core/jest.config.js` (+1 -0) 📝 `packages/loot-core/jest.web.config.js` (+9 -1) 📝 `packages/loot-core/package.json` (+1 -0) 📝 `packages/loot-core/src/client/reducers/prefs.js` (+1 -1) 📝 `packages/loot-core/src/shared/util.ts` (+6 -1) 📝 `packages/loot-core/webpack/webpack.api.config.js` (+12 -1) 📝 `packages/loot-core/webpack/webpack.browser.config.js` (+11 -3) 📝 `packages/loot-core/webpack/webpack.desktop.config.js` (+9 -1) 📝 `tsconfig.json` (+15 -2) ➕ `upcoming-release-notes/816.md` (+6 -0) 📝 `yarn.lock` (+23 -1) </details> ### 📄 Description There were a couple of tentatives to move to Typescript ( #577 ), but given my experience migrating large codebases, I'm suggesting a different approach. Rather than requiring TS specific libs and converting entry points, we can mix and match starting from leaf nodes and using `tsc` as separate type-only check. My recommendation to get to the bottom of it is: 1. merge this, so builds and tests can accept ts/tsx files without problems 2. start renaming files from js to ts/tsx . If we **just** rename files without touching too much code git will maintain history (that is the reason why `strict` is false for now and I've included a renamed file here as proof) 3. after merging the rename, optionally fix the types using `yarn typecheck` command 4. Once we have renamed all the things, we can turn on `strict`, do another pass of type fixes and make the typecheck job required. I've also added a new CI job to typecheck, so we can keep an eye on the errors and once we have `strict` enabled we can make it mandatory. Unless you have specific requirements, I'd also keep typechecking and builds as separate tasks, as that enables moving to faster bundlers in future. --- <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-05-06 20:55:18 -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#57001