Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump Electron to v22.0.3 #15831

Merged
merged 11 commits into from Jan 25, 2023
Merged

Bump Electron to v22.0.3 #15831

merged 11 commits into from Jan 25, 2023

Conversation

tidy-dev
Copy link
Contributor

@tidy-dev tidy-dev commented Dec 27, 2022

Description

We discussed moving to v21.3.3 to stay 1 version behind. I have that PR open and am testing it out (release 3.1.3-test1 is test build with it release 3.1.3-test4 has newer node).

However... I think we will have some release churning with the start of the new year and since the Electron release cadence appears to be every 2 months.. A new version could be as soon as the end of January/first of February. Assuming we are going to keep Electron on beta for a few weeks. Moving to 22 for beta could likely land us 1 version behind by the time we release to prod.

Thus, I just spun up a this branch to see if moving to v22.0.0 brought any trouble and it appears pretty straight forward so far.

This PR upgrades Electron to v22.0.3!

A couple of pretty simple type changes were required:

  1. PathType type used by Electron.App.getPath(pathType) no longer has a type of 'cache' and has added a type of 'sessionData'. This doesn't affect as we only use the PathTypes of 'document' and 'home'.
  2. Electron repurposed the type of Electron.Response and replaced it with Electron.CallbackResponse. This does not have a programmatic impact on us as Electron.CallbackResponse has the same properties as Electron.Response used to have.
  3. Using the app. on('new-window'... event has been deprecated since 13 and removed in 22. Added the recommended fix. I am not 100% it works as expected as I couldn't replicate log from old version.. :/

Node Notes: Node v16.14.0 is latest with arm64 builds and thus that is what I bumped it to; however, Electron 22 uses node v16.17.1 and so I have requested it in the arm64 build thread. When we get that build, we will want to bump accordingly. It was generated for us nodejs/build#2540 (comment) ❤️

@tidy-dev tidy-dev changed the title Bump Electron to version v22.0.0 Bump Electron to v22.0.0 Dec 27, 2022
app/.npmrc Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
tidy-dev and others added 4 commits January 3, 2023 11:43
Co-authored-by: Sergio Padrino <sergio.padrino@gmail.com>
Co-authored-by: Sergio Padrino <sergio.padrino@gmail.com>
@tidy-dev
Copy link
Contributor Author

Since opening this, there was have been a few patches to 22. Thus, I have bumped to 22.0.3

@@ -140,7 +140,7 @@ export class OrderedWebRequest {
this.onBeforeRequest = new AsyncListenerSet(
webRequest.onBeforeRequest.bind(webRequest),
async (listeners, details) => {
let response: Response = {}
let response: CallbackResponse = {}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same update to api as explained in #15828

@tidy-dev tidy-dev changed the title Bump Electron to v22.0.0 Bump Electron to ~v22.0.0~ v22.0.3 Jan 23, 2023
@tidy-dev tidy-dev changed the title Bump Electron to ~v22.0.0~ v22.0.3 Bump Electron to v22.0.3 Jan 23, 2023
@tidy-dev tidy-dev marked this pull request as ready for review January 23, 2023 16:49
@tidy-dev
Copy link
Contributor Author

tidy-dev commented Jan 23, 2023

Tested locally on my macOS - Test deployment pending and will test out on Windows.

Copy link
Member

@sergiou87 sergiou87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good and I tested it on macOS and Windows and worked as expected!

I tested not only the most basic use cases, but also those which involve doing some "system stuff" (opening the browser, handling our custom url scheme, notifications, moving repos to the recycle bin, "open file" dialog…)

I also opened the latest beta right after this test build and it kept my list of repositories and settings, so it seems to be backwards compatible in that regard 😌

@tidy-dev tidy-dev merged commit 88b8bcd into development Jan 25, 2023
@tidy-dev tidy-dev deleted the electron-22-0-0 branch January 25, 2023 16:48
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.

None yet

2 participants