Skip to content

chore: 升级electron版本到41#502

Open
Particaly wants to merge 1 commit into
ZToolsCenter:mainfrom
Particaly:chore/upgrade-electron-version-to-41
Open

chore: 升级electron版本到41#502
Particaly wants to merge 1 commit into
ZToolsCenter:mainfrom
Particaly:chore/upgrade-electron-version-to-41

Conversation

@Particaly
Copy link
Copy Markdown
Collaborator

electron从38升级到了41
fix: #499,#468
对生产有影响的主要变更,待验证

模块 风险等级 原因
插件系统 极高 clipboard / CSP / preload
preload 架构 极高 Electron 安全模型持续收紧
截图录屏 macOS 权限变化
webview Chromium 持续强化隔离
popup 面板 中高 window.open 行为变化
PDF 插件 WebContents 机制变化
native addon Chromium/V8 ABI 更新
自动更新 打包格式变化
DevTools 注入 中高 WebContents 变化
DNS/代理功能 host-rules 废弃

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request upgrades Electron from version 38 to 41, which includes significant updates to the lockfile for platform-specific dependencies and the addition of Node.js 24 types. Feedback highlights the need to ensure native modules (e.g., sharp, lmdb) are recompiled for the new Electron ABI to prevent runtime crashes, particularly because automatic rebuilding is disabled in the configuration. Additionally, it is recommended to upgrade the @types/node development dependency to version 24 to maintain consistency with the Node.js version bundled with the new Electron release.

Comment thread package.json
"@vitejs/plugin-vue": "^6.0.1",
"concurrently": "^9.1.2",
"electron": "^38.1.2",
"electron": "^41.6.1",
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.

high

由于本次升级跨度较大(38 -> 41),且 electron-builder.yml 中配置了 npmRebuild: false,请务必确认构建脚本中包含针对新版本 Electron ABI 重新编译原生模块(如 sharpuiohook-napilmdb)的步骤。否则,打包后的应用在调用这些原生模块时会因 ABI 不兼容而崩溃。

Comment thread package.json
"@vitejs/plugin-vue": "^6.0.1",
"concurrently": "^9.1.2",
"electron": "^38.1.2",
"electron": "^41.6.1",
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.

medium

Electron 41.x 捆绑了 Node.js v24.x(如 pnpm-lock.yaml 所示)。目前 devDependencies 中的 @types/node 仍为 ^22.18.6(第 78 行)。这种版本不匹配可能会导致主进程代码在进行类型检查时无法识别 Node.js 24 的新特性,建议将 @types/node 同步升级到 ^24.x 以保持一致性。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] 输入框诡异移动

1 participant