-
Notifications
You must be signed in to change notification settings - Fork 1
Added support for linux distros as well (ubuntu 24) mainly #290
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
base: master
Are you sure you want to change the base?
Changes from 250 commits
5a17899
30705d4
8fe7891
e289df9
6e14702
c1f8a99
88de1eb
d1864d7
de4e5ba
60b16db
6567a17
ac45999
ef375dd
a383ebe
fba953c
2672201
e560e95
0e45ba7
a727c85
f3f64af
06344fb
a5a6eb1
4f3a88e
e4071b5
9bed999
2dfafbf
afab081
5719406
e0a3bdc
3f8770d
90eebad
d58e225
c68e385
11a28e1
3960b99
fec2c67
b2eb812
4fe215b
408e50d
e728621
a122e75
343963f
b6043e0
e6332f3
44a2348
ca126f1
a744808
e6aa778
16a9eea
5718029
49d84ff
28881cd
1ad96d8
b0e4ca5
bd6991e
6b32a67
20cabf1
5deea0d
a64cb97
85bc596
b08118e
4db1c16
396eef2
ea252c0
0014c0f
020ae8c
f8a8196
502ecde
51afb99
f0bb06b
80e6a9d
abc94de
4adcbd5
afbb6e6
a305891
08449a9
c411a70
3c2349a
d3443f7
edd784a
02fe38c
4216374
2e80763
079c623
12281f4
43ff936
d81f6cd
de271af
a72f7dc
737efa1
5ebf11d
c6d55c5
972fb37
830ddc0
0f19a97
6d048db
604491a
dd80dc4
f11bbd7
acc9a08
ae827b9
3f9a1fa
4d613d4
7481699
53aa573
7fe3280
902fd21
5d8617e
b21944b
e52c5ea
22385cb
9ef3e99
241fa72
2076d54
5560eec
571e403
84f7110
2c8ea95
1c90569
0407b1d
015abeb
b91bee7
2024120
eb77c71
85dc29c
e0e4898
cd9599e
eedea47
ef64a3d
0423343
b6100c7
cb1582d
b2c4839
4b80275
6d989e5
e4fe6d6
6b3bf58
4b51b87
270e04a
96b73ad
e0372be
167d347
65a570c
76db081
4488320
6963db2
09bc085
62aadbb
c37ae0e
4b1af91
d2a63d2
7bc5244
8b6a01d
a3b109a
6ef362c
aa742db
d857428
7a9ecbd
6fb9f51
33aefc4
b4860ff
2028f1f
420228c
d27f5fd
93ab39e
251acf5
a0a8bc4
fe660b6
d686b28
6d17724
1f46f7e
e637c0c
5b0d3d4
6bf60b0
258bc70
b4e7896
9e30202
c14a65f
146b0dc
83df3b1
9af8fd2
99e54ee
b149413
9dfa67f
cf09cca
851c658
afe562e
33a73d1
5209dd5
97fcf58
dbde03a
7f9546b
8f119a0
88119c8
4f9c094
5c77d44
6ab67f5
8792a9a
69e7c64
c7c266b
ef1f981
85bf3ce
509a69e
dd779de
9eaa72b
9e3d163
844f1f3
c912c4a
57f09ec
4bc9c05
1d11312
1ec2eb0
491923f
8608212
a682f99
3b32d9a
98865a9
fb37899
473a921
4a7d62e
46e14db
3e2e9da
6d043b4
02f2ffa
b2eb4e9
393786f
b3af0c8
671f4aa
5fa8af4
fc3fc50
b10e5aa
efb9827
dbd6393
be5201c
5226c34
16b3505
4b583c7
ed1755c
8028bf4
ef752df
f0d83c9
4541d73
825fbde
a0403c3
d1500e2
156d58d
74ced8b
339d766
ef700f0
3aa09ec
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,7 +17,7 @@ jobs: | |
|
|
||
| steps: | ||
| - name: Check out Git repository | ||
| uses: actions/checkout@v4 | ||
| uses: actions/checkout@v5 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Workflow uses pnpm but build script invokes Bun; add Bun setup or builds will fail Your package.json "build" script calls bun run typecheck. On windows-latest, Bun isn’t installed by default, so pnpm build will fail at runtime. Add a Bun setup step before the Build step. Proposed step (insert after Node setup, before Install Dependencies): - name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.2.xOptionally, keep pnpm for install (fine), or migrate install to Bun in a follow-up. 🤖 Prompt for AI Agents💡 Verification agent 🧩 Analysis chainVerify lockfile consistency (pnpm vs bun) to ensure caching works The workflow caches pnpm’s store via pnpm-lock.yaml. If you’ve migrated fully to Bun, pnpm-lock.yaml may be stale or absent, degrading cache effectiveness. Run this script to check which lockfiles exist: 🏁 Script executed: #!/bin/bash
# Inspect presence of pnpm and bun lockfiles and report
set -euo pipefail
found_any=0
if fd -a 'pnpm-lock.yaml' | wc -l | grep -q '^[1-9]'; then
echo "Found pnpm-lock.yaml:"
fd -a 'pnpm-lock.yaml'
found_any=1
else
echo "No pnpm-lock.yaml found."
fi
if fd -a 'bun.lockb' | wc -l | grep -q '^[1-9]'; then
echo "Found bun.lockb:"
fd -a 'bun.lockb'
found_any=1
else
echo "No bun.lockb found."
fi
if [[ $found_any -eq 0 ]]; then
echo "No known lockfiles found."
fiLength of output: 313 Lockfiles missing – caching in release.yml will always miss The release workflow’s cache step relies on a lockfile (pnpm-lock.yaml or bun.lockb) to key restores/saves, but no lockfile was detected in the repo. Without one, your CI cache will never hit, slowing down installs. Please ensure your project tracks the correct lockfile and update
File needing updates:
🤖 Prompt for AI Agents |
||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
|
|
||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| /** @type {import('./lib/types').Configuration} */ | ||
| export default { | ||
| '*': ['pnpm format', 'pnpm lint', 'tsc-files --noEmit -p tsconfig.json --composite false'] | ||
| '*': [() => 'bun run typecheck', 'bun run lint', 'bun run format'] | ||
coderabbitai[bot] marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,6 +1,6 @@ | ||||||
| { | ||||||
| "name": "treo", | ||||||
| "version": "1.1.6", | ||||||
| "version": "1.2.0", | ||||||
| "description": "An Electron application with React and TypeScript", | ||||||
| "main": "./out/main/index.js", | ||||||
| "author": "your-ehsan", | ||||||
|
|
@@ -18,14 +18,14 @@ | |||||
| "lint": "eslint . --fix", | ||||||
| "typecheck:node": "tsc --noEmit -p tsconfig.node.json --composite false", | ||||||
| "typecheck:web": "tsc --noEmit -p tsconfig.web.json --composite false", | ||||||
| "typecheck": "pnpm run typecheck:node && pnpm run typecheck:web", | ||||||
| "typecheck": "bun run typecheck:node && bun run typecheck:web", | ||||||
| "start": "electron-vite preview", | ||||||
| "dev": "electron-vite dev", | ||||||
| "build": "cross-env GENERATE_SOURCEMAP=false \"pnpm run typecheck && electron-vite build\"", | ||||||
| "rebuild:drizzle": "pnpm rebuild better-sqlite3", | ||||||
| "build": "cross-env GENERATE_SOURCEMAP=false \"bun run typecheck && electron-vite build\"", | ||||||
|
||||||
| "build": "cross-env GENERATE_SOURCEMAP=false \"bun run typecheck && electron-vite build\"", | |
| "build": "bun run typecheck && cross-env GENERATE_SOURCEMAP=false electron-vite build", |
🤖 Prompt for AI Agents
In package.json around line 24, the build script currently wraps the whole chain
in quotes so cross-env receives a single argument and GENERATE_SOURCEMAP is not
applied to the second command (breaking on Windows); remove the quotes and
ensure cross-env is applied to both commands (e.g. run cross-env
GENERATE_SOURCEMAP=false before bun run typecheck and again before electron-vite
build, separated by &&) so the env var is correctly set for each spawned
process.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Replace ‘bun rebuild’ with Electron-aware rebuild to support native modules on Linux/Win.
Bun doesn’t provide a dedicated bun rebuild for Electron-native modules; standard practice is @electron/rebuild to match Electron’s ABI (v38 here). This avoids runtime “NODE_MODULE_VERSION” mismatches for better-sqlite3 across Linux distros and Windows. (electronjs.org)
Apply:
- "rebuild:drizzle": "bun rebuild better-sqlite3",
+ "rebuild:drizzle": "electron-rebuild -f -w better-sqlite3",Also add the dev dependency:
{
"devDependencies": {
"@electron/rebuild": "^3.6.0"
}
}Note: postinstall already runs electron-builder install-app-deps, which helps rebuild; keeping an explicit script is still useful locally/CI. (electronjs.org)
🤖 Prompt for AI Agents
In package.json around line 25, the npm script uses "bun rebuild better-sqlite3"
which doesn't rebuild native modules against Electron's ABI; replace that script
with an Electron-aware rebuild command (use @electron/rebuild targeting Electron
ABI v38) and add "@electron/rebuild": "^3.6.0" to devDependencies so native
modules like better-sqlite3 are rebuilt correctly on Linux/Windows for Electron;
keep postinstall as-is but include the explicit script for local/CI usage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Use GH_TOKEN, split the command, and drop unnecessary checkout
GH_TOKENoverGITHUB_TOKENfor gh CLI.gh properations; removing it reduces surface area and speeds up the job.Additionally:
GH_TOKEN: ${{ secrets.PAT }}instead ofGITHUB_TOKEN.actions/checkout@v4step entirely since it’s not needed here.📝 Committable suggestion
🤖 Prompt for AI Agents