You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Allow setting chromium revision from .npmrc
* Allow the download host URL to be overriden
* Update tests to allow multiple installs
* Update readme with download host option
* Address PR feedback
* Refactor tests to use a helper
* Document the expected download mirror structure
* Allow configuration via .npmrc
This builds on the work in #27, providing an alternative to env vars
via the .npmrc.
I have also bolstered the unit testing significantly and allowed the
environment to be mocked out.
* Address PR feedback
1. Move tests to test/ directory
2. Remove experimental config._setEnv mocking method and update tests
3. Refactor new config.getEnvVar method
4. Refactor confusing ALT_URL variable in utils test
Also:
* removed now superfluous "install from mirror" test
* Updated target NodeJS versions on CI, the specified ones were ancient
I have changed it to LTS and Latest which will never age.
Co-authored-by: psociety <[email protected]>
Copy file name to clipboardExpand all lines: README.MD
+29-1Lines changed: 29 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,11 +41,39 @@ npm config set no-proxy localhost,127.0.0.1,example.org
41
41
Additionally proxy settings found in the environment variables `HTTP_PROXY`, `HTTPS_PROXY` and `NO_PROXY` will be used if they are not defined in the `.npmrc` file.
42
42
43
43
### Install a concrete revision
44
-
If you want to specify the revision of Chromium to be installed, just set the environment variable CHROMIUM_REVISION to the number of the revision you want to install, as in:
44
+
If you want to specify the revision of Chromium to be installed, just set the environment variable `CHROMIUM_REVISION` to the number of the revision you want to install, as in:
45
45
```shell script
46
46
export CHROMIUM_REVISION=729994
47
47
```
48
48
49
+
Note - may also be set in .npmrc like so:
50
+
51
+
```ini
52
+
chromium_revision=729994
53
+
```
54
+
55
+
### Use a Download Mirror
56
+
You may download a specific revision from an alternate download host using the environment variable `CHROMIUM_DOWNLOAD_HOST`, for example:
* The default download host is `https://www.googleapis.com/download/storage/v1/b/chromium-browser-snapshots/o/`
69
+
* Mirrors are expected to host binaries in the structure: `<CHROMIUM_DOWNLOAD_HOST>/<PLATFORM_ARCHITECTURE>/<REVISION>/<OS_CHROMIUM_FILE_NAME>.zip?alt=media` for example see the taobao mirror [chromium-browser-snapshots](https://npm.taobao.org/mirrors/chromium-browser-snapshots/).
0 commit comments