Fix playright browser installs due to upstream breaking change (#55740)

This commit is contained in:
Jake Bailey 2023-09-14 08:44:55 -07:00 committed by GitHub
parent a563de9e49
commit 47e4448d57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 76 additions and 13 deletions

View File

@ -97,8 +97,8 @@ jobs:
check-latest: true
- run: npm ci
- name: Adding playwright
run: npm install --no-save --no-package-lock playwright
- name: Installing browsers
run: npx playwright install --with-deps
- name: Validate the browser can import TypeScript
run: npx hereby test-browser-integration

View File

@ -30,8 +30,8 @@ jobs:
run: |
npm ci
npm test
- name: Adding playwright
run: npm install --no-save --no-package-lock playwright
- name: Installing browsers
run: npx playwright install --with-deps
- name: Validate the browser can import TypeScript
run: npx hereby test-browser-integration
- name: LKG, clean, and pack

70
package-lock.json generated
View File

@ -49,6 +49,7 @@
"mocha-fivemat-progress-reporter": "^0.1.0",
"ms": "^2.1.3",
"node-fetch": "^3.2.10",
"playwright": "^1.38.0",
"source-map-support": "^0.5.21",
"tslib": "^2.5.0",
"typescript": "^5.0.2",
@ -3144,6 +3145,50 @@
"url": "https://github.com/sponsors/jonschlinkert"
}
},
"node_modules/playwright": {
"version": "1.38.0",
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.38.0.tgz",
"integrity": "sha512-fJGw+HO0YY+fU/F1N57DMO+TmXHTrmr905J05zwAQE9xkuwP/QLDk63rVhmyxh03dYnEhnRbsdbH9B0UVVRB3A==",
"dev": true,
"dependencies": {
"playwright-core": "1.38.0"
},
"bin": {
"playwright": "cli.js"
},
"engines": {
"node": ">=16"
},
"optionalDependencies": {
"fsevents": "2.3.2"
}
},
"node_modules/playwright-core": {
"version": "1.38.0",
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.38.0.tgz",
"integrity": "sha512-f8z1y8J9zvmHoEhKgspmCvOExF2XdcxMW8jNRuX4vkQFrzV4MlZ55iwb5QeyiFQgOFCUolXiRHgpjSEnqvO48g==",
"dev": true,
"bin": {
"playwright-core": "cli.js"
},
"engines": {
"node": ">=16"
}
},
"node_modules/playwright/node_modules/fsevents": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
"dev": true,
"hasInstallScript": true,
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
}
},
"node_modules/plur": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/plur/-/plur-4.0.0.tgz",
@ -6009,6 +6054,31 @@
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
"dev": true
},
"playwright": {
"version": "1.38.0",
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.38.0.tgz",
"integrity": "sha512-fJGw+HO0YY+fU/F1N57DMO+TmXHTrmr905J05zwAQE9xkuwP/QLDk63rVhmyxh03dYnEhnRbsdbH9B0UVVRB3A==",
"dev": true,
"requires": {
"fsevents": "2.3.2",
"playwright-core": "1.38.0"
},
"dependencies": {
"fsevents": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
"dev": true,
"optional": true
}
}
},
"playwright-core": {
"version": "1.38.0",
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.38.0.tgz",
"integrity": "sha512-f8z1y8J9zvmHoEhKgspmCvOExF2XdcxMW8jNRuX4vkQFrzV4MlZ55iwb5QeyiFQgOFCUolXiRHgpjSEnqvO48g==",
"dev": true
},
"plur": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/plur/-/plur-4.0.0.tgz",

View File

@ -75,6 +75,7 @@
"mocha-fivemat-progress-reporter": "^0.1.0",
"ms": "^2.1.3",
"node-fetch": "^3.2.10",
"playwright": "^1.38.0",
"source-map-support": "^0.5.21",
"tslib": "^2.5.0",
"typescript": "^5.0.2",

View File

@ -5,15 +5,7 @@ import {
import {
join,
} from "path";
let playwright;
try {
// @ts-ignore-error
playwright = await import("playwright");
}
catch (error) {
throw new Error("Playwright is expected to be installed manually before running this script");
}
import playwright from "playwright";
// Turning this on will leave the Chromium browser open, giving you the
// chance to open up the web inspector.