From 7673f5533d7b0fc2d9701e0c5ab68beb20248b0e Mon Sep 17 00:00:00 2001 From: Amit Haridas Date: Wed, 30 Sep 2026 22:21:37 +0530 Subject: [PATCH] =?UTF-8?q?fix(build):=20snap=20config=20schema=20?= =?UTF-8?q?=E2=80=94=20drop=20invalid=20'channels'=20key?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit electron-builder 26.x rejected the build with 'configuration.snap should be one of these: null' because 'channels' isn't part of the SnapOptions schema in this version (it's a snapcraft.yaml / Snap Store publish-side concept, not a build-time key). Also relocated 'desktopName' out of linux.* — the warning says to set it in package.json (done in the prior commit) and let electron-builder merge it; setting it inline under linux.* is rejected by the schema too. What actually silences the warning now: - package.json: 'desktopName': 'MarkdownConverter' so Electron sets the same WM_CLASS on the X11/Wayland window. - electron-builder.config.js: 'syncDesktopName: true' inside linux.* so the generated .desktop file's StartupWMClass matches. - electron-builder.config.js: 'snap: { confinement, grade }' at the top level using the valid keys only. Verified by a fresh linux build producing all three artifacts (deb, AppImage, snap) without warnings or schema errors. Amit Haridas --- electron-builder.config.js | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/electron-builder.config.js b/electron-builder.config.js index 5a1bd6f..b33257e 100644 --- a/electron-builder.config.js +++ b/electron-builder.config.js @@ -125,19 +125,21 @@ module.exports = { category: 'Utility', maintainer: 'ConcreteInfo ', extraFiles: toolExtraFiles('linux'), - // v4.13.0 — set desktopName + sync so installed .desktop entry uses - // a stable WM_CLASS / app_id, otherwise DEs cannot link the running - // window to the launcher icon (electron-builder warning at pack time). - desktopName: 'MarkdownConverter', + // v4.13.0 — keep the generated .desktop file's StartupWMClass in sync + // with the top-level desktopName in package.json so DEs can link the + // running window to the launcher icon. desktopName itself is read + // from package.json (electron-builder merges package.json fields into + // the linux config automatically). syncDesktopName: true, - // Snap channel: latest/edge tracks the auto-updater feed on GitHub - // releases. `stable` would publish to a manually-managed channel and - // break the electron-updater handshake. - snap: { - confinement: 'strict', - grade: 'stable', - channels: ['latest/edge'], - }, + }, + // v4.13.0 — Snap packaging defaults. `grade: stable` is required for + // the auto-updater to push updates to the stable track from GitHub + // releases (electron-updater expects stable-grade snaps). We let + // snapcraft pick its default channel set — the publish-side channels + // live in `snapcraft.yaml` / the Snap Store, not in this config. + snap: { + confinement: 'strict', + grade: 'stable', }, deb: { depends: ['imagemagick', 'libreoffice-common'],