From 44f8fbc49ef73c67f355f1af0ecd974f69960769 Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Sun, 3 May 2020 01:59:01 +0200 Subject: [PATCH 01/40] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 00000000000..6ef986f1320 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,23 @@ +# Node.js +# Build a general Node.js project with npm. +# Add steps that analyze code, save build artifacts, deploy, and more: +# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript + +trigger: +- windows-arm-support + +pool: Default + +steps: +- task: NodeTool@0 + inputs: + versionSpec: '12.x' + displayName: 'Install Node.js' + +- script: | + set npm_config_arch = arm64 + set TARGET_ARCH = arm64 + yarn + yarn build:prod + yarn test + displayName: 'Install, build and test GitHub Desktop' From 004f76057f49cb9c744514a6d533705f399380b7 Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Sat, 2 May 2020 12:19:31 +0200 Subject: [PATCH 02/40] Add support for Windows ARM --- app/package.json | 2 +- package.json | 2 +- script/dist-info.ts | 10 +++++++++- script/test-appveyor.bat | 7 ++++++- yarn.lock | 9 ++++++++- 5 files changed, 25 insertions(+), 5 deletions(-) diff --git a/app/package.json b/app/package.json index d376eecbc76..a69e6e32835 100644 --- a/app/package.json +++ b/app/package.json @@ -72,4 +72,4 @@ "temp": "^0.8.3", "webpack-hot-middleware": "^2.10.0" } -} +} \ No newline at end of file diff --git a/package.json b/package.json index 5db9894aa77..60c638a8760 100644 --- a/package.json +++ b/package.json @@ -174,4 +174,4 @@ "electron-packager": "^14.2.1", "electron-winstaller": "4.0.0" } -} +} \ No newline at end of file diff --git a/script/dist-info.ts b/script/dist-info.ts index 1ac6ec8139b..4f3074c96f5 100644 --- a/script/dist-info.ts +++ b/script/dist-info.ts @@ -16,9 +16,17 @@ export function getDistRoot() { } export function getDistPath() { + let arch = 'x64' + + if (process.env.npm_config_arch) { + // If a specific npm_config_arch is set, we use that one instead of the OS arch (to support cross compilation) + console.log('npm_config_arch detected: ' + process.env.npm_config_arch) + arch = process.env.npm_config_arch + } + return Path.join( getDistRoot(), - `${getExecutableName()}-${process.platform}-x64` + `${getExecutableName()}-${process.platform}-${arch}` ) } diff --git a/script/test-appveyor.bat b/script/test-appveyor.bat index b84ad86e5ab..422158b437c 100644 --- a/script/test-appveyor.bat +++ b/script/test-appveyor.bat @@ -1,2 +1,7 @@ -yarn test +if "%npm_config_arch%" == "arm64" ( + echo "Skipping yarn test due to arch arm64 Electron not being supported by the host OS" +) else ( + yarn test +) + set APPVEYOR_TEST_RESULT=%ERRORLEVEL% diff --git a/yarn.lock b/yarn.lock index 94f4c7ddaf2..89601ab4e0c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2792,7 +2792,7 @@ concat-stream@1.6.0: readable-stream "^2.2.2" typedarray "^0.0.6" -concat-stream@^1.5.0: +concat-stream@^1.5.0, concat-stream@^1.6.2: version "1.6.2" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== @@ -3146,6 +3146,13 @@ debug@4, debug@^4.1.0, debug@^4.1.1: dependencies: ms "^2.1.1" +debug@^3.0.0: + version "3.2.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" + integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== + dependencies: + ms "^2.1.1" + debug@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" From 41fa46c5285e5d081a82aaea809fb09b460d9e26 Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Sun, 3 May 2020 02:15:00 +0200 Subject: [PATCH 03/40] Update azure-pipelines.yml --- azure-pipelines.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6ef986f1320..8933658ce71 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -18,6 +18,10 @@ steps: set npm_config_arch = arm64 set TARGET_ARCH = arm64 yarn + displayName: 'Install, build and test GitHub Desktop' +- script: | yarn build:prod + displayName: 'Build GitHub Desktop ARM64' +- script: | yarn test - displayName: 'Install, build and test GitHub Desktop' + displayName: 'yarn test' From 916c3f977f5fbdf1892c1fa75b8a698a3a3d0abd Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Sun, 3 May 2020 10:41:57 +0200 Subject: [PATCH 04/40] Fix space size for ia32 --- azure-pipelines.yml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 8933658ce71..c24565dac2b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -4,24 +4,24 @@ # https://docs.microsoft.com/azure/devops/pipelines/languages/javascript trigger: -- windows-arm-support + - windows-arm-support pool: Default steps: -- task: NodeTool@0 - inputs: - versionSpec: '12.x' - displayName: 'Install Node.js' + - task: NodeTool@0 + inputs: + versionSpec: '12.x' + displayName: 'Install Node.js' -- script: | - set npm_config_arch = arm64 - set TARGET_ARCH = arm64 - yarn - displayName: 'Install, build and test GitHub Desktop' -- script: | - yarn build:prod - displayName: 'Build GitHub Desktop ARM64' -- script: | - yarn test - displayName: 'yarn test' + - script: | + set npm_config_arch = arm64 + set TARGET_ARCH = arm64 + yarn + displayName: 'Install, build and test GitHub Desktop' + - script: | + yarn build:prod + displayName: 'Build GitHub Desktop ARM64' + - script: | + yarn test + displayName: 'yarn test' From 50de301a48b27806a3b680329548c395d66d919d Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Sun, 3 May 2020 12:21:46 +0200 Subject: [PATCH 05/40] Set variables in pipeline --- azure-pipelines.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c24565dac2b..75261511cb8 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -8,6 +8,10 @@ trigger: pool: Default +variables: + npm_config_arch: arm64 + TARGET_ARCH: arm64 + steps: - task: NodeTool@0 inputs: @@ -15,13 +19,19 @@ steps: displayName: 'Install Node.js' - script: | - set npm_config_arch = arm64 - set TARGET_ARCH = arm64 + set npm_config_arch = $(npm_config_arch) + set TARGET_ARCH = $(TARGET_ARCH) yarn displayName: 'Install, build and test GitHub Desktop' - script: | + set npm_config_arch = $(npm_config_arch) + set TARGET_ARCH = $(TARGET_ARCH) + echo "npm_config_arch set to %npm_config_arch%" + echo "TARGET_ARCH set to %TARGET_ARCH%" yarn build:prod displayName: 'Build GitHub Desktop ARM64' - script: | + set npm_config_arch = $(npm_config_arch) + set TARGET_ARCH = $(TARGET_ARCH) yarn test displayName: 'yarn test' From c401297abce19185aa23b95cc753427f755fabe4 Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Sun, 3 May 2020 13:50:27 +0200 Subject: [PATCH 06/40] Increase Jest timeout to 100s --- app/test/setup-test-framework.ts | 4 ++-- azure-pipelines.yml | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/test/setup-test-framework.ts b/app/test/setup-test-framework.ts index b3746a9b02d..427fbedb9ad 100644 --- a/app/test/setup-test-framework.ts +++ b/app/test/setup-test-framework.ts @@ -1,5 +1,5 @@ -// set test timeout to 10s -jest.setTimeout(10000) +// set test timeout to 100s +jest.setTimeout(100000) import 'jest-extended' import 'jest-localstorage-mock' diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 75261511cb8..3a761af2b9d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -21,6 +21,7 @@ steps: - script: | set npm_config_arch = $(npm_config_arch) set TARGET_ARCH = $(TARGET_ARCH) + git submodule update --init --recursive yarn displayName: 'Install, build and test GitHub Desktop' - script: | From aa3b1b1bab2538576db2e3f99b944fe3776c9edd Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Mon, 4 May 2020 21:04:17 +0200 Subject: [PATCH 07/40] Fix nativeTheme errors in tests on Windows 10 1809+ and Server 2019+ --- app/src/ui/lib/theme-change-monitor.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/ui/lib/theme-change-monitor.ts b/app/src/ui/lib/theme-change-monitor.ts index c1998ccd6b2..e1d65dac749 100644 --- a/app/src/ui/lib/theme-change-monitor.ts +++ b/app/src/ui/lib/theme-change-monitor.ts @@ -11,11 +11,13 @@ class ThemeChangeMonitor implements IDisposable { } public dispose() { - remote.nativeTheme.removeAllListeners() + if (remote.nativeTheme) { + remote.nativeTheme.removeAllListeners() + } } private subscribe = () => { - if (!supportsDarkMode()) { + if (!supportsDarkMode() || !remote.nativeTheme) { return } From ee0e30e964336c5bfdbd4fa3e508ff4b00bc1fcb Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Mon, 4 May 2020 21:28:22 +0200 Subject: [PATCH 08/40] Set Azure Pipelines timeout to 90 minutes due to slow ARM64 32-bit emulation --- azure-pipelines.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 3a761af2b9d..c23ff253553 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -8,6 +8,8 @@ trigger: pool: Default +timeoutInMinutes: 90 + variables: npm_config_arch: arm64 TARGET_ARCH: arm64 From 06c35b4bcaee5445d07a772072a38191563717b9 Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Mon, 4 May 2020 21:34:06 +0200 Subject: [PATCH 09/40] Azure Pipelines: add job so that timeoutInMinutes property becomes available Set timeoutInMinutes to 90 because ARM64 32-bit NodeJS emulation is slow! --- azure-pipelines.yml | 61 ++++++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 31 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c23ff253553..cd6f30c39ff 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -6,35 +6,34 @@ trigger: - windows-arm-support -pool: Default +jobs: + - job: githubDesktopOnWindowsArm + pool: Default + timeoutInMinutes: 90 + variables: + npm_config_arch: arm64 + TARGET_ARCH: arm64 + steps: + - task: NodeTool@0 + inputs: + versionSpec: '12.x' + displayName: 'Install Node.js' -timeoutInMinutes: 90 - -variables: - npm_config_arch: arm64 - TARGET_ARCH: arm64 - -steps: - - task: NodeTool@0 - inputs: - versionSpec: '12.x' - displayName: 'Install Node.js' - - - script: | - set npm_config_arch = $(npm_config_arch) - set TARGET_ARCH = $(TARGET_ARCH) - git submodule update --init --recursive - yarn - displayName: 'Install, build and test GitHub Desktop' - - script: | - set npm_config_arch = $(npm_config_arch) - set TARGET_ARCH = $(TARGET_ARCH) - echo "npm_config_arch set to %npm_config_arch%" - echo "TARGET_ARCH set to %TARGET_ARCH%" - yarn build:prod - displayName: 'Build GitHub Desktop ARM64' - - script: | - set npm_config_arch = $(npm_config_arch) - set TARGET_ARCH = $(TARGET_ARCH) - yarn test - displayName: 'yarn test' + - script: | + set npm_config_arch = $(npm_config_arch) + set TARGET_ARCH = $(TARGET_ARCH) + git submodule update --init --recursive + yarn + displayName: 'Install dependencies' + - script: | + set npm_config_arch = $(npm_config_arch) + set TARGET_ARCH = $(TARGET_ARCH) + echo "npm_config_arch set to %npm_config_arch%" + echo "TARGET_ARCH set to %TARGET_ARCH%" + yarn build:prod + displayName: 'Build GitHub Desktop ARM64' + - script: | + set npm_config_arch = $(npm_config_arch) + set TARGET_ARCH = $(TARGET_ARCH) + yarn test + displayName: 'yarn test' From 3183e39527e1c9008a2d9abdfe4db7486894c4cf Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Tue, 5 May 2020 23:30:33 +0200 Subject: [PATCH 10/40] Revert "Fix nativeTheme errors in tests on Windows 10 1809+ and Server 2019+" This reverts commit b8a7c8c5c73439e20df6398d62709f72a5206e0d. --- app/src/ui/lib/theme-change-monitor.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/src/ui/lib/theme-change-monitor.ts b/app/src/ui/lib/theme-change-monitor.ts index e1d65dac749..c1998ccd6b2 100644 --- a/app/src/ui/lib/theme-change-monitor.ts +++ b/app/src/ui/lib/theme-change-monitor.ts @@ -11,13 +11,11 @@ class ThemeChangeMonitor implements IDisposable { } public dispose() { - if (remote.nativeTheme) { - remote.nativeTheme.removeAllListeners() - } + remote.nativeTheme.removeAllListeners() } private subscribe = () => { - if (!supportsDarkMode() || !remote.nativeTheme) { + if (!supportsDarkMode()) { return } From 69105891c104580ac2afd3423380441ebf221e9e Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Wed, 6 May 2020 09:51:44 +0200 Subject: [PATCH 11/40] Revert setting Jest timeout to 100s --- app/test/setup-test-framework.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/test/setup-test-framework.ts b/app/test/setup-test-framework.ts index 427fbedb9ad..b3746a9b02d 100644 --- a/app/test/setup-test-framework.ts +++ b/app/test/setup-test-framework.ts @@ -1,5 +1,5 @@ -// set test timeout to 100s -jest.setTimeout(100000) +// set test timeout to 10s +jest.setTimeout(10000) import 'jest-extended' import 'jest-localstorage-mock' From 4cfd03dba90249d7cb345eb12415c95e1b459ade Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Sun, 3 May 2020 02:15:00 +0200 Subject: [PATCH 12/40] Update azure-pipelines.yml --- azure-pipelines.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index cd6f30c39ff..f594faf7185 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -18,7 +18,6 @@ jobs: inputs: versionSpec: '12.x' displayName: 'Install Node.js' - - script: | set npm_config_arch = $(npm_config_arch) set TARGET_ARCH = $(TARGET_ARCH) From 0f91f08664f304091361dc815c8fca5dae78aa31 Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Sun, 3 May 2020 13:50:27 +0200 Subject: [PATCH 13/40] Increase Jest timeout to 100s --- app/test/setup-test-framework.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/test/setup-test-framework.ts b/app/test/setup-test-framework.ts index b3746a9b02d..427fbedb9ad 100644 --- a/app/test/setup-test-framework.ts +++ b/app/test/setup-test-framework.ts @@ -1,5 +1,5 @@ -// set test timeout to 10s -jest.setTimeout(10000) +// set test timeout to 100s +jest.setTimeout(100000) import 'jest-extended' import 'jest-localstorage-mock' From bb3851cf1398b63232c7f230bad8563eb2e654b1 Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Mon, 4 May 2020 21:04:17 +0200 Subject: [PATCH 14/40] Fix nativeTheme errors in tests on Windows 10 1809+ and Server 2019+ --- app/src/ui/lib/theme-change-monitor.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/ui/lib/theme-change-monitor.ts b/app/src/ui/lib/theme-change-monitor.ts index c1998ccd6b2..e1d65dac749 100644 --- a/app/src/ui/lib/theme-change-monitor.ts +++ b/app/src/ui/lib/theme-change-monitor.ts @@ -11,11 +11,13 @@ class ThemeChangeMonitor implements IDisposable { } public dispose() { - remote.nativeTheme.removeAllListeners() + if (remote.nativeTheme) { + remote.nativeTheme.removeAllListeners() + } } private subscribe = () => { - if (!supportsDarkMode()) { + if (!supportsDarkMode() || !remote.nativeTheme) { return } From 2af4f66177f156e474a23ba0b4a2c837f31b5205 Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Tue, 5 May 2020 23:30:33 +0200 Subject: [PATCH 15/40] Revert "Fix nativeTheme errors in tests on Windows 10 1809+ and Server 2019+" This reverts commit b8a7c8c5c73439e20df6398d62709f72a5206e0d. --- app/src/ui/lib/theme-change-monitor.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/src/ui/lib/theme-change-monitor.ts b/app/src/ui/lib/theme-change-monitor.ts index e1d65dac749..c1998ccd6b2 100644 --- a/app/src/ui/lib/theme-change-monitor.ts +++ b/app/src/ui/lib/theme-change-monitor.ts @@ -11,13 +11,11 @@ class ThemeChangeMonitor implements IDisposable { } public dispose() { - if (remote.nativeTheme) { - remote.nativeTheme.removeAllListeners() - } + remote.nativeTheme.removeAllListeners() } private subscribe = () => { - if (!supportsDarkMode() || !remote.nativeTheme) { + if (!supportsDarkMode()) { return } From 9871b1ddab747725dec635db24b410c610742e2e Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Wed, 6 May 2020 09:51:44 +0200 Subject: [PATCH 16/40] Revert setting Jest timeout to 100s --- app/test/setup-test-framework.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/test/setup-test-framework.ts b/app/test/setup-test-framework.ts index 427fbedb9ad..b3746a9b02d 100644 --- a/app/test/setup-test-framework.ts +++ b/app/test/setup-test-framework.ts @@ -1,5 +1,5 @@ -// set test timeout to 100s -jest.setTimeout(100000) +// set test timeout to 10s +jest.setTimeout(10000) import 'jest-extended' import 'jest-localstorage-mock' From 25b2d9b4f6bfb1b2a09721e39f64c5c53c7c53f2 Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Wed, 30 Sep 2020 21:30:16 +0200 Subject: [PATCH 17/40] Fix minor rebase glitches --- azure-pipelines.yml | 38 -------------------------------------- yarn.lock | 9 +-------- 2 files changed, 1 insertion(+), 46 deletions(-) delete mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index f594faf7185..00000000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,38 +0,0 @@ -# Node.js -# Build a general Node.js project with npm. -# Add steps that analyze code, save build artifacts, deploy, and more: -# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript - -trigger: - - windows-arm-support - -jobs: - - job: githubDesktopOnWindowsArm - pool: Default - timeoutInMinutes: 90 - variables: - npm_config_arch: arm64 - TARGET_ARCH: arm64 - steps: - - task: NodeTool@0 - inputs: - versionSpec: '12.x' - displayName: 'Install Node.js' - - script: | - set npm_config_arch = $(npm_config_arch) - set TARGET_ARCH = $(TARGET_ARCH) - git submodule update --init --recursive - yarn - displayName: 'Install dependencies' - - script: | - set npm_config_arch = $(npm_config_arch) - set TARGET_ARCH = $(TARGET_ARCH) - echo "npm_config_arch set to %npm_config_arch%" - echo "TARGET_ARCH set to %TARGET_ARCH%" - yarn build:prod - displayName: 'Build GitHub Desktop ARM64' - - script: | - set npm_config_arch = $(npm_config_arch) - set TARGET_ARCH = $(TARGET_ARCH) - yarn test - displayName: 'yarn test' diff --git a/yarn.lock b/yarn.lock index 89601ab4e0c..94f4c7ddaf2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2792,7 +2792,7 @@ concat-stream@1.6.0: readable-stream "^2.2.2" typedarray "^0.0.6" -concat-stream@^1.5.0, concat-stream@^1.6.2: +concat-stream@^1.5.0: version "1.6.2" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== @@ -3146,13 +3146,6 @@ debug@4, debug@^4.1.0, debug@^4.1.1: dependencies: ms "^2.1.1" -debug@^3.0.0: - version "3.2.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" - integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== - dependencies: - ms "^2.1.1" - debug@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" From c863dab97f60d670b11ba19d44a0c20ca7e4b6f1 Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Wed, 30 Sep 2020 21:32:28 +0200 Subject: [PATCH 18/40] Fix line endings --- app/package.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/package.json b/app/package.json index a69e6e32835..d376eecbc76 100644 --- a/app/package.json +++ b/app/package.json @@ -72,4 +72,4 @@ "temp": "^0.8.3", "webpack-hot-middleware": "^2.10.0" } -} \ No newline at end of file +} diff --git a/package.json b/package.json index 60c638a8760..5db9894aa77 100644 --- a/package.json +++ b/package.json @@ -174,4 +174,4 @@ "electron-packager": "^14.2.1", "electron-winstaller": "4.0.0" } -} \ No newline at end of file +} From a65219e79d4b24ab040a96d30739738e1c37bb85 Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Wed, 30 Sep 2020 23:28:24 +0200 Subject: [PATCH 19/40] Add Windows arm64 to CI --- .github/workflows/ci.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1a04d161ec8..b886eb20def 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,11 +16,17 @@ jobs: matrix: node: [12.14.1] os: [macos-10.15, windows-2019] + npm_archs: [x64, arm64] include: - os: macos-10.15 + arch: x64 friendlyName: macOS - os: windows-2019 - friendlyName: Windows + arch: x64 + friendlyName: Windows x64 + - os: windows-2019 + arch: arm64 + friendlyName: Windows arm64 timeout-minutes: 45 steps: - uses: actions/checkout@v2 @@ -46,6 +52,9 @@ jobs: - name: Install and build dependencies run: yarn + env: + npm_config_arch: ${{ matrix.arch }} + TARGET_ARCH: ${{ matrix.arch }} - name: Lint run: yarn lint - name: Validate changelog @@ -62,6 +71,8 @@ jobs: APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} DESKTOPBOT_TOKEN: ${{ secrets.DESKTOPBOT_TOKEN }} KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} + npm_config_arch: ${{ matrix.arch }} + TARGET_ARCH: ${{ matrix.arch }} - name: Prepare testing environment run: yarn test:setup - name: Run unit tests From c70d60e31f3524669c16e81e434ecfbc54d048a9 Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Wed, 30 Sep 2020 23:31:01 +0200 Subject: [PATCH 20/40] Fix mistake in CI config --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b886eb20def..8b2487b6bb4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,6 @@ jobs: matrix: node: [12.14.1] os: [macos-10.15, windows-2019] - npm_archs: [x64, arm64] include: - os: macos-10.15 arch: x64 From fb8306d33ad205313b457d6674f69c132db00b61 Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Wed, 30 Sep 2020 23:36:02 +0200 Subject: [PATCH 21/40] Another attempt to fix CI config --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8b2487b6bb4..2acd67f82cc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,9 +21,11 @@ jobs: arch: x64 friendlyName: macOS - os: windows-2019 + node: 12.14.1 arch: x64 friendlyName: Windows x64 - os: windows-2019 + node: 12.14.1 arch: arm64 friendlyName: Windows arm64 timeout-minutes: 45 From a36241d5a0bf51f5726a1c46a200d7ef9b2405cb Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Wed, 30 Sep 2020 23:39:25 +0200 Subject: [PATCH 22/40] Try to fix CI config --- .github/workflows/ci.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2acd67f82cc..4f9e81cf98c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,18 +16,15 @@ jobs: matrix: node: [12.14.1] os: [macos-10.15, windows-2019] + arch: [x64, arm64] include: - os: macos-10.15 - arch: x64 friendlyName: macOS - os: windows-2019 - node: 12.14.1 - arch: x64 - friendlyName: Windows x64 - - os: windows-2019 - node: 12.14.1 + friendlyName: Windows ${{ matrix.arch }} + exclude: + - os: macos-10.15 arch: arm64 - friendlyName: Windows arm64 timeout-minutes: 45 steps: - uses: actions/checkout@v2 From 312f20ac2851da6d49d0e53545bd3d4551da9a83 Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Wed, 30 Sep 2020 23:40:26 +0200 Subject: [PATCH 23/40] Tweak CI config --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4f9e81cf98c..9d962e94bc5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: - os: macos-10.15 friendlyName: macOS - os: windows-2019 - friendlyName: Windows ${{ matrix.arch }} + friendlyName: Windows exclude: - os: macos-10.15 arch: arm64 From f703db47851b36ef2a4ca829c5740d19331b070b Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Wed, 30 Sep 2020 23:41:37 +0200 Subject: [PATCH 24/40] Add friendly name for Windows arm64 --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9d962e94bc5..d1c8ad23d22 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,11 @@ jobs: - os: macos-10.15 friendlyName: macOS - os: windows-2019 - friendlyName: Windows + arch: x64 + friendlyName: Windows x64 + - os: windows-2019 + arch: arm64 + friendlyName: Windows arm64 exclude: - os: macos-10.15 arch: arm64 From ed8f1e88be2a15212421b59bd1b4e47bc8e97cb8 Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Tue, 3 Nov 2020 10:14:07 +0100 Subject: [PATCH 25/40] Default to NodeJS current arch --- script/dist-info.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/dist-info.ts b/script/dist-info.ts index 4f3074c96f5..75253d7cb17 100644 --- a/script/dist-info.ts +++ b/script/dist-info.ts @@ -16,7 +16,7 @@ export function getDistRoot() { } export function getDistPath() { - let arch = 'x64' + let arch = process.arch if (process.env.npm_config_arch) { // If a specific npm_config_arch is set, we use that one instead of the OS arch (to support cross compilation) From 3172a87f585623f9b0935b24663cfe8fa4ce42e2 Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Fri, 13 Nov 2020 17:27:00 +0100 Subject: [PATCH 26/40] Download Windows arm64 node lib in CI --- .github/workflows/ci.yml | 4 ++++ script/download-nodejs-win-arm64.ps1 | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 script/download-nodejs-win-arm64.ps1 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d1c8ad23d22..b9f33ea79de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,6 +52,10 @@ jobs: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} ${{ runner.os }}-yarn- + - name: Get NodeJS node-gyp lib for Windows arm64 + if: ${{ matrix.os == 'windows-2019' && matrix.arch == 'arm64' }} + run: .\script\download-nodejs-win-arm64.ps1 ${{ matrix.node }} + - name: Install and build dependencies run: yarn env: diff --git a/script/download-nodejs-win-arm64.ps1 b/script/download-nodejs-win-arm64.ps1 new file mode 100644 index 00000000000..b0cf5e15bab --- /dev/null +++ b/script/download-nodejs-win-arm64.ps1 @@ -0,0 +1,19 @@ +$nodeVersion = $args[0] + +If ($null -eq $nodeVersion) { + Write-Error "No NodeJS version given as argument to this file. Run it like download-nodejs-win-arm64.ps1 12.10.1" + exit 1 +} + +$url = "https://unofficial-builds.nodejs.org/download/release/v$nodeVersion/win-arm64/node.lib" +$cacheFolder = "$env:LOCALAPPDATA\node-gyp\Cache\$nodeVersion\arm64" + +If (!(Test-Path $cacheFolder)) { + New-Item -ItemType Directory -Force -Path $cacheFolder +} + +$output = "$cacheFolder\node.lib" +$start_time = Get-Date + +Invoke-WebRequest -Uri $url -OutFile $output +Write-Output "Downloaded arm64 NodeJS lib $nodeVersion in $((Get-Date).Subtract($start_time).Seconds) second(s)" From 001426dd089eedc7a5bd4cb08ae6808bd7c69395 Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Fri, 13 Nov 2020 17:41:46 +0100 Subject: [PATCH 27/40] Fix linting --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b9f33ea79de..e1d3e0ee7db 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,7 +55,7 @@ jobs: - name: Get NodeJS node-gyp lib for Windows arm64 if: ${{ matrix.os == 'windows-2019' && matrix.arch == 'arm64' }} run: .\script\download-nodejs-win-arm64.ps1 ${{ matrix.node }} - + - name: Install and build dependencies run: yarn env: From 60f43aa7f6e8ac694a2dc2aaed109f1569dc19e0 Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Mon, 16 Nov 2020 08:56:55 +0100 Subject: [PATCH 28/40] Update keytar to 7.1.0 --- app/package.json | 2 +- app/yarn.lock | 64 ++++++++++++++++++++++++++++-------------------- 2 files changed, 39 insertions(+), 27 deletions(-) diff --git a/app/package.json b/app/package.json index d376eecbc76..9800e7a352d 100644 --- a/app/package.json +++ b/app/package.json @@ -37,7 +37,7 @@ "fs-admin": "^0.15.0", "fs-extra": "^7.0.1", "fuzzaldrin-plus": "^0.6.0", - "keytar": "^6.0.1", + "keytar": "^7.1.0", "mem": "^4.3.0", "memoize-one": "^4.0.3", "moment": "^2.24.0", diff --git a/app/yarn.lock b/app/yarn.lock index 4a05a2c9961..4dfd99dbeba 100644 --- a/app/yarn.lock +++ b/app/yarn.lock @@ -16,6 +16,34 @@ dependencies: regenerator-runtime "^0.13.4" +"@shiftkey/node-abi@2.19.2-pre": + version "2.19.2-pre" + resolved "https://registry.yarnpkg.com/@shiftkey/node-abi/-/node-abi-2.19.2-pre.tgz#02599b37253e414f8f6ef3c67ea704e37da640a9" + integrity sha512-+LfXo6nd2uZ8cGSJ66zL3OuddvG2oMWMc9GzpDoX2ZNMLmYpu+ReoEKXtmoKVwd6JSavDymldebCxSJh9NQ9cg== + dependencies: + semver "^5.4.1" + +"@shiftkey/prebuild-install@6.0.1-pre2": + version "6.0.1-pre2" + resolved "https://registry.yarnpkg.com/@shiftkey/prebuild-install/-/prebuild-install-6.0.1-pre2.tgz#8cea022dd9aa0eb064164987b6ab12539efb892e" + integrity sha512-wDV1DgFxi0F+kTpyGNdnDctdw3Rb9aP8RBAGFE2wXr1+pXSCJRRA+Qh5ko5dKc0LeNIBZzjEECjmtAykajv+Xw== + dependencies: + "@shiftkey/node-abi" "2.19.2-pre" + detect-libc "^1.0.3" + expand-template "^2.0.3" + github-from-package "0.0.0" + minimist "^1.2.3" + mkdirp-classic "^0.5.3" + napi-build-utils "^1.0.1" + noop-logger "^0.1.1" + npmlog "^4.0.1" + pump "^3.0.0" + rc "^1.2.7" + simple-get "^3.0.3" + tar-fs "^2.0.0" + tunnel-agent "^0.6.0" + which-pm-runs "^1.0.0" + "@sindresorhus/is@^0.14.0": version "0.14.0" resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" @@ -795,13 +823,13 @@ keyboardevents-areequal@^0.2.1: resolved "https://registry.yarnpkg.com/keyboardevents-areequal/-/keyboardevents-areequal-0.2.2.tgz#88191ec738ce9f7591c25e9056de928b40277194" integrity sha512-Nv+Kr33T0mEjxR500q+I6IWisOQ0lK1GGOncV0kWE6n4KFmpcu7RUX5/2B0EUtX51Cb0HjZ9VJsSY3u4cBa0kw== -keytar@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/keytar/-/keytar-6.0.1.tgz#996961abdebf300b2d34bb2eab6e42a8096b1ed8" - integrity sha512-1Ihpf2tdM3sLwGMkYHXYhVC/hx5BDR7CWFL4IrBA3IDZo0xHhS2nM+tU9Y+u/U7okNfbVkwmKsieLkcWRMh93g== +keytar@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/keytar/-/keytar-7.1.0.tgz#961e6c5cf0615f2c184a48752d3265063e492925" + integrity sha512-ciDrtCcvhKpmVfPMVAiKSeKKQd+8S2VWOIcJP0Rdwz/ezSxHxYrycpwufDGpEHJqLyi/F7C7iwoz0eKGllzcMw== dependencies: + "@shiftkey/prebuild-install" "6.0.1-pre2" node-addon-api "^3.0.0" - prebuild-install "5.3.4" keyv@^3.0.0: version "3.1.0" @@ -934,6 +962,11 @@ minizlib@^1.1.1: dependencies: minipass "^2.2.1" +mkdirp-classic@^0.5.3: + version "0.5.3" + resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113" + integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A== + mkdirp@0.5.1, mkdirp@^0.5.0, mkdirp@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" @@ -1120,27 +1153,6 @@ plist@^2.1.0: xmlbuilder "8.2.2" xmldom "0.1.x" -prebuild-install@5.3.4: - version "5.3.4" - resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-5.3.4.tgz#6982d10084269d364c1856550b7d090ea31fa293" - integrity sha512-AkKN+pf4fSEihjapLEEj8n85YIw/tN6BQqkhzbDc0RvEZGdkpJBGMUYx66AAMcPG2KzmPQS7Cm16an4HVBRRMA== - dependencies: - detect-libc "^1.0.3" - expand-template "^2.0.3" - github-from-package "0.0.0" - minimist "^1.2.3" - mkdirp "^0.5.1" - napi-build-utils "^1.0.1" - node-abi "^2.7.0" - noop-logger "^0.1.1" - npmlog "^4.0.1" - pump "^3.0.0" - rc "^1.2.7" - simple-get "^3.0.3" - tar-fs "^2.0.0" - tunnel-agent "^0.6.0" - which-pm-runs "^1.0.0" - prebuild-install@5.3.5, prebuild-install@^5.3.5: version "5.3.5" resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-5.3.5.tgz#e7e71e425298785ea9d22d4f958dbaccf8bb0e1b" From c348ceadba663f308ec76571c58a448fc9bf50e5 Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Mon, 16 Nov 2020 09:18:18 +0100 Subject: [PATCH 29/40] Skip tests in CI on arm64 --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e1d3e0ee7db..044545eef70 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -80,12 +80,16 @@ jobs: npm_config_arch: ${{ matrix.arch }} TARGET_ARCH: ${{ matrix.arch }} - name: Prepare testing environment + if: matrix.arch == 'x64' run: yarn test:setup - name: Run unit tests + if: matrix.arch == 'x64' run: yarn test:unit:cov - name: Run script tests + if: matrix.arch == 'x64' run: yarn test:script:cov - name: Run integration tests + if: matrix.arch == 'x64' run: yarn test:integration - name: Publish production app run: yarn run publish From c7f486582ca2513cdab8b93aa060c1aaff3b0f9f Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Thu, 19 Nov 2020 10:40:38 +0100 Subject: [PATCH 30/40] Change the assumption of a x64 host to OS arch --- app/.npmrc | 1 - script/build.ts | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/.npmrc b/app/.npmrc index df7b47fd059..0d34d1fc18b 100644 --- a/app/.npmrc +++ b/app/.npmrc @@ -1,4 +1,3 @@ runtime = electron disturl = https://atom.io/download/electron target = 9.3.1 -arch = x64 diff --git a/script/build.ts b/script/build.ts index 8ffa764c9d3..ac82bc6ff0d 100755 --- a/script/build.ts +++ b/script/build.ts @@ -4,6 +4,7 @@ import * as path from 'path' import * as cp from 'child_process' import * as fs from 'fs-extra' +import * as os from 'os' import packager, { arch, ElectronNotarizeOptions, @@ -141,7 +142,7 @@ function packageApp() { const toPackageArch = (targetArch: string | undefined): arch => { if (targetArch === undefined) { - return 'x64' + targetArch = os.arch(); } if (targetArch === 'arm64' || targetArch === 'x64') { @@ -149,7 +150,7 @@ function packageApp() { } throw new Error( - `Building Desktop for architecture '${targetArch}' is not supported` + `Building Desktop for architecture '${targetArch}' is not supported` ) } From 45e8d526a1f51077cb457c8532ca771582cc7396 Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Thu, 19 Nov 2020 10:48:13 +0100 Subject: [PATCH 31/40] Cleanup & optimizations --- .github/workflows/ci.yml | 2 ++ script/dist-info.ts | 3 ++- script/download-nodejs-win-arm64.ps1 | 3 +++ script/test-appveyor.bat | 7 ------- 4 files changed, 7 insertions(+), 8 deletions(-) delete mode 100644 script/test-appveyor.bat diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 044545eef70..1c305fab141 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,6 +52,8 @@ jobs: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} ${{ runner.os }}-yarn- + # This step can be removed as soon as official Windows arm64 builds are published: + # https://github.com/nodejs/build/issues/2450#issuecomment-705853342 - name: Get NodeJS node-gyp lib for Windows arm64 if: ${{ matrix.os == 'windows-2019' && matrix.arch == 'arm64' }} run: .\script\download-nodejs-win-arm64.ps1 ${{ matrix.node }} diff --git a/script/dist-info.ts b/script/dist-info.ts index 75253d7cb17..8a00587a421 100644 --- a/script/dist-info.ts +++ b/script/dist-info.ts @@ -1,5 +1,6 @@ import * as Path from 'path' import * as Fs from 'fs' +import * as os from 'os' import { getProductName, getVersion } from '../app/package-info' import { getReleaseBranchName } from './build-platforms' @@ -16,7 +17,7 @@ export function getDistRoot() { } export function getDistPath() { - let arch = process.arch + let arch = os.arch(); if (process.env.npm_config_arch) { // If a specific npm_config_arch is set, we use that one instead of the OS arch (to support cross compilation) diff --git a/script/download-nodejs-win-arm64.ps1 b/script/download-nodejs-win-arm64.ps1 index b0cf5e15bab..15201149d60 100644 --- a/script/download-nodejs-win-arm64.ps1 +++ b/script/download-nodejs-win-arm64.ps1 @@ -1,3 +1,6 @@ +# This script can be removed as soon as official Windows arm64 builds are published: +# https://github.com/nodejs/build/issues/2450#issuecomment-705853342 + $nodeVersion = $args[0] If ($null -eq $nodeVersion) { diff --git a/script/test-appveyor.bat b/script/test-appveyor.bat deleted file mode 100644 index 422158b437c..00000000000 --- a/script/test-appveyor.bat +++ /dev/null @@ -1,7 +0,0 @@ -if "%npm_config_arch%" == "arm64" ( - echo "Skipping yarn test due to arch arm64 Electron not being supported by the host OS" -) else ( - yarn test -) - -set APPVEYOR_TEST_RESULT=%ERRORLEVEL% From cc521253433a1cb0c99bd6e6fd99ad36c2165f9d Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Thu, 19 Nov 2020 10:49:50 +0100 Subject: [PATCH 32/40] Fix linting --- script/build.ts | 2 +- script/dist-info.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/script/build.ts b/script/build.ts index ac82bc6ff0d..c382c494fae 100755 --- a/script/build.ts +++ b/script/build.ts @@ -142,7 +142,7 @@ function packageApp() { const toPackageArch = (targetArch: string | undefined): arch => { if (targetArch === undefined) { - targetArch = os.arch(); + targetArch = os.arch() } if (targetArch === 'arm64' || targetArch === 'x64') { diff --git a/script/dist-info.ts b/script/dist-info.ts index 8a00587a421..16d9ca75fa6 100644 --- a/script/dist-info.ts +++ b/script/dist-info.ts @@ -17,7 +17,7 @@ export function getDistRoot() { } export function getDistPath() { - let arch = os.arch(); + let arch = os.arch() if (process.env.npm_config_arch) { // If a specific npm_config_arch is set, we use that one instead of the OS arch (to support cross compilation) From 0060b6c12c662e61f0a2f6e2dd9e1fe2e23f168f Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Tue, 24 Nov 2020 15:44:50 +0100 Subject: [PATCH 33/40] Bump Keytar to 7.2.0 --- app/package.json | 2 +- app/yarn.lock | 59 +++++++++++++++++++++--------------------------- 2 files changed, 27 insertions(+), 34 deletions(-) diff --git a/app/package.json b/app/package.json index 9800e7a352d..b77b4bd0ad8 100644 --- a/app/package.json +++ b/app/package.json @@ -37,7 +37,7 @@ "fs-admin": "^0.15.0", "fs-extra": "^7.0.1", "fuzzaldrin-plus": "^0.6.0", - "keytar": "^7.1.0", + "keytar": "^7.2.0", "mem": "^4.3.0", "memoize-one": "^4.0.3", "moment": "^2.24.0", diff --git a/app/yarn.lock b/app/yarn.lock index 4dfd99dbeba..4022e50e4d1 100644 --- a/app/yarn.lock +++ b/app/yarn.lock @@ -16,34 +16,6 @@ dependencies: regenerator-runtime "^0.13.4" -"@shiftkey/node-abi@2.19.2-pre": - version "2.19.2-pre" - resolved "https://registry.yarnpkg.com/@shiftkey/node-abi/-/node-abi-2.19.2-pre.tgz#02599b37253e414f8f6ef3c67ea704e37da640a9" - integrity sha512-+LfXo6nd2uZ8cGSJ66zL3OuddvG2oMWMc9GzpDoX2ZNMLmYpu+ReoEKXtmoKVwd6JSavDymldebCxSJh9NQ9cg== - dependencies: - semver "^5.4.1" - -"@shiftkey/prebuild-install@6.0.1-pre2": - version "6.0.1-pre2" - resolved "https://registry.yarnpkg.com/@shiftkey/prebuild-install/-/prebuild-install-6.0.1-pre2.tgz#8cea022dd9aa0eb064164987b6ab12539efb892e" - integrity sha512-wDV1DgFxi0F+kTpyGNdnDctdw3Rb9aP8RBAGFE2wXr1+pXSCJRRA+Qh5ko5dKc0LeNIBZzjEECjmtAykajv+Xw== - dependencies: - "@shiftkey/node-abi" "2.19.2-pre" - detect-libc "^1.0.3" - expand-template "^2.0.3" - github-from-package "0.0.0" - minimist "^1.2.3" - mkdirp-classic "^0.5.3" - napi-build-utils "^1.0.1" - noop-logger "^0.1.1" - npmlog "^4.0.1" - pump "^3.0.0" - rc "^1.2.7" - simple-get "^3.0.3" - tar-fs "^2.0.0" - tunnel-agent "^0.6.0" - which-pm-runs "^1.0.0" - "@sindresorhus/is@^0.14.0": version "0.14.0" resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" @@ -823,13 +795,13 @@ keyboardevents-areequal@^0.2.1: resolved "https://registry.yarnpkg.com/keyboardevents-areequal/-/keyboardevents-areequal-0.2.2.tgz#88191ec738ce9f7591c25e9056de928b40277194" integrity sha512-Nv+Kr33T0mEjxR500q+I6IWisOQ0lK1GGOncV0kWE6n4KFmpcu7RUX5/2B0EUtX51Cb0HjZ9VJsSY3u4cBa0kw== -keytar@^7.1.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/keytar/-/keytar-7.1.0.tgz#961e6c5cf0615f2c184a48752d3265063e492925" - integrity sha512-ciDrtCcvhKpmVfPMVAiKSeKKQd+8S2VWOIcJP0Rdwz/ezSxHxYrycpwufDGpEHJqLyi/F7C7iwoz0eKGllzcMw== +keytar@^7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/keytar/-/keytar-7.2.0.tgz#4db2bec4f9700743ffd9eda22eebb658965c8440" + integrity sha512-ECSaWvoLKI5SI0pGpZQeUV1/lpBYfkaxvoSp3zkiPOz05VavwSfLi8DdEaa9N2ekQZv3Chy+o7aP6n9mairBgw== dependencies: - "@shiftkey/prebuild-install" "6.0.1-pre2" node-addon-api "^3.0.0" + prebuild-install "^6.0.0" keyv@^3.0.0: version "3.1.0" @@ -1174,6 +1146,27 @@ prebuild-install@5.3.5, prebuild-install@^5.3.5: tunnel-agent "^0.6.0" which-pm-runs "^1.0.0" +prebuild-install@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-6.0.0.tgz#669022bcde57c710a869e39c5ca6bf9cd207f316" + integrity sha512-h2ZJ1PXHKWZpp1caLw0oX9sagVpL2YTk+ZwInQbQ3QqNd4J03O6MpFNmMTJlkfgPENWqe5kP0WjQLqz5OjLfsw== + dependencies: + detect-libc "^1.0.3" + expand-template "^2.0.3" + github-from-package "0.0.0" + minimist "^1.2.3" + mkdirp-classic "^0.5.3" + napi-build-utils "^1.0.1" + node-abi "^2.7.0" + noop-logger "^0.1.1" + npmlog "^4.0.1" + pump "^3.0.0" + rc "^1.2.7" + simple-get "^3.0.3" + tar-fs "^2.0.0" + tunnel-agent "^0.6.0" + which-pm-runs "^1.0.0" + prepend-http@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" From ba6891c945234c1a18af5227e43ca1ae680e05d7 Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Thu, 11 Feb 2021 14:46:01 +0100 Subject: [PATCH 34/40] Fix Windows arm64 NodeJS version to 14.15.4 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b96dcf0718e..ad2849e4774 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,7 +56,7 @@ jobs: # https://github.com/nodejs/build/issues/2450#issuecomment-705853342 - name: Get NodeJS node-gyp lib for Windows arm64 if: ${{ matrix.os == 'windows-2019' && matrix.arch == 'arm64' }} - run: .\script\download-nodejs-win-arm64.ps1 ${{ matrix.node }} + run: .\script\download-nodejs-win-arm64.ps1 14.15.4 - name: Install and build dependencies run: yarn From 20f7b65c858d525d6e5582e175ab51e22b79c635 Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Thu, 11 Feb 2021 14:57:01 +0100 Subject: [PATCH 35/40] Fix NodeJS version to 14.15.4 to prevent future regressions in the arm64 download --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ad2849e4774..013dcf524c8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - node: [14.x] + node: [14.15.4] os: [macos-10.15, windows-2019] arch: [x64, arm64] include: @@ -56,7 +56,7 @@ jobs: # https://github.com/nodejs/build/issues/2450#issuecomment-705853342 - name: Get NodeJS node-gyp lib for Windows arm64 if: ${{ matrix.os == 'windows-2019' && matrix.arch == 'arm64' }} - run: .\script\download-nodejs-win-arm64.ps1 14.15.4 + run: .\script\download-nodejs-win-arm64.ps1 ${{ matrix.node }} - name: Install and build dependencies run: yarn From db662930530e68e5a3a28e98abccf9026f1c449d Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Fri, 19 Feb 2021 09:11:10 +0100 Subject: [PATCH 36/40] Update electron-winstaller to 5.0.0 --- package.json | 4 ++-- yarn.lock | 18 ++++++++++-------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 0f1c12a492f..b146ac077a7 100644 --- a/package.json +++ b/package.json @@ -127,7 +127,7 @@ "@types/codemirror": "0.0.76", "@types/deep-equal": "^1.0.1", "@types/double-ended-queue": "^2.1.0", - "@types/electron-winstaller": "^2.6.0", + "@types/electron-winstaller": "^4.0.0", "@types/event-kit": "^1.2.28", "@types/express": "^4.11.0", "@types/extract-text-webpack-plugin": "^3.0.3", @@ -172,6 +172,6 @@ "electron": "^11.1.1", "electron-builder": "^22.7.0", "electron-packager": "^15.1.0", - "electron-winstaller": "4.0.2" + "electron-winstaller": "^5.0.0" } } diff --git a/yarn.lock b/yarn.lock index 7f57caf7473..237473cc42c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -743,10 +743,12 @@ resolved "https://registry.yarnpkg.com/@types/double-ended-queue/-/double-ended-queue-2.1.0.tgz#adc862d8d53bdf7d1b23a7d85559815ec1fbb92c" integrity sha512-pCS41/Odn6GMQyqnt8aPTSTQFGriAryYQwVONKk1QhUEhulxueLPE1kDNqDOuJqiv34VLVWXxF4I1EKz3+ftzQ== -"@types/electron-winstaller@^2.6.0": - version "2.6.0" - resolved "https://registry.yarnpkg.com/@types/electron-winstaller/-/electron-winstaller-2.6.0.tgz#703073ee2109fefe8a958fdadb746dfc0a827918" - integrity sha512-pQke6avqSYtkNunEec7NF2dTDSFsf2e1Ti9VkaJFzI15UfTEOjwz22lKoImja7nXPLu8nINYSaVaPgw0XHJEkA== +"@types/electron-winstaller@^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@types/electron-winstaller/-/electron-winstaller-4.0.0.tgz#7377b2cdaab361956cbf1fc41419abb77172d8eb" + integrity sha512-IpgXedqMlSjBIq7+mpj7pkxxZHramuVnrQTyYZbV4M6eABRCNVkbLfXnD35F2+kW3lKFOW9qTcCDo5aGKn7rnQ== + dependencies: + electron-winstaller "*" "@types/eslint-visitor-keys@^1.0.0": version "1.0.0" @@ -4128,10 +4130,10 @@ electron-publish@22.7.0: lazy-val "^1.0.4" mime "^2.4.5" -electron-winstaller@4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/electron-winstaller/-/electron-winstaller-4.0.2.tgz#e3aa7e95db8232eeb337b28c11ad80b93dcafe6d" - integrity sha512-tYmzIyi+W0CXd9o/jmR0VT+vwJ+nOaE/dQz8f64IlbQ/J9d2lpwsmmOKxx6veAVKeYiJHYQHR1eYsLzznNzd5g== +electron-winstaller@*, electron-winstaller@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/electron-winstaller/-/electron-winstaller-5.0.0.tgz#0db968f34d498b16c69566a40848f562e70e7bcc" + integrity sha512-V+jFda7aVAm0htCG8Q95buPUpmXZW9ujh1HdhSlWY6y4QnJnw4TfrmxTlQWV4p2ioF/71JMI/1YF+/qbSICogA== dependencies: asar "^2.0.1" debug "^4.1.1" From 08400717c04120356aa0d3686814d803e3373f19 Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Fri, 19 Feb 2021 11:07:39 +0100 Subject: [PATCH 37/40] Also build macOS arm64 --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 013dcf524c8..271c399998f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,10 +26,10 @@ jobs: - os: windows-2019 arch: arm64 friendlyName: Windows arm64 - exclude: - - os: macos-10.15 - arch: arm64 timeout-minutes: 45 + env: + # Needed for macOS arm64 until hosted macos-11.0 runners become available + SDKROOT: /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk steps: - uses: actions/checkout@v2 with: From 4ab0f993709bc60c8688d48073953667efa2bcb2 Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Fri, 19 Feb 2021 11:15:17 +0100 Subject: [PATCH 38/40] Fix GH Actions matrix --- .github/workflows/ci.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 271c399998f..c283b30a747 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ on: jobs: build: name: ${{ matrix.friendlyName }} - runs-on: ${{ matrix.os }} + runs-on: ${{ matrix.os }} ${{ matrix.arch }} strategy: fail-fast: false matrix: @@ -21,11 +21,7 @@ jobs: - os: macos-10.15 friendlyName: macOS - os: windows-2019 - arch: x64 - friendlyName: Windows x64 - - os: windows-2019 - arch: arm64 - friendlyName: Windows arm64 + friendlyName: Windows timeout-minutes: 45 env: # Needed for macOS arm64 until hosted macos-11.0 runners become available From 9c6094b5b878992f327395297ae27fc42a3aadd4 Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Fri, 19 Feb 2021 11:41:28 +0100 Subject: [PATCH 39/40] Fix typo in GH Actions workflow --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c283b30a747..5d58eaac5ea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,8 +9,8 @@ on: jobs: build: - name: ${{ matrix.friendlyName }} - runs-on: ${{ matrix.os }} ${{ matrix.arch }} + name: ${{ matrix.friendlyName }} ${{ matrix.arch }} + runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: From 5e0c67261e03005d768bd91d49b1a80a0f3fcf2b Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Sun, 21 Feb 2021 13:50:39 +0100 Subject: [PATCH 40/40] Fix tests on Windows ARM64 This change is especially important on systems that run Git commands slowly, like Windows ARM64 which has to emulate Git for Windows 32-bit. --- app/src/lib/git/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/lib/git/config.ts b/app/src/lib/git/config.ts index e65e134ec14..bafac7353f9 100644 --- a/app/src/lib/git/config.ts +++ b/app/src/lib/git/config.ts @@ -146,7 +146,7 @@ export async function setGlobalConfigValue( HOME: string } ): Promise { - setConfigValueInPath(name, value, null, env) + await setConfigValueInPath(name, value, null, env) } /**