Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Sync electron-* devDependencies with atom/atom#2513

Merged
smashwilson merged 4 commits intoatom:masterfrom
DeeDeeG:bump-electron-dependencies
Sep 10, 2020
Merged

Sync electron-* devDependencies with atom/atom#2513
smashwilson merged 4 commits intoatom:masterfrom
DeeDeeG:bump-electron-dependencies

Conversation

@DeeDeeG
Copy link
Contributor

@DeeDeeG DeeDeeG commented Sep 10, 2020

Please be sure to read the contributor's guide to the GitHub package before submitting any pull requests.

Requirements

  • Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • Suggestion: You can use checklists to keep track of progress for the sections on metrics, tests, documentation, and user research.

Description of the Change

Match electron-* dependencies to match Atom.

  • Bump electron-link from 0.4.1 to 0.4.3
  • Bump electron-mksnapshot to 9.0.2
    • This newer version of the electron-mksnapshot module allows specifying an exact Electron version you want to target, down to the patch level. I added a script/redownload-electron-bins.js file to set this env var when appropriate, and re-download (the correct version of) the Electron-vendored mksnapshot binary.

Screenshot/Gif

N/A

Alternate Designs

  • We could just use electron-mksnapshot@6.0.0 and hope that it's similar enough to 6.1.12 to catch all the bugs we need to catch.

    • Pro: Less complexity in the repo. Simple.
    • Cons: Might not catch the same bugs? Hard to know. Also, the mksnapshot binaries on Linux are still huge for that release (~420-450 MB).
  • When this github module is being installed as a dependency in the main Atom repo, the new script/redownload-electron-bins.js reads the main Atom repo's { package.json }.electronVersionand downloads the mksnapshot binary for that version of Electron.

    • Pro: Atom CI should now fail earlier on the GitHub package tests if an Electron bump breaks the GitHub module.
    • Con: This automatic behavior might be unexpected and confusing.

Let me know if you prefer the version of the Electron-vendored mksnapshot binary simply be hard-coded at this repo, and not dynamically set based on the parent Atom repo.

Benefits

Sync with Atom, catch all the bugs! 🎉

Much smaller (~1/10th as large) mksnapshot binary should save Linux users network bandwidth, hard-drive space, memory consumption...

Possible Drawbacks

script/redownload-electron-bins.js adds some complexity to the repo.

Applicable Issues

#2509

Metrics

N/A?

Tests

I am currently relying on the existing CI for validating this.

Documentation

N/A

Release Notes

N/A

User Experience Research (Optional)

N/A

This makes sure we download the correct version
of the electron-vendored "mksnapshot" binary.

This will also automatically download the version in sync with Atom,
if this module is being installed
as a dependency in the main Atom repository.
@DeeDeeG DeeDeeG changed the title Bump electron dependencies Bump electron-* devDependencies Sep 10, 2020
@codecov
Copy link

codecov bot commented Sep 10, 2020

Codecov Report

Merging #2513 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2513   +/-   ##
=======================================
  Coverage   93.42%   93.42%           
=======================================
  Files         236      236           
  Lines       13196    13196           
  Branches     1897     1897           
=======================================
  Hits        12329    12329           
  Misses        867      867           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e0fa279...294fcef. Read the comment docs.

@DeeDeeG DeeDeeG changed the title Bump electron-* devDependencies Sync electron-* devDependencies with atom/atom Sep 10, 2020
@DeeDeeG
Copy link
Contributor Author

DeeDeeG commented Sep 10, 2020

cc @smashwilson here's my "updating the electron-* devDependencies" PR.

It adds a script to take advantage of the ELECTRON_CUSTOM_VERSION env var. Without that, we'd have to use electron-mksnapshot@6.0.0. For some reason the Electron 6 update at atom/atom didn't work with electron-chromedriver and electron-mksnapshot at v6.0.0, it had to be more precisely 6.1.12. so I thought I'd do the same thing at this repo, and use exact vendored mksnapshot binary down to the patch level.

@smashwilson
Copy link
Contributor

✨ Excellent, this is really cool. Thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants