From d982311050c25945bdf87fef227a53bf2461c3e5 Mon Sep 17 00:00:00 2001 From: Rajiv Shah Date: Tue, 9 Jan 2024 13:49:15 -0500 Subject: [PATCH] chore: Update to @electron/notarize for new notarytool (#7678) --- packages/desktop/electron-builder-config.js | 2 +- packages/desktop/package.json | 2 +- packages/desktop/scripts/notarize.macos.js | 7 +++---- yarn.lock | 17 +++++++++-------- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/desktop/electron-builder-config.js b/packages/desktop/electron-builder-config.js index 71f5581be82..02d722ce765 100644 --- a/packages/desktop/electron-builder-config.js +++ b/packages/desktop/electron-builder-config.js @@ -12,7 +12,7 @@ const prodConfig = () => ({ afterSign: async () => { // eslint-disable-next-line no-useless-catch try { - await notarize(APP_ID, getAppName()) + await notarize(getAppName()) } catch (err) { // This catch is necessary or the promise rejection is swallowed throw err diff --git a/packages/desktop/package.json b/packages/desktop/package.json index b55a47dd980..82a7ddaa0d1 100644 --- a/packages/desktop/package.json +++ b/packages/desktop/package.json @@ -42,6 +42,7 @@ "url": "^0.11.0" }, "devDependencies": { + "@electron/notarize": "^2.1.0", "@sentry/webpack-plugin": "^1.18.5", "@tsconfig/svelte": "^4.0.1", "@types/webpack": "^5.28.1", @@ -50,7 +51,6 @@ "css-loader": "^6.7.3", "electron": "22.3.27", "electron-builder": "^24.0.0", - "electron-notarize": "^1.0.0", "esbuild-loader": "^4.0.2", "lodash.merge": "^4.6.2", "mini-css-extract-plugin": "^2.7.6", diff --git a/packages/desktop/scripts/notarize.macos.js b/packages/desktop/scripts/notarize.macos.js index 19fa25406d5..984975042ae 100644 --- a/packages/desktop/scripts/notarize.macos.js +++ b/packages/desktop/scripts/notarize.macos.js @@ -1,4 +1,4 @@ -const { notarize } = require('electron-notarize') +const { notarize } = require('@electron/notarize') const path = require('path') /** @@ -6,7 +6,7 @@ const path = require('path') * @param {string} appName * @returns void */ -module.exports = async (appBundleId, appName) => { +module.exports = async (appName) => { if (process.platform !== 'darwin' || process.env.MACOS_SKIP_NOTARIZATION) { return true } @@ -23,10 +23,9 @@ module.exports = async (appBundleId, appName) => { } await notarize({ - appBundleId: appBundleId, appPath: path.resolve(__dirname, `../out/mac/${appName}.app`), appleId: APPLE_ID, appleIdPassword: APPLE_ID_PASSWORD, - ascProvider: 'UG77RJKZHH', + teamId: 'UG77RJKZHH', }) } diff --git a/yarn.lock b/yarn.lock index 66d54b2f144..cf144d9d5e0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -458,6 +458,15 @@ debug "^4.1.1" fs-extra "^9.0.1" +"@electron/notarize@^2.1.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@electron/notarize/-/notarize-2.1.0.tgz#76aaec10c8687225e8d0a427cc9df67611c46ff3" + integrity sha512-Q02xem1D0sg4v437xHgmBLxI2iz/fc0D4K7fiVWHa/AnW8o7D751xyKNXgziA6HrTOme9ul1JfWN5ark8WH1xA== + dependencies: + debug "^4.1.1" + fs-extra "^9.0.1" + promise-retry "^2.0.1" + "@electron/osx-sign@^1.0.4": version "1.0.4" resolved "https://registry.yarnpkg.com/@electron/osx-sign/-/osx-sign-1.0.4.tgz#8e91442846471636ca0469426a82b253b9170151" @@ -3489,14 +3498,6 @@ electron-log@^4.3.1: resolved "https://registry.yarnpkg.com/electron-log/-/electron-log-4.4.8.tgz#fcb9f714dbcaefb6ac7984c4683912c74730248a" integrity sha512-QQ4GvrXO+HkgqqEOYbi+DHL7hj5JM+nHi/j+qrN9zeeXVKy8ZABgbu4CnG+BBqDZ2+tbeq9tUC4DZfIWFU5AZA== -electron-notarize@^1.0.0: - version "1.2.2" - resolved "https://registry.yarnpkg.com/electron-notarize/-/electron-notarize-1.2.2.tgz#ebf2b258e8e08c1c9f8ff61dc53d5b16b439daf4" - integrity sha512-ZStVWYcWI7g87/PgjPJSIIhwQXOaw4/XeXU+pWqMMktSLHaGMLHdyPPN7Cmao7+Cr7fYufA16npdtMndYciHNw== - dependencies: - debug "^4.1.1" - fs-extra "^9.0.1" - electron-publish@24.4.0: version "24.4.0" resolved "https://registry.yarnpkg.com/electron-publish/-/electron-publish-24.4.0.tgz#a58f49ecd727620f65372881788ebb1a9b853284"