Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

:electron: Electron package Typescript starting point #2880

Merged
merged 51 commits into from
Jul 3, 2024

Conversation

MikesGlitch
Copy link
Contributor

@MikesGlitch MikesGlitch commented Jun 14, 2024

Sets up the desktop-electron package to use typescript. #1483

Main changes:

  • Typescript build using tsc, builds to the "build" folder
  • client-build folder is moved to the "build" folder rather than the root
  • html needs copied manually into the build folder due to tsc only dealing with typescirpt/js - using copyfiles

I haven't typed everything - I'm putting in the starting point in this PR.

The next step is to go through the electron files and convert them to typescript.

  • Tested on Linux and Windows

Copy link

netlify bot commented Jun 14, 2024

Deploy Preview for actualbudget ready!

Name Link
🔨 Latest commit d856160
🔍 Latest deploy log https://app.netlify.com/sites/actualbudget/deploys/6685ae26b5763300085b3146
😎 Deploy Preview https://deploy-preview-2880.demo.actualbudget.org
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

github-actions bot commented Jun 14, 2024

Bundle Stats — desktop-client

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files count Total bundle size % Changed
9 4.91 MB 0%

Changeset

No files were changed

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
static/js/resize-observer.js 18.37 kB 0%
static/js/indexeddb-main-thread-worker-e59fee74.js 13.5 kB 0%
static/js/usePreviewTransactions.js 790 B 0%
static/js/AppliedFilters.js 27.12 kB 0%
static/js/BackgroundImage.js 122.29 kB 0%
static/js/narrow.js 76.96 kB 0%
static/js/wide.js 273.19 kB 0%
static/js/ReportRouter.js 1.23 MB 0%
static/js/index.js 3.16 MB 0%

Copy link
Contributor

github-actions bot commented Jun 14, 2024

Bundle Stats — loot-core

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files count Total bundle size % Changed
1 1.13 MB 0%

Changeset

No files were changed

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.js 1.13 MB 0%

@MikesGlitch MikesGlitch changed the title [WIP] .:wrench: Electron app - to typescript [WIP] 🔧 Electron app - to typescript Jun 14, 2024
@MikesGlitch MikesGlitch changed the title [WIP] 🔧 Electron app - to typescript [WIP] 🔧 Electron app - typescript Jun 14, 2024
.gitignore Show resolved Hide resolved
@MikesGlitch MikesGlitch marked this pull request as ready for review June 16, 2024 22:06
@MikesGlitch MikesGlitch changed the title [WIP] 🔧 Electron app - typescript 🔧 Electron app - typescript Jun 17, 2024
@MikesGlitch MikesGlitch changed the title 🔧 Electron app - typescript 🔧 Electron app - typescript starting point Jun 17, 2024
@MikesGlitch MikesGlitch changed the title 🔧 Electron app - typescript starting point 🔧 [TS migration] Electron app - typescript starting point Jun 17, 2024
@MikesGlitch MikesGlitch force-pushed the maintenance/ts-electron branch from e78dd76 to f320dae Compare June 19, 2024 12:11
@MikesGlitch MikesGlitch changed the title 🔧 [TS migration] Electron app - typescript starting point 🔧 Electron package - typescript starting point Jun 20, 2024
@MikesGlitch MikesGlitch changed the title 🔧 Electron package - typescript starting point 🔨 Electron package - typescript starting point Jun 20, 2024
@MikesGlitch MikesGlitch changed the title 🔨 Electron package - typescript starting point 🔨 Typescript - Electron package starting point Jun 23, 2024
@MikesGlitch MikesGlitch changed the title 🔨 Typescript - Electron package starting point :electron: Electron package Typescript starting point Jun 25, 2024
.gitignore Outdated Show resolved Hide resolved
Copy link
Member

@MatissJanis MatissJanis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not able to run this locally:

...
build/static/js/ReportRouter.zdOroMmk.chunk.js              522.44 kB │ gzip: 138.70 kB │ map: 2,293.70 kB
build/static/js/index.SH_BeZNT.js                         1,255.15 kB │ gzip: 386.63 kB │ map: 6,179.37 kB
✓ built in 23.07s
/Users/matiss/repos/actual/actual/node_modules/typescript/lib/tsc.js:114129
      throw e;
      ^

RangeError: Maximum call stack size exceeded
    at isStatementKindButNotDeclarationKind (/Users/matiss/repos/actual/actual/node_modules/typescript/lib/tsc.js:11149:46)
    at isStatement (/Users/matiss/repos/actual/actual/node_modules/typescript/lib/tsc.js:11166:10)
    at visitTypeScript (/Users/matiss/repos/actual/actual/node_modules/typescript/lib/tsc.js:85779:9)
    at visitorWorker (/Users/matiss/repos/actual/actual/node_modules/typescript/lib/tsc.js:85668:14)
    at saveStateAndInvoke (/Users/matiss/repos/actual/actual/node_modules/typescript/lib/tsc.js:85633:21)
    at visitor (/Users/matiss/repos/actual/actual/node_modules/typescript/lib/tsc.js:85664:12)
    at visitNode (/Users/matiss/repos/actual/actual/node_modules/typescript/lib/tsc.js:82976:19)
    at visitEachChildOfBinaryExpression (/Users/matiss/repos/actual/actual/node_modules/typescript/lib/tsc.js:83711:26)
    at visitEachChild (/Users/matiss/repos/actual/actual/node_modules/typescript/lib/tsc.js:83226:33)
    at visitTypeScript (/Users/matiss/repos/actual/actual/node_modules/typescript/lib/tsc.js:85887:16)

Node.js v18.19.0

@MatissJanis
Copy link
Member

Deleted old client-build folder and re-ran the build script. Now it's passing. Interesting.. possibly correlated?

@MatissJanis
Copy link
Member

Ok, cannot reproduce anymore. Works great 👍

So only one comment on the PR and then we can merge :)

@MatissJanis MatissJanis merged commit 31eb00a into actualbudget:master Jul 3, 2024
20 of 22 checks passed
@github-actions github-actions bot added ✨ Merged Pull Request has been merged successfully and removed 🔍 Ready for Review labels Jul 3, 2024
@MikesGlitch MikesGlitch deleted the maintenance/ts-electron branch July 3, 2024 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Merged Pull Request has been merged successfully
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants