From fb8ca94e8e22c207227da57d28fec50ce235cd91 Mon Sep 17 00:00:00 2001 From: tub5 Date: Mon, 28 Jun 2021 12:46:17 +0100 Subject: [PATCH 1/2] Upgrade to use Electron 12.0.12 Resolves #578 --- ElectronNET.CLI/Commands/BuildCommand.cs | 2 +- ElectronNET.Host/package-lock.json | 36 ++++++++++-------------- ElectronNET.Host/package.json | 2 +- 3 files changed, 17 insertions(+), 23 deletions(-) diff --git a/ElectronNET.CLI/Commands/BuildCommand.cs b/ElectronNET.CLI/Commands/BuildCommand.cs index 8117446a..6796d13d 100644 --- a/ElectronNET.CLI/Commands/BuildCommand.cs +++ b/ElectronNET.CLI/Commands/BuildCommand.cs @@ -197,7 +197,7 @@ public Task ExecuteAsync() ProcessHelper.CmdExecute($"node build-helper.js " + manifestFileName, tempPath); Console.WriteLine($"Package Electron App for Platform {platformInfo.ElectronPackerPlatform}..."); - ProcessHelper.CmdExecute($"npx electron-builder --config=./bin/electron-builder.json --{platformInfo.ElectronPackerPlatform} --{electronArch} -c.electronVersion=11.1.1 {electronParams}", tempPath); + ProcessHelper.CmdExecute($"npx electron-builder --config=./bin/electron-builder.json --{platformInfo.ElectronPackerPlatform} --{electronArch} -c.electronVersion=12.0.12 {electronParams}", tempPath); Console.WriteLine("... done"); diff --git a/ElectronNET.Host/package-lock.json b/ElectronNET.Host/package-lock.json index 4a150765..b9d75e4c 100644 --- a/ElectronNET.Host/package-lock.json +++ b/ElectronNET.Host/package-lock.json @@ -18,7 +18,7 @@ "devDependencies": { "@types/node": "^10.17.20", "@types/socket.io": "^2.1.12", - "electron": "^11.1.1", + "electron": "^12.0.12", "tslint": "^6.1.3", "typescript": "^4.1.3" } @@ -58,8 +58,6 @@ "debug": "^4.1.1", "env-paths": "^2.2.0", "fs-extra": "^8.1.0", - "global-agent": "^2.0.2", - "global-tunnel-ng": "^2.7.1", "got": "^9.6.0", "progress": "^2.0.3", "sanitize-filename": "^1.6.2", @@ -544,14 +542,14 @@ "dev": true }, "node_modules/electron": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/electron/-/electron-11.1.1.tgz", - "integrity": "sha512-tlbex3xosJgfileN6BAQRotevPRXB/wQIq48QeQ08tUJJrXwE72c8smsM/hbHx5eDgnbfJ2G3a60PmRjHU2NhA==", + "version": "12.0.12", + "resolved": "https://registry.npmjs.org/electron/-/electron-12.0.12.tgz", + "integrity": "sha512-6E6dyjuJcGpgJPnsWY7dp1Xhha/NPigNDhxlmdKPwvso8DntFGrGt0SPhi1/wfaWZsXW5wqHBGIP4IN2cZ75WQ==", "dev": true, "hasInstallScript": true, "dependencies": { "@electron/get": "^1.0.1", - "@types/node": "^12.0.12", + "@types/node": "^14.6.2", "extract-zip": "^1.0.3" }, "bin": { @@ -594,7 +592,6 @@ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", "dependencies": { - "graceful-fs": "^4.1.6", "universalify": "^2.0.0" }, "optionalDependencies": { @@ -618,9 +615,9 @@ } }, "node_modules/electron/node_modules/@types/node": { - "version": "12.19.12", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.19.12.tgz", - "integrity": "sha512-UwfL2uIU9arX/+/PRcIkT08/iBadGN2z6ExOROA2Dh5mAuWTBj6iJbQX4nekiV5H8cTrEG569LeX+HRco9Cbxw==", + "version": "14.17.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.17.4.tgz", + "integrity": "sha512-8kQ3+wKGRNN0ghtEn7EGps/B8CzuBz1nXZEIGGLP2GnwbqYn4dbTs7k+VKLTq1HvZLRCIDtN3Snx1Ege8B7L5A==", "dev": true }, "node_modules/encodeurl": { @@ -1062,9 +1059,6 @@ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", "dev": true, - "dependencies": { - "graceful-fs": "^4.1.6" - }, "optionalDependencies": { "graceful-fs": "^4.1.6" } @@ -2227,20 +2221,20 @@ "dev": true }, "electron": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/electron/-/electron-11.1.1.tgz", - "integrity": "sha512-tlbex3xosJgfileN6BAQRotevPRXB/wQIq48QeQ08tUJJrXwE72c8smsM/hbHx5eDgnbfJ2G3a60PmRjHU2NhA==", + "version": "12.0.12", + "resolved": "https://registry.npmjs.org/electron/-/electron-12.0.12.tgz", + "integrity": "sha512-6E6dyjuJcGpgJPnsWY7dp1Xhha/NPigNDhxlmdKPwvso8DntFGrGt0SPhi1/wfaWZsXW5wqHBGIP4IN2cZ75WQ==", "dev": true, "requires": { "@electron/get": "^1.0.1", - "@types/node": "^12.0.12", + "@types/node": "^14.6.2", "extract-zip": "^1.0.3" }, "dependencies": { "@types/node": { - "version": "12.19.12", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.19.12.tgz", - "integrity": "sha512-UwfL2uIU9arX/+/PRcIkT08/iBadGN2z6ExOROA2Dh5mAuWTBj6iJbQX4nekiV5H8cTrEG569LeX+HRco9Cbxw==", + "version": "14.17.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.17.4.tgz", + "integrity": "sha512-8kQ3+wKGRNN0ghtEn7EGps/B8CzuBz1nXZEIGGLP2GnwbqYn4dbTs7k+VKLTq1HvZLRCIDtN3Snx1Ege8B7L5A==", "dev": true } } diff --git a/ElectronNET.Host/package.json b/ElectronNET.Host/package.json index ff7cb352..aac4863b 100644 --- a/ElectronNET.Host/package.json +++ b/ElectronNET.Host/package.json @@ -21,7 +21,7 @@ "devDependencies": { "@types/node": "^10.17.20", "@types/socket.io": "^2.1.12", - "electron": "^11.1.1", + "electron": "^12.0.12", "tslint": "^6.1.3", "typescript": "^4.1.3" } From 476cc9e5057d3411b570c518b6b0de545c89dfd6 Mon Sep 17 00:00:00 2001 From: tub5 Date: Mon, 28 Jun 2021 15:55:16 +0100 Subject: [PATCH 2/2] =?UTF-8?q?Updating=20ContextIsolation=20as=20per=20th?= =?UTF-8?q?e=20comment=20from=20@danatcofo.=20"on=20electron=20v12=20WebPr?= =?UTF-8?q?eferences.contextIsolation=20defaults=20to=20true=E2=80=A6=20th?= =?UTF-8?q?is=20means=20that=20window.require()=20will=20no=20longer=20fun?= =?UTF-8?q?ction"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ElectronNET.API/Entities/WebPreferences.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ElectronNET.API/Entities/WebPreferences.cs b/ElectronNET.API/Entities/WebPreferences.cs index a93c0321..00e33f27 100644 --- a/ElectronNET.API/Entities/WebPreferences.cs +++ b/ElectronNET.API/Entities/WebPreferences.cs @@ -185,8 +185,8 @@ public class WebPreferences /// Context' entry in the combo box at the top of the Console tab. This option is /// currently experimental and may change or be removed in future Electron releases. /// - [DefaultValue(false)] - public bool ContextIsolation { get; set; } + [DefaultValue(true)] + public bool ContextIsolation { get; set; } = true; /// /// Whether to use native window.open(). Defaults to false. This option is currently experimental.