Skip to content

Commit 89fd978

Browse files
authored
chore: add browsers.json for registry to respect python version (microsoft#31)
1 parent 623efa8 commit 89fd978

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

build_driver.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,5 @@
4242
out_path = os.path.join(drivers_path, driver + '.gz')
4343
with open(in_path, 'rb') as f_in, gzip.open(out_path, 'wb') as f_out:
4444
shutil.copyfileobj(f_in, f_out)
45+
46+
shutil.copyfile(os.path.join(driver_path, 'node_modules', 'playwright', 'browsers.json'), os.path.join(package_path, 'browsers.json'))

driver/main.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,8 @@
1717
const path = require('path');
1818

1919
(async() => {
20-
2120
if (process.argv.includes('install')) {
22-
const packageDir = path.join(__dirname, 'node_modules', 'playwright');
23-
await require('playwright/lib/install/installer').installBrowsersWithProgressBar(packageDir);
21+
await require('playwright/lib/install/installer').installBrowsersWithProgressBar(path.dirname(process.argv[0]));
2422
return;
2523
}
2624

playwright/browsers.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"comment": "Do not edit this file, use utils/roll_browser.js",
3+
"browsers": [
4+
{
5+
"name": "chromium",
6+
"revision": "786218"
7+
},
8+
{
9+
"name": "firefox",
10+
"revision": "1125"
11+
},
12+
{
13+
"name": "webkit",
14+
"revision": "1304"
15+
}
16+
]
17+
}

0 commit comments

Comments
 (0)