From 8c41896a2386cc661aba6913d97e6edb8f081ec0 Mon Sep 17 00:00:00 2001 From: Sergio Padrino Date: Thu, 2 Jun 2022 18:35:51 +0200 Subject: [PATCH 1/3] Merge pull request #14719 from desktop/test-fix-high-sierra Fix crash on High Sierra --- app/package.json | 2 +- app/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/package.json b/app/package.json index 227602698d5..eb03c80d9f4 100644 --- a/app/package.json +++ b/app/package.json @@ -26,7 +26,7 @@ "codemirror-mode-elixir": "^1.1.2", "compare-versions": "^3.6.0", "deep-equal": "^1.0.1", - "desktop-notifications": "^0.2.0", + "desktop-notifications": "^0.2.1", "desktop-trampoline": "desktop/desktop-trampoline#v0.9.8", "dexie": "^2.0.0", "dompurify": "^2.3.3", diff --git a/app/yarn.lock b/app/yarn.lock index 1b74232ad66..2def93e2099 100644 --- a/app/yarn.lock +++ b/app/yarn.lock @@ -363,10 +363,10 @@ delegates@^1.0.0: resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= -desktop-notifications@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/desktop-notifications/-/desktop-notifications-0.2.0.tgz#8ec6d732671d42e9aa4dac4523a2a57806c9e210" - integrity sha512-6puOHRkSHmH1HpQDftFtpJU+ko7gw1vtSlf2LViJX+sY2N+9pVuYO85HjTlpktHDSVKvDnFGhPVAoZmjXIvo/Q== +desktop-notifications@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/desktop-notifications/-/desktop-notifications-0.2.1.tgz#ff934e45ef6b47cfbbd6c596c759fc91b96ab753" + integrity sha512-ssB7SYsWlVgFCN/4KE5QIHM1hH4PXGHmlIYpUa4xR7WDHcjMEU6vrnrAFWx9SnPLVkCNDiWRwSDejlS1VF9BHw== dependencies: node-addon-api "^5.0.0" prebuild-install "^7.0.1" From 8331262e1ccd73388fad7fc5dab7588112f4c177 Mon Sep 17 00:00:00 2001 From: Sergio Padrino Date: Mon, 6 Jun 2022 16:10:42 +0200 Subject: [PATCH 2/3] Merge pull request #14733 from tsvetilian-ty/fix-leaked-process Fix leaked background process on Windows --- app/package.json | 2 +- app/src/main-process/app-window.ts | 6 +++++- app/src/main-process/notifications.ts | 5 +++++ app/yarn.lock | 8 ++++---- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/app/package.json b/app/package.json index eb03c80d9f4..6db9a3e314d 100644 --- a/app/package.json +++ b/app/package.json @@ -26,7 +26,7 @@ "codemirror-mode-elixir": "^1.1.2", "compare-versions": "^3.6.0", "deep-equal": "^1.0.1", - "desktop-notifications": "^0.2.1", + "desktop-notifications": "^0.2.2", "desktop-trampoline": "desktop/desktop-trampoline#v0.9.8", "dexie": "^2.0.0", "dompurify": "^2.3.3", diff --git a/app/src/main-process/app-window.ts b/app/src/main-process/app-window.ts index 40c34459459..5d033675304 100644 --- a/app/src/main-process/app-window.ts +++ b/app/src/main-process/app-window.ts @@ -21,7 +21,10 @@ import * as path from 'path' import windowStateKeeper from 'electron-window-state' import * as ipcMain from './ipc-main' import * as ipcWebContents from './ipc-webcontents' -import { installNotificationCallback } from './notifications' +import { + installNotificationCallback, + terminateDesktopNotifications, +} from './notifications' export class AppWindow { private window: Electron.BrowserWindow @@ -107,6 +110,7 @@ export class AppWindow { } nativeTheme.removeAllListeners() autoUpdater.removeAllListeners() + terminateDesktopNotifications() }) if (__WIN32__) { diff --git a/app/src/main-process/notifications.ts b/app/src/main-process/notifications.ts index 680575cdc40..98717e04d04 100644 --- a/app/src/main-process/notifications.ts +++ b/app/src/main-process/notifications.ts @@ -1,6 +1,7 @@ import { initializeNotifications, onNotificationEvent, + terminateNotifications, } from 'desktop-notifications' import { BrowserWindow } from 'electron' import { findToastActivatorClsid } from '../lib/find-toast-activator-clsid' @@ -35,6 +36,10 @@ export function initializeDesktopNotifications() { initializeNotifications({ toastActivatorClsid: windowsToastActivatorClsid }) } +export function terminateDesktopNotifications() { + terminateNotifications() +} + export function installNotificationCallback(window: BrowserWindow) { onNotificationEvent((event, id, userInfo) => { ipcWebContents.send( diff --git a/app/yarn.lock b/app/yarn.lock index 2def93e2099..5b0c6db1e3e 100644 --- a/app/yarn.lock +++ b/app/yarn.lock @@ -363,10 +363,10 @@ delegates@^1.0.0: resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= -desktop-notifications@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/desktop-notifications/-/desktop-notifications-0.2.1.tgz#ff934e45ef6b47cfbbd6c596c759fc91b96ab753" - integrity sha512-ssB7SYsWlVgFCN/4KE5QIHM1hH4PXGHmlIYpUa4xR7WDHcjMEU6vrnrAFWx9SnPLVkCNDiWRwSDejlS1VF9BHw== +desktop-notifications@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/desktop-notifications/-/desktop-notifications-0.2.2.tgz#197a32ee504a894ad074793dab285681c533e5ac" + integrity sha512-XMnxdWV6ZfiCzLZNC00n6h30Jt3z8yv21FAPBt/kK6hANI0PaoYWsRKEYya0zMUAX/9lrh429R5OtRGOKWZQSw== dependencies: node-addon-api "^5.0.0" prebuild-install "^7.0.1" From 11fd584c3943369cfe467e20b2df58f44f27034a Mon Sep 17 00:00:00 2001 From: Sergio Padrino Date: Thu, 9 Jun 2022 16:32:32 +0200 Subject: [PATCH 3/3] Bump changelog and version to 3.0.2 --- app/package.json | 2 +- changelog.json | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/package.json b/app/package.json index 6db9a3e314d..8a11ea27a52 100644 --- a/app/package.json +++ b/app/package.json @@ -3,7 +3,7 @@ "productName": "GitHub Desktop", "bundleID": "com.github.GitHubClient", "companyName": "GitHub, Inc.", - "version": "3.0.1", + "version": "3.0.2", "main": "./main.js", "repository": { "type": "git", diff --git a/changelog.json b/changelog.json index d4678086038..4903f7c1071 100644 --- a/changelog.json +++ b/changelog.json @@ -1,5 +1,9 @@ { "releases": { + "3.0.2": [ + "[Fixed] Fix crash launching the app on macOS High Sierra - #14712", + "[Fixed] Terminate all GitHub Desktop processes on Windows when the app is closed - #14733. Thanks @tsvetilian-ty!" + ], "3.0.1": [ "[Added] Add support for PyCharm Community Edition on Windows - #14411. Thanks @tsvetilian-ty!", "[Added] Add support for highlighting .mjs/.cjs/.mts/.cts files as JavaScript/TypeScript - #14481. Thanks @j-f1!",