* CI: Use Cache@2 task in place of SaveCache@1
This is the officially supported successor to the old,
unofficial, Microsoft-DevLabs-hosted cache task.
It is simpler/easier to configure, and thus more friendly to forks.
`npm ci` doesn't try to reconcile package.json with package-lock.json,
nor with any existing packages in `node_modules`. `npm ci` simply
deletes `node_modules` and uses the packages from `package-lock.json`.
As a result, `npm ci` is much, much faster than `npm install`.
We should use it wherever possible.
Backslashes ("\") can be interpreted as escape characters
on Unix (Linux, macOS). Replace with forward-slashes, "/",
which are interpreted the same (as directory separators) on all OSes,
at least in arguments to commands such as `cd` and `node`.
If users manually run `npm install`, we want to
make sure the correct Electron-vendored chromedriver and mksnapshot
are downloaded. (Requires ELECTRON_CUSTOM_VERSION to be set properly.)
This postinstall script sets that var and gets the right binaries,
even if the ELECTRON_CUSTOM_VERSION env var wasn't manually set.
(The bootstrap script already handles this for bootstrapping,
but not for manually running "npm install" in the scripts dir.)
New feature as of electron-chromedriver >= 9.0.0
and electron-mksnapshot >= 9.0.2:
an environment variable "ELECTRON_CUSTOM_VERSION",
which allows downloading the specified (Electron-vendored)
version of chromedriver and mksnapshot,
irrespective of the versions of electron-chromedriver
or electron-mksnapshot (node modules) used to download them.
We can use the latest electron-chromedriver and electron-mksnapshot
now, if we want. Just set ELECTRON_CUSTOM_VERSION to the right version
(handled automatically based on "electronVersion" in package.json).