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

Fix #646: Upgrade electron to 27.0.3 #1035

Merged
merged 1 commit into from
Nov 12, 2023

Conversation

araujoarthur0
Copy link
Collaborator

@araujoarthur0 araujoarthur0 commented Nov 3, 2023

Related issue

Closes #646

Context / Background

Updating electron to a newer version than 12 :)

What change is being introduced by this PR?

  • Electron 12 made contextIsolation: true by default.
    • Had to update our jest patch in order to disable contextIsolation on renderer tests, otherwise the require() statements would stop working.
  • Electron 14 removed the electron.remote module
    • Had to replace our usage in the code with the new package @electron/remote. This requires initialization in main process, which for renderer tests is done in the jest rpc patch.
    • The electron-store package v6 stopped working because it required the old remote. Upgrade to latest, which now requires an initialization step in main just like above.
  • Electron 25 broke the schema for the Event in Notification.
    • This is not considered a breaking change because the schema was not publicly documented, and we used the sender member in our tests, which went away. Had to remove the line in the tests.
  • Removed a few unused dependencies as well.

How will this be tested?

Ran the app locally, all tests are also passing.
Also testing the release flow in https://github.com/araujoarthur0/time-to-leave/actions/runs/6745696311

Copy link

codecov bot commented Nov 3, 2023

Codecov Report

Merging #1035 (aab44ac) into main (3f7076e) will increase coverage by 4.34%.
Report is 4 commits behind head on main.
The diff coverage is 25.58%.

@@            Coverage Diff             @@
##             main    #1035      +/-   ##
==========================================
+ Coverage   75.02%   79.37%   +4.34%     
==========================================
  Files          26       21       -5     
  Lines        2202     1275     -927     
  Branches      346      189     -157     
==========================================
- Hits         1652     1012     -640     
+ Misses        550      263     -287     
Files Coverage Δ
js/time-balance.js 100.00% <ø> (ø)
js/user-preferences.js 100.00% <100.00%> (ø)
js/window-aux.js 100.00% <100.00%> (ø)
js/main-window.js 73.50% <87.50%> (+0.46%) ⬆️
js/menus.js 81.73% <50.00%> (ø)
src/calendar.js 0.00% <0.00%> (ø)

... and 4 files with indirect coverage changes

Copy link
Collaborator

@tupaschoal tupaschoal left a comment

Choose a reason for hiding this comment

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

I did some testing and it all seems to be working great, a 16 major version jump is no small feat, thanks @araujoarthur0 !

@tupaschoal tupaschoal merged commit 26066c4 into TTLApp:main Nov 12, 2023
@araujoarthur0
Copy link
Collaborator Author

\changelog-update
Message: Enhancement [#646]: Title bar color now follows Windows mode (dark or light)

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.

Upgrade to electron 12.0.6 or newer
2 participants