File tree Expand file tree Collapse file tree 3 files changed +89
-64
lines changed Expand file tree Collapse file tree 3 files changed +89
-64
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,12 @@ const semver = require('semver');
5
5
const chromedriverMetadataPath = require ( 'electron-chromedriver/package.json' ) ;
6
6
const mksnapshotMetadataPath = require ( 'electron-mksnapshot/package.json' ) ;
7
7
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
+
8
14
module . exports = function ( ) {
9
15
// Chromedriver should be at least v9.0.0
10
16
// Mksnapshot should be at least v9.0.2
@@ -26,15 +32,15 @@ module.exports = function() {
26
32
) ;
27
33
}
28
34
29
- if ( ! semver . satisfies ( chromedriverActualVer , '>=9.0.0' ) ) {
35
+ if ( ! semver . satisfies ( chromedriverActualVer , `>= ${ majorElectronVersion } ` ) ) {
30
36
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.`
32
38
) ;
33
39
}
34
40
35
- if ( ! semver . satisfies ( mksnapshotActualVer , '>=9.0.2' ) ) {
41
+ if ( ! semver . satisfies ( mksnapshotActualVer , `>= ${ majorElectronVersion } ` ) ) {
36
42
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.`
38
44
) ;
39
45
}
40
46
} ;
Original file line number Diff line number Diff line change 12
12
"coffeelint" : " 1.15.7" ,
13
13
"colors" : " 1.1.2" ,
14
14
"donna" : " 1.0.16" ,
15
- "electron-chromedriver" : " ^9 .0.0" ,
15
+ "electron-chromedriver" : " ^11 .0.0" ,
16
16
"electron-link" : " ^0.6.0" ,
17
- "electron-mksnapshot" : " ^9 .0.2 " ,
17
+ "electron-mksnapshot" : " ^11 .0.1 " ,
18
18
"electron-packager" : " ^15.0.0" ,
19
19
"eslint" : " ^5.16.0" ,
20
20
"eslint-config-prettier" : " ^4.2.0" ,
37
37
"nock" : " ^13.0.2" ,
38
38
"node-fetch" : " ^3.1.1" ,
39
39
"normalize-package-data" : " 2.3.5" ,
40
- "npm" : " 6.14.8 " ,
40
+ "npm" : " ^ 6.14.16 " ,
41
41
"npm-check" : " ^5.9.2" ,
42
42
"passwd-user" : " 2.1.0" ,
43
43
"pegjs" : " 0.9.0" ,
You can’t perform that action at this time.
0 commit comments