Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions apps/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"@monaco-editor/react": "^4.7.0",
"@radix-ui/react-dialog": "^1.1.15",
"@radix-ui/react-label": "^2.1.8",
"@sentry/electron": "^7.5.0",
"@sentry/electron": "^7.7.0",
"@superset/auth": "workspace:*",
"@superset/db": "workspace:*",
"@superset/local-db": "workspace:*",
Expand Down Expand Up @@ -103,7 +103,7 @@
"@xterm/headless": "^6.0.0",
"@xterm/xterm": "^6.0.0",
"better-auth": "1.4.17",
"better-sqlite3": "12.5.0",
"better-sqlite3": "12.6.2",
"bindings": "^1.5.0",
"clsx": "^2.1.1",
"culori": "^4.0.2",
Expand All @@ -112,7 +112,7 @@
"dnd-core": "^16.0.1",
"dotenv": "^17.2.3",
"drizzle-orm": "0.45.1",
"electron-updater": "6",
"electron-updater": "^6.7.3",
"execa": "^9.6.0",
"express": "^5.1.0",
"fast-glob": "^3.3.3",
Expand All @@ -132,9 +132,10 @@
"monaco-editor": "^0.55.1",
"nanoid": "^5.1.6",
"node-addon-api": "^7.1.0",
"node-pty": "1.1.0-beta30",
"node-pty": "1.1.0",
"os-locale": "^6.0.2",
"pidtree": "^0.6.0",
"prebuild-install": "^7.1.1",
"posthog-js": "1.310.1",
"posthog-node": "^5.24.7",
"react": "19.1.0",
Expand Down Expand Up @@ -185,8 +186,8 @@
"bun-types": "^1.3.1",
"code-inspector-plugin": "^1.2.2",
"cross-env": "^10.0.0",
"electron": "39.1.2",
"electron-builder": "^26.0.12",
"electron": "40.0.0",
"electron-builder": "^26.4.0",
Comment on lines +189 to +190
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

Electron 40 release notes breaking changes

💡 Result:

Electron v40.0.0 breaking changes (per official release notes / breaking-changes docs):

  • Deprecated: Using the clipboard API directly from renderer processes. If you need clipboard from a renderer, move the call to a preload and expose it via contextBridge. [1][2]
  • Behavior change (debug symbols): macOS dSYM artifacts switched from dsym.zip to dsym.tar.xz (xz compression) to support larger files; tooling that downloads/consumes Electron dSYMs may need to handle .tar.xz. [1][2]

Sources: [1] Electron v40.0.0 release notes, [2] Electron “Breaking Changes” (Planned Breaking API Changes 40.0).


🌐 Web query:

Electron 40 Node 22.15 native module compatibility

💡 Result:

Electron 40.0.0 ships with Node.js 24.11.1, not Node 22.15.0. So a native addon binary built against Node 22.15.0’s Node-ABI (NODE_MODULE_VERSION) generally will not load in Electron 40—you must use an Electron-40 build (or rebuild from source) of the module. [1][2]

What to do:

  • If the module uses Node-ABI (most node-gyp addons): rebuild it for Electron 40 (recommended tool: @electron/rebuild). Electron explicitly requires native modules be recompiled for Electron’s ABI. [2][3]
  • If the module uses N-API (“napi” builds): it’s often portable across Node/Electron versions. Node 22.15.0 reports N-API v127, and a N-API addon built for a given N-API version typically works on runtimes that support that version. Still, prefer Electron-specific prebuilds when available, or rebuild if you hit load/link errors. [4][2]

If you specifically need Node 22.15 compatibility, that corresponds to older Electron nightlies/branches, not Electron 40 stable. (Electron 40 stable is already on Node 24.) [1]

Sources: Electron 40 release metadata (Node 24.11.1) [1]; Electron native module ABI guidance [2]; @electron/rebuild purpose [3]; Node 22.15.0 N-API version [4].


🌐 Web query:

better-sqlite3 node-pty Electron 40 compatibility

💡 Result:

Electron 40.0.0 (released Jan 13, 2026) ships with Node.js 24.11.1 (plus Chromium 144 / V8 14.4). That means native addons must be rebuilt (or have prebuilds) targeting Electron 40’s ABI, not your system Node. [1][2][3]

better-sqlite3 ↔ Electron 40

  • Electron 40’s embedded Node 24 generally requires better-sqlite3 v12.x (older major versions won’t load/build against newer Node ABIs). Community tracking around Node 24 support also notes that early v12.0.0 had missing prebuilds in some cases—so prefer v12.1.0+ if you want the best chance of available prebuilds. [4][5]
  • If you don’t get a matching prebuild for Electron 40, rebuild it for Electron (not Node) using @electron/rebuild (Electron docs recommend this approach for native modules). [6]

node-pty ↔ Electron 40

  • node-pty is also a native addon, so it has the same rule: it must be compiled for Electron’s ABI. (Upstream notes Node/Electron minimums and expects builds aligned with the Electron/VS Code toolchain.) [7]
  • If you want prebuilt binaries, a common approach is switching from node-pty to @homebridge/node-pty-prebuilt-multiarch; it downloads a matching prebuild when available and otherwise falls back to building via node-gyp. Whether Electron 40 prebuilds exist depends on that package’s release artifacts, but the fallback build path is built-in. [8][9]

Practical compatibility checklist (Electron 40)

  1. Pin/upgrade native deps:
    • better-sqlite3: >= 12.1.0 (often safest for Node 24-era builds/prebuilds). [4][5]
    • node-pty: either rebuild from source for Electron 40, or consider the Homebridge prebuilt fork. [6][8][9]
  2. Ensure your install/CI runs an Electron-native rebuild step (e.g. @electron/rebuild) so packaged apps don’t ship Node-built .node binaries. [6]

Sources: Electron 40 release details [1][2][3], Electron native module rebuild guidance [6], better-sqlite3 Node 24/prebuild context [4][5], node-pty / prebuilt fork behavior [7][8][9].


Ensure native modules are rebuilt for Electron 40 (Node 24.11.1), and verify clipboard API usage.

Electron 40.0.0 ships with Node 24.11.1 (not 22.15). Both better-sqlite3 (v12.6.2) and node-pty (v1.1.0) must be rebuilt against Electron 40's native ABI—prebuilt binaries for Node 22 will not load. Use @electron/rebuild during packaging to ensure bundled modules target Electron's runtime.

Additionally, verify that the application does not use the clipboard API directly from renderer processes; this is now deprecated in Electron 40 and must be moved to a preload script exposed via contextBridge.

🤖 Prompt for AI Agents
In `@apps/desktop/package.json` around lines 188 - 189, Update packaging to
rebuild native modules for Electron 40: add an `@electron/rebuild` step (or enable
electron-builder's "npmRebuild" / "asarUnpack" workflow) so native modules like
better-sqlite3 (v12.6.2) and node-pty (v1.1.0) are rebuilt against Electron 40 /
Node 24.11.1 before bundling; ensure your build script that runs when
"electron": "40.0.0" is used invokes `@electron/rebuild` or equivalent. Also audit
renderer code for direct use of clipboard and move clipboard access into a
preload script exposed via contextBridge (replace direct renderer calls with an
ipc/contextBridge wrapper) so clipboard is not accessed from renderer processes.

"electron-extension-installer": "^2.0.0",
"electron-vite": "^4.0.0",
"rimraf": "^6.0.1",
Expand Down
2 changes: 1 addition & 1 deletion biome.jsonc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://biomejs.dev/schemas/2.3.12/schema.json",
"$schema": "https://biomejs.dev/schemas/2.3.14/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
Expand Down
Loading
Loading