Skip to content

Commit 8b7ea9a

Browse files
authored
Merge pull request atom#23575 from icecream17/update-mksnapshot
fix/deps: min versions of electron-chromedriver...
2 parents 07edc2b + ebcebb2 commit 8b7ea9a

File tree

3 files changed

+89
-64
lines changed

3 files changed

+89
-64
lines changed

script/lib/check-chromedriver-version.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ const semver = require('semver');
55
const chromedriverMetadataPath = require('electron-chromedriver/package.json');
66
const mksnapshotMetadataPath = require('electron-mksnapshot/package.json');
77

8+
// The enviroment variable is usually set in install-script-dependencies.js
9+
const majorElectronVersion = semver.major(
10+
process.env.ELECTRON_CUSTOM_VERSION ||
11+
require('../config').appMetadata.electronVersion
12+
);
13+
814
module.exports = function() {
915
// Chromedriver should be at least v9.0.0
1016
// Mksnapshot should be at least v9.0.2
@@ -26,15 +32,15 @@ module.exports = function() {
2632
);
2733
}
2834

29-
if (!semver.satisfies(chromedriverActualVer, '>=9.0.0')) {
35+
if (!semver.satisfies(chromedriverActualVer, `>=${majorElectronVersion}`)) {
3036
throw new Error(
31-
`electron-chromedriver should be at least v9.0.0 to support the ELECTRON_CUSTOM_VERSION environment variable.`
37+
`electron-chromedriver should be at least v${majorElectronVersion} to support the ELECTRON_CUSTOM_VERSION environment variable.`
3238
);
3339
}
3440

35-
if (!semver.satisfies(mksnapshotActualVer, '>=9.0.2')) {
41+
if (!semver.satisfies(mksnapshotActualVer, `>=${majorElectronVersion}`)) {
3642
throw new Error(
37-
`electron-mksnapshot should be at least v9.0.2 to support the ELECTRON_CUSTOM_VERSION environment variable.`
43+
`electron-mksnapshot should be at least v${majorElectronVersion} to support the ELECTRON_CUSTOM_VERSION environment variable.`
3844
);
3945
}
4046
};

script/package-lock.json

Lines changed: 76 additions & 57 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

script/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
"coffeelint": "1.15.7",
1313
"colors": "1.1.2",
1414
"donna": "1.0.16",
15-
"electron-chromedriver": "^9.0.0",
15+
"electron-chromedriver": "^11.0.0",
1616
"electron-link": "^0.6.0",
17-
"electron-mksnapshot": "^9.0.2",
17+
"electron-mksnapshot": "^11.0.1",
1818
"electron-packager": "^15.0.0",
1919
"eslint": "^5.16.0",
2020
"eslint-config-prettier": "^4.2.0",
@@ -37,7 +37,7 @@
3737
"nock": "^13.0.2",
3838
"node-fetch": "^3.1.1",
3939
"normalize-package-data": "2.3.5",
40-
"npm": "6.14.8",
40+
"npm": "^6.14.16",
4141
"npm-check": "^5.9.2",
4242
"passwd-user": "2.1.0",
4343
"pegjs": "0.9.0",

0 commit comments

Comments
 (0)