Skip to content

Electron build and runtime packages current - #526

Merged
jtklein merged 11 commits into
AntonelliLab:masterfrom
jtklein-agents:spec/370-electron-build-and-runtime-packages-current
Nov 26, 2026
Merged

jtklein merged 11 commits into
AntonelliLab:masterfrom
jtklein-agents:spec/370-electron-build-and-runtime-packages-current

Conversation

@jtklein-agents

@jtklein-agents jtklein-agents commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The app looks and behaves as before. Underneath, the Electron build and runtime packages are current.

 dependencies
-  @sentry/electron 4      # IP collected on crash reports
+  @sentry/electron 8      # dataCollection.userInfo off, release raxmlGUI@<version>
-  electron-log 4
+  electron-log 5          # same log file path
-  electron-store 8
+  electron-store 12       # bundled into main, same settings file
-  patch-package, postinstall-postinstall
 devDependencies
-  electron-builder 24
+  electron-builder 26     # + electronFuses block
-  download, electron-download
+  extract-zip             # download-binaries uses Node fetch
-sentry-symbols.js

Release job (.github/workflows/build.yaml):

-on push (branch or tag), matrix mac / linux / win
+on push (branch or tag), pull_request into master, matrix mac / linux / win
-  samuelmeuli/action-electron-builder@v1
+  yarn build
+  REQUIRE_NOTARIZE = v* tag || PR from a branch in this repo
+  electron-builder --<platform> --publish <tag ? always : never>
+    mac + REQUIRE_NOTARIZE: -c.forceCodeSigning=true
   afterSign: scripts/notarize.js          # Developer ID + team guard unchanged
+    REQUIRE_NOTARIZE and no Apple ID: fail instead of skip
+  fork PR on mac: warning, built unsigned  # GitHub gives fork PRs no secrets
Build Publishes macOS signs + notarizes
v* tag yes required
PR from an AntonelliLab branch no required
PR from a fork no no, warns
other branch push no if secrets exist

BUILD.md now describes this flow: bump the version, push v<version>, then publish the draft CI made.

Electron Fuses on the packaged app: runAsNode off, NODE_OPTIONS and --inspect off, asar integrity on, load only from asar, cookie encryption on.

Children: #371 electron-builder 26, #372 release job, #373 Fuses, #374 electron-store 12, #375 electron-log 5, #376 Sentry 8, #377 install packages. Merged with current master (conflicts in package.json, src/pack.test.ts, yarn.lock).

Evidence

  • Before: electron-builder 24.13.3, electron-store 8, electron-log 4, @sentry/electron 4; branch pushes ran the unmaintained action; no electronFuses in build.
    After: on the merged branch, macOS:
    yarn lint        ✓
    yarn typecheck   ✓
    yarn test        71 files, 486 tests passed   # incl. pack.test asserting electronFuses
    yarn test:e2e    5 passed
    

Not yet proven: signing, notarizing, fuses, auto-update and Sentry delivery from a packaged build. That is the manual macOS release-candidate check, #378, still open.

Merge Danger

Door: two-way

Revert restores the old packages. Settings and log stay at the same paths, so a user who updates and then gets a reverted build keeps both.

Blast Radius: releases

The next tagged release is the first built by this job. A missing macOS certificate or Apple ID now fails a tag or same-repo PR build instead of passing unsigned or unnotarized. Every PR adds a three-OS build to CI minutes; a same-repo PR also sends a notarization request to Apple. A fused app refuses a tampered app.asar; a bad pack config would show up as an app that won't start. Run #378 before tagging.

🤖 Generated with Claude Code

jtklein-agents and others added 11 commits November 25, 2026 23:46
Bump @sentry/electron to ^8. Main init sets an explicit
raxmlGUI@<version> release (matching the source-map upload) and turns
off user info; the page init drops its dsn. IPC uses the SDK's
auto-registered preload, and the no-node e2e now asserts that
__SENTRY_IPC__ is on the page.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Bump electron-log to ^5.4.4. The main-process API used here is unchanged
and the file transport still writes main.log under app.getPath('logs').

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
electron-store 12 and conf are ESM-only, so the CommonJS main bundles
them through externalizeDeps.exclude. A 2.0.19 config.json still loads.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Remove electron-download, patch-package, postinstall-postinstall and
download, the postinstall-patch script, and sentry-symbols.js.
download-binaries now fetches the release zip with Node fetch, unpacks
it with extract-zip, removes the __MACOSX folder, and skips the download
when static/bin/<OS>/ already holds files.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Pack, sign and publish with electron-builder 26 (#371)

Pin electron-builder to ^26.18.1. The build block is unchanged.

Local macOS comparison, same commit, 24.13.3 vs 26.18.1:
- Artifact names: identical (universal dmg, universal-mac zip, blockmaps,
  latest-mac.yml); sizes within 2%.
- latest-mac.yml: same fields as the v2.0.18 release asset
  (version, files[url,sha512,size], path, sha512, releaseDate).
- static/bin and example files: same file list.
- app.asar: out/ and package.json identical; node_modules is re-hoisted
  by 26's collector (same packages, nested copies moved to top level).
  Dropped entirely: ajv@6 with uri-js, punycode, fast-json-stable-stringify
  (no runtime dependent; conf keeps ajv@8). Added: @types/parse-json,
  @types/prop-types, @types/react-transition-group.
- Resources: 26 adds LICENSE.electron.txt and LICENSES.chromium.html.
- Ad-hoc signed 26 zip passes codesign --verify --deep --strict.
- install-app-deps still runs from postinstall.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Build the Linux icon set and load the pack config under electron-builder 26

26 moved getConfig to app-builder-lib/out/util/config/config. Its icon
tool only reads PNG frames from an ICNS, and public/icon.icns holds
JPEG2000 frames, so the Linux pack failed. public/icons/ holds the PNGs
extracted from that icns (16-512), which 26 uses for Linux in place of
converting the icns.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Leave the oxc-parser native binding out of the pack

@sentry/electron 8 pulls in @sentry/bundler-plugins, whose oxc-parser
installs one native binding per host arch. electron-builder 26 stops
the universal macOS build on a .node file that is the same in the x64
and arm64 halves. Only Sentry's build-tool plugins load oxc-parser, so
the app never needs the binding.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
electron-builder sets six fuses through build.electronFuses: no
RunAsNode, no NODE_OPTIONS, no Node inspect flags, cookie encryption on,
and the app loads only from an asar that passes integrity validation.
A pack test asserts the exact block.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
#372) (#386)

* Release job on plain electron-builder steps, publishing only from tags (#372)

Replace samuelmeuli/action-electron-builder with `yarn build` and
`yarn electron-builder --<platform>` steps. Only a v* tag publishes; a
macOS tag build forces code signing. CSC_* come from mac_certs on macOS
only (empty elsewhere, which electron-builder treats as unset). The
workflow token is read-only except on the release job. mac.notarize is
off so the afterSign hook stays the one notarize path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Leave CSC_LINK unset when the macOS certificate secret is empty (#372)

electron-builder treats an empty CSC_LINK on macOS as a certificate path
and fails with "not a file". The old action only set it when non-empty.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Resolve package.json (keep both dev-dependency sets), src/pack.test.ts
(electron-builder 26 config path, upstream's typed matcher import) and
regenerate yarn.lock.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A pull_request trigger builds each PR on macOS, Ubuntu and Windows
without publishing. A macOS build from a v* tag or from a branch in
this repo sets REQUIRE_NOTARIZE: electron-builder forces code signing
and the afterSign hook fails instead of skipping when Apple ID
credentials are missing. A fork PR gets no secrets, so it builds
unsigned with a warning.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
BUILD.md described the old flow where every CI build uploaded to a
draft. Now only a v* tag publishes, to a draft named from package.json,
and tag and same-repo PR builds must sign and notarize on macOS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
electron-builder skips signing when GITHUB_BASE_REF is set, so every
pull_request run was skipped. Set CSC_FOR_PULL_REQUEST only where
REQUIRE_NOTARIZE is on: tags and PRs from this repo. A fork PR still
gets no secrets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jtklein
jtklein merged commit e1cea15 into AntonelliLab:master Nov 26, 2026
11 checks passed
@jtklein-agents
jtklein-agents deleted the spec/370-electron-build-and-runtime-packages-current branch November 26, 2026 22:49
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.

2 participants