mirror of
https://gh-proxy.org/https://github.com/klinsmaya/multica.git
synced 2026-11-11 02:46:45 +08:00
* fix(web): pin Dockerfile.web to node:22.23.4-alpine for Oct 2026 Node security release (MUL-8149) Co-authored-by: multica-agent <[email protected]> * fix(desktop): upgrade Electron 39 (EOL) to 44.9.3 (MUL-8149) Electron 39 is end-of-life and will not receive the 2026-10-21 Node.js security fixes. 44.x is a supported line (Node 24.22.0, Chromium 152). clipboard.writeText now returns a Promise in Electron 44; handle the rejection in the context menu so it can't become an unhandled rejection. Co-authored-by: multica-agent <[email protected]> * fix(desktop): skip auto-update on macOS 12 and older (MUL-8149) Electron 44 requires macOS 13 (Darwin 22), but electron-builder does not publish minimumSystemVersion in latest-mac.yml, so electron-updater would download and install a build that cannot launch on macOS 12, replacing a working app. Disable background checks/downloads on those hosts and make a manual check report the OS requirement instead. Co-authored-by: multica-agent <[email protected]> * fix(desktop): publish macOS update floor in update metadata (MUL-8149) Review feedback: installed macOS 12 clients run their old updater code, so a runtime check in the new build can never stop them from downloading an Electron 44 build that cannot launch. The guard has to live in the published latest-mac.yml / latest-x64-mac.yml. - beforePack hook (scripts/mac-update-floor.cjs) adds minimumSystemVersion: 22.0.0 (Darwin kernel, = macOS 13) to the mac releaseInfo that electron-builder spreads into update info. The config schema rejects the key, so it is set on the packager after validation; the hook throws if those internals move. - mac.minimumSystemVersion: 13.0.0 for every mac bundle; drop the stale Intel-only 12.0.0 override in package.mjs. - Regression test runs electron-updater 6.8.3's real checkIfUpdateSupported against the published shape: Darwin 21 skips, 22/25 update; no floor or a 13.0.0 floor would let Darwin 21 through. - Revert the in-app updater.ts guard: it is unreachable on macOS 12. Co-authored-by: multica-agent <[email protected]> --------- Co-authored-by: Multica Eve <[email protected]> Co-authored-by: multica-agent <[email protected]>
41 lines
2.0 KiB
JavaScript
41 lines
2.0 KiB
JavaScript
// electron-builder `beforePack` hook: publish a macOS floor in the update
|
|
// metadata (latest-mac.yml / latest-x64-mac.yml).
|
|
//
|
|
// Why this exists: Electron 44+ cannot launch on macOS 12. Installed clients
|
|
// decide whether to download an update with the code they ALREADY run, so a
|
|
// runtime check inside the new app can never protect a macOS 12 user — only
|
|
// the published metadata can. electron-updater skips an update when
|
|
// `os.release()` (the Darwin kernel version, not the marketing version) is
|
|
// below `minimumSystemVersion`, but electron-builder 26 never writes that field
|
|
// and its config schema rejects it under `mac.releaseInfo`.
|
|
//
|
|
// electron-builder spreads `packager.platformSpecificBuildOptions.releaseInfo`
|
|
// into every update-info file it generates for that platform, and reads it
|
|
// after config validation. Setting it here, before packing, puts the floor
|
|
// into both macOS channels before anything is uploaded.
|
|
//
|
|
// Darwin 22 = macOS 13 Ventura. Do NOT write "13.0.0": it is compared against
|
|
// the kernel version, so Darwin 21 (macOS 12) would pass a 13.0.0 floor.
|
|
const MAC_UPDATE_MIN_DARWIN_VERSION = "22.0.0";
|
|
|
|
function applyMacUpdateFloor(context) {
|
|
if (context.electronPlatformName !== "darwin") return;
|
|
const options = context.packager && context.packager.platformSpecificBuildOptions;
|
|
if (options == null || typeof options !== "object") {
|
|
// Fail the build rather than silently publishing metadata without the floor.
|
|
throw new Error(
|
|
"[mac-update-floor] packager.platformSpecificBuildOptions is unavailable; " +
|
|
"electron-builder internals changed — cannot publish minimumSystemVersion",
|
|
);
|
|
}
|
|
options.releaseInfo = {
|
|
...(options.releaseInfo || {}),
|
|
minimumSystemVersion: MAC_UPDATE_MIN_DARWIN_VERSION,
|
|
};
|
|
}
|
|
|
|
module.exports = applyMacUpdateFloor;
|
|
module.exports.default = applyMacUpdateFloor;
|
|
module.exports.applyMacUpdateFloor = applyMacUpdateFloor;
|
|
module.exports.MAC_UPDATE_MIN_DARWIN_VERSION = MAC_UPDATE_MIN_DARWIN_VERSION;
|