Skip to content

Update bundled terminal-notifier to 3.1.0 (universal, Apple silicon) - #461

Open
rmpel wants to merge 1 commit into
mikaelbr:masterfrom
rmpel:master
Open

rmpel wants to merge 1 commit into
mikaelbr:masterfrom
rmpel:master

Conversation

@rmpel

@rmpel rmpel commented Sep 21, 2026

Copy link
Copy Markdown

The vendored terminal-notifier 1.7.2 is an x86_64-only binary. On Apple silicon it needs Rosetta, and on macOS 27 Intel binaries no longer run at all, so node-notifier fails on every build that uses webpack-notifier, gulp-notify and friends. Fixes #361, supersedes #441.

terminal-notifier 3.x (julienXX/terminal-notifier, released August 2026) ships an official universal x86_64 + arm64 bundle built on Apple's UserNotifications framework. This commit vendors that release unchanged.

Supply chain: the bundle is the upstream GitHub release asset terminal-notifier-3.1.0.zip, SHA-256
e969d4ae20287da1ba55495ae31dcedd8e9069deb8ce4eed24f6561a5fc3e4d5. scripts/update-terminal-notifier.sh downloads it, verifies that checksum and unpacks it into vendor/mac.noindex, so anyone can reproduce and audit what is committed. codesign --verify --strict passes on the bundle.

Code changes needed for terminal-notifier 3:

  • Minimum macOS for native notifications is 10.14 (Darwin 18); utils.isMojaveOrLater() replaces isMountainLion() (kept as alias).
  • Responses are plain text instead of -json: the clicked action title, the typed reply, or @timeout / @closed / @ACTIONCLICKED. They are mapped back onto the existing { activationType, activationValue } shape, so callbacks and the click/replied/timeout events keep working. JSON output from older binaries used via customPath is still accepted.
  • Exit code 6 (timeout) is reported as a timeout, not an error.
  • -action is read from argv, one flag per button, unquoted; -reply may stand alone or take a placeholder string.
  • -appIcon and -sender are gone (the framework always uses the sending bundle's identity); they are dropped instead of producing stderr noise.
  • UNUserNotificationCenter refuses to request permission for a bundle LaunchServices has never seen, which is the case for an app inside node_modules. On that specific error the bundle is registered with lsregister once and the notification retried.

Tested on macOS 27.0 arm64 without Rosetta (plain notification, action buttons with timeout, reply with placeholder) and with the jest suite.

The vendored terminal-notifier 1.7.2 is an x86_64-only binary. On Apple
silicon it needs Rosetta, and on macOS 27 Intel binaries no longer run at
all, so node-notifier fails on every build that uses webpack-notifier,
gulp-notify and friends. Fixes mikaelbr#361, supersedes mikaelbr#441.

terminal-notifier 3.x (julienXX/terminal-notifier, released August 2026)
ships an official universal x86_64 + arm64 bundle built on Apple's
UserNotifications framework. This commit vendors that release unchanged.

Supply chain: the bundle is the upstream GitHub release asset
terminal-notifier-3.1.0.zip, SHA-256
e969d4ae20287da1ba55495ae31dcedd8e9069deb8ce4eed24f6561a5fc3e4d5.
scripts/update-terminal-notifier.sh downloads it, verifies that checksum
and unpacks it into vendor/mac.noindex, so anyone can reproduce and audit
what is committed. `codesign --verify --strict` passes on the bundle.

Code changes needed for terminal-notifier 3:

- Minimum macOS for native notifications is 10.14 (Darwin 18);
  utils.isMojaveOrLater() replaces isMountainLion() (kept as alias).
- Responses are plain text instead of -json: the clicked action title,
  the typed reply, or @timeout / @closed / @ACTIONCLICKED. They are mapped
  back onto the existing { activationType, activationValue } shape, so
  callbacks and the click/replied/timeout events keep working. JSON output
  from older binaries used via customPath is still accepted.
- Exit code 6 (timeout) is reported as a timeout, not an error.
- -action is read from argv, one flag per button, unquoted; -reply may
  stand alone or take a placeholder string.
- -appIcon and -sender are gone (the framework always uses the sending
  bundle's identity); they are dropped instead of producing stderr noise.
- UNUserNotificationCenter refuses to request permission for a bundle
  LaunchServices has never seen, which is the case for an app inside
  node_modules. On that specific error the bundle is registered with
  lsregister once and the notification retried.

Tested on macOS 27.0 arm64 without Rosetta (plain notification, action
buttons with timeout, reply with placeholder) and with the jest suite.
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.

Not working on Apple Silicon

1 participant