@@ -31,6 +31,7 @@ type BrowserDescriptor = {
31
31
name : BrowserName ,
32
32
revision : string ,
33
33
download : boolean ,
34
+ browserDirectory : string ,
34
35
} ;
35
36
36
37
const EXECUTABLE_PATHS = {
@@ -107,7 +108,7 @@ const DOWNLOAD_URLS = {
107
108
'ubuntu18.04' : '%s/builds/webkit/%s/webkit-ubuntu-18.04.zip' ,
108
109
'ubuntu20.04' : '%s/builds/webkit/%s/webkit-ubuntu-20.04.zip' ,
109
110
'mac10.13' : undefined ,
110
- 'mac10.14' : '%s/builds/webkit/%s/webkit-mac-10.14.zip' ,
111
+ 'mac10.14' : '%s/builds/deprecated- webkit-mac-10.14 /%s/deprecated- webkit-mac-10.14.zip' ,
111
112
'mac10.15' : '%s/builds/webkit/%s/webkit-mac-10.15.zip' ,
112
113
'mac11' : '%s/builds/webkit/%s/webkit-mac-10.15.zip' ,
113
114
'mac11-arm64' : '%s/builds/webkit/%s/webkit-mac-11.0-arm64.zip' ,
@@ -203,13 +204,24 @@ export class Registry {
203
204
204
205
constructor ( packagePath : string ) {
205
206
const browsersJSON = JSON . parse ( fs . readFileSync ( path . join ( packagePath , 'browsers.json' ) , 'utf8' ) ) ;
206
- this . _descriptors = browsersJSON [ 'browsers' ] ;
207
+ this . _descriptors = browsersJSON [ 'browsers' ] . map ( ( obj : any ) => {
208
+ const name = obj . name ;
209
+ const revisionOverride = ( obj . revisionOverrides || { } ) [ hostPlatform ] ;
210
+ const revision = revisionOverride || obj . revision ;
211
+ const browserDirectory = revisionOverride ? `${ name } -${ hostPlatform } -special-${ revision } ` : `${ name } -${ revision } ` ;
212
+ return {
213
+ name,
214
+ revision,
215
+ download : obj . download ,
216
+ browserDirectory,
217
+ } ;
218
+ } ) ;
207
219
}
208
220
209
221
browserDirectory ( browserName : BrowserName ) : string {
210
222
const browser = this . _descriptors . find ( browser => browser . name === browserName ) ;
211
223
assert ( browser , `ERROR: Playwright does not support ${ browserName } ` ) ;
212
- return path . join ( registryDirectory , ` ${ browser . name } - ${ browser . revision } ` ) ;
224
+ return path . join ( registryDirectory , browser . browserDirectory ) ;
213
225
}
214
226
215
227
revision ( browserName : BrowserName ) : number {
0 commit comments