Skip to content

Commit

Permalink
fix: upgrade playwright and deps (#879)
Browse files Browse the repository at this point in the history
  • Loading branch information
dylantientcheu authored Sep 6, 2024
1 parent f9598fa commit 0ab0095
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 79 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: Renderscript
on:
push:
branches:
- "master"
- "renovate/**"
- 'master'
- 'renovate/**'
pull_request:

env:
Expand All @@ -14,8 +14,6 @@ jobs:
lint:
runs-on: ubuntu-latest
name: Lint
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "true"
steps:
- uses: actions/checkout@v4

Expand All @@ -25,7 +23,7 @@ jobs:
node-version-file: .nvmrc
cache: yarn

- run: yarn install
- run: yarn install --frozen-lockfile

- name: Run Linter
run: yarn lint
Expand All @@ -43,7 +41,10 @@ jobs:
node-version-file: .nvmrc
cache: yarn

- run: yarn install
- run: yarn install --frozen-lockfile

- name: Install Playwright browsers
run: yarn playwright install

- name: Build
run: yarn build
Expand All @@ -54,4 +55,3 @@ jobs:
- name: Run test
run: yarn test

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@
"body-parser": "1.20.2",
"cookie-parser": "1.4.6",
"csurf": "1.11.0",
"express": "4.18.2",
"express": "4.19.2",
"hot-shots": "10.0.0",
"pino": "8.16.2",
"playwright": "1.37.1",
"undici": "5.27.2",
"playwright": "1.44.1",
"undici": "5.28.4",
"uuid": "9.0.1"
},
"resolutions": {
Expand Down
8 changes: 7 additions & 1 deletion src/lib/browser/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const flags = [
"--proxy-server='direct://'",
'--proxy-bypass-list=*',
// Disable cache
'--disk-cache-dir=/dev/null',
// '--disk-cache-dir=/dev/null',
'--media-cache-size=1',
'--disk-cache-size=1',
// Disable useless UI features
Expand All @@ -52,6 +52,7 @@ export const flags = [
'--no-first-run', // screen on very first run
'--noerrdialogs',
'--disable-background-timer-throttling',
'--disable-backgrounding-occluded-windows',
'--disable-password-generation',
'--disable-prompt-on-repos',
'--disable-save-password-bubble',
Expand All @@ -69,6 +70,11 @@ export const flags = [
// See https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md#tips
'--disable-dev-shm-usage',

'--enable-automation',
'--disable-print-preview',
// https://github.com/cypress-io/cypress/issues/5132
'--disable-ipc-flooding-protection',

// Taken from https://github.com/cypress-io/cypress/blob/develop/packages/server/lib/browsers/chrome.ts
// "--disable-background-networking"
'--disable-web-resources',
Expand Down
5 changes: 3 additions & 2 deletions src/lib/tasks/Login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ export class LoginTask extends Task<LoginTaskParams> {
const usernameInput = await usernameInputLoc.elementHandle({
timeout: 500,
});
await usernameInput?.type(login.username, {
// https://playwright.dev/docs/release-notes#version-138
await usernameInput?.fill(login.username, {
noWaitAfter: true,
timeout: this.timeBudget.getRange(2000, 3000),
});
Expand Down Expand Up @@ -144,7 +145,7 @@ export class LoginTask extends Task<LoginTaskParams> {
const passwordInputLoc = await getInput(page, passwordSel);
if (!('error' in passwordInputLoc)) {
this.log.info('Entering password...');
await passwordInputLoc.type(login.password, {
await passwordInputLoc.fill(login.password, {
noWaitAfter: true,
timeout: this.timeBudget.getRange(2000, 3000),
});
Expand Down
104 changes: 38 additions & 66 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,19 @@ __metadata:
eslint-plugin-node: "npm:11.1.0"
eslint-plugin-prettier: "npm:5.0.1"
eslint-plugin-promise: "npm:6.1.1"
express: "npm:4.18.2"
express: "npm:4.19.2"
hot-shots: "npm:10.0.0"
jest: "npm:29.7.0"
nodemon: "npm:3.0.1"
pino: "npm:8.16.2"
pino-pretty: "npm:10.2.3"
playwright: "npm:1.37.1"
playwright: "npm:1.44.1"
prettier: "npm:3.1.0"
semantic-release: "npm:22.0.8"
ts-jest: "npm:29.1.1"
ts-node: "npm:10.9.1"
typescript: "npm:5.2.2"
undici: "npm:5.27.2"
undici: "npm:5.28.4"
uuid: "npm:9.0.1"
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -2720,26 +2720,6 @@ __metadata:
languageName: node
linkType: hard

"body-parser@npm:1.20.1":
version: 1.20.1
resolution: "body-parser@npm:1.20.1"
dependencies:
bytes: "npm:3.1.2"
content-type: "npm:~1.0.4"
debug: "npm:2.6.9"
depd: "npm:2.0.0"
destroy: "npm:1.2.0"
http-errors: "npm:2.0.0"
iconv-lite: "npm:0.4.24"
on-finished: "npm:2.4.1"
qs: "npm:6.11.0"
raw-body: "npm:2.5.1"
type-is: "npm:~1.6.18"
unpipe: "npm:1.0.0"
checksum: 5f8d128022a2fb8b6e7990d30878a0182f300b70e46b3f9d358a9433ad6275f0de46add6d63206da3637c01c3b38b6111a7480f7e7ac2e9f7b989f6133fe5510
languageName: node
linkType: hard

"body-parser@npm:1.20.2":
version: 1.20.2
resolution: "body-parser@npm:1.20.2"
Expand Down Expand Up @@ -3313,10 +3293,10 @@ __metadata:
languageName: node
linkType: hard

"cookie@npm:0.5.0":
version: 0.5.0
resolution: "cookie@npm:0.5.0"
checksum: aae7911ddc5f444a9025fbd979ad1b5d60191011339bce48e555cb83343d0f98b865ff5c4d71fecdfb8555a5cafdc65632f6fce172f32aaf6936830a883a0380
"cookie@npm:0.6.0":
version: 0.6.0
resolution: "cookie@npm:0.6.0"
checksum: c1f8f2ea7d443b9331680598b0ae4e6af18a618c37606d1bbdc75bec8361cce09fe93e727059a673f2ba24467131a9fb5a4eec76bb1b149c1b3e1ccb268dc583
languageName: node
linkType: hard

Expand Down Expand Up @@ -4344,16 +4324,16 @@ __metadata:
languageName: node
linkType: hard

"express@npm:4.18.2":
version: 4.18.2
resolution: "express@npm:4.18.2"
"express@npm:4.19.2":
version: 4.19.2
resolution: "express@npm:4.19.2"
dependencies:
accepts: "npm:~1.3.8"
array-flatten: "npm:1.1.1"
body-parser: "npm:1.20.1"
body-parser: "npm:1.20.2"
content-disposition: "npm:0.5.4"
content-type: "npm:~1.0.4"
cookie: "npm:0.5.0"
cookie: "npm:0.6.0"
cookie-signature: "npm:1.0.6"
debug: "npm:2.6.9"
depd: "npm:2.0.0"
Expand All @@ -4379,7 +4359,7 @@ __metadata:
type-is: "npm:~1.6.18"
utils-merge: "npm:1.0.1"
vary: "npm:~1.1.2"
checksum: 869ae89ed6ff4bed7b373079dc58e5dddcf2915a2669b36037ff78c99d675ae930e5fe052b35c24f56557d28a023bb1cbe3e2f2fb87eaab96a1cedd7e597809d
checksum: 3fcd792536f802c059789ef48db3851b87e78fba103423e524144d79af37da7952a2b8d4e1a007f423329c7377d686d9476ac42e7d9ea413b80345d495e30a3a
languageName: node
linkType: hard

Expand Down Expand Up @@ -4701,7 +4681,7 @@ __metadata:
languageName: node
linkType: hard

"fsevents@npm:^2.3.2, fsevents@npm:~2.3.2":
"fsevents@npm:2.3.2, fsevents@npm:^2.3.2, fsevents@npm:~2.3.2":
version: 2.3.2
resolution: "fsevents@npm:2.3.2"
dependencies:
Expand All @@ -4711,7 +4691,7 @@ __metadata:
languageName: node
linkType: hard

"fsevents@patch:fsevents@npm%3A^2.3.2#optional!builtin<compat/fsevents>, fsevents@patch:fsevents@npm%3A~2.3.2#optional!builtin<compat/fsevents>":
"fsevents@patch:fsevents@npm%3A2.3.2#optional!builtin<compat/fsevents>, fsevents@patch:fsevents@npm%3A^2.3.2#optional!builtin<compat/fsevents>, fsevents@patch:fsevents@npm%3A~2.3.2#optional!builtin<compat/fsevents>":
version: 2.3.2
resolution: "fsevents@patch:fsevents@npm%3A2.3.2#optional!builtin<compat/fsevents>::version=2.3.2&hash=df0bf1"
dependencies:
Expand Down Expand Up @@ -8236,23 +8216,27 @@ __metadata:
languageName: node
linkType: hard

"playwright-core@npm:1.37.1":
version: 1.37.1
resolution: "playwright-core@npm:1.37.1"
"playwright-core@npm:1.44.1":
version: 1.44.1
resolution: "playwright-core@npm:1.44.1"
bin:
playwright-core: cli.js
checksum: 9db000892cbe330d5e047e78de11febf53f708bcd8bacaf727eceedb57d67abc7a74e6bb793dabce13b420da8896e6fef840ba1bb9ace2dac3ade3b81f801502
checksum: f79f9022bbb760daed371e36c802b27d43dc75e67de4d139d83b47feea51c8b884f3296cce85c3afa71c942290cef1b4369cd9ddf4dda5457a0a81772c73b50a
languageName: node
linkType: hard

"playwright@npm:1.37.1":
version: 1.37.1
resolution: "playwright@npm:1.37.1"
"playwright@npm:1.44.1":
version: 1.44.1
resolution: "playwright@npm:1.44.1"
dependencies:
playwright-core: "npm:1.37.1"
fsevents: "npm:2.3.2"
playwright-core: "npm:1.44.1"
dependenciesMeta:
fsevents:
optional: true
bin:
playwright: cli.js
checksum: 647cac5e263f0134823e76e21eb7b4c003215fbfb67a16cf3f582c6b37ca032912e0fcf6dea4c5ce763b45a1c38c6feb1f22fe77a07e694d90282a07994c1465
checksum: 3207178a78f1c971dddf99c9a08052e462c882092e0d47e3dd8287ced40897a49e387e545a61d31e5d68f7e443d7818660aa12ce43ab662d01d95bcfcfeca2ca
languageName: node
linkType: hard

Expand Down Expand Up @@ -8328,9 +8312,9 @@ __metadata:
linkType: hard

"process-warning@npm:^2.0.0":
version: 2.2.0
resolution: "process-warning@npm:2.2.0"
checksum: 3dcd606e31fd9bbd53e0ff62f4b3ab0786c64c9c1b8305b4bcb832cdbcd70d091747d708054e6eb8a92f2d2d391eb06f65ef4665d36975c091500b2ff4d470f6
version: 2.3.2
resolution: "process-warning@npm:2.3.2"
checksum: 64cea6878a60e5d1d3648c1736c127b46d5830092bc189ff65b90abbbf746d69ca91eaeec3284f95b0a58965bb016813da787004b556f764ba439addf2eabdb0
languageName: node
linkType: hard

Expand Down Expand Up @@ -8485,18 +8469,6 @@ __metadata:
languageName: node
linkType: hard

"raw-body@npm:2.5.1":
version: 2.5.1
resolution: "raw-body@npm:2.5.1"
dependencies:
bytes: "npm:3.1.2"
http-errors: "npm:2.0.0"
iconv-lite: "npm:0.4.24"
unpipe: "npm:1.0.0"
checksum: 280bedc12db3490ecd06f740bdcf66093a07535374b51331242382c0e130bb273ebb611b7bc4cba1b4b4e016cc7b1f4b05a6df885a6af39c2bc3b94c02291c84
languageName: node
linkType: hard

"raw-body@npm:2.5.2":
version: 2.5.2
resolution: "raw-body@npm:2.5.2"
Expand Down Expand Up @@ -9623,11 +9595,11 @@ __metadata:
linkType: hard

"thread-stream@npm:^2.0.0":
version: 2.3.0
resolution: "thread-stream@npm:2.3.0"
version: 2.7.0
resolution: "thread-stream@npm:2.7.0"
dependencies:
real-require: "npm:^0.2.0"
checksum: a1e54e84bd04159ccea0b0ce5ee04afab75d8a0a68927b482bf56997f6ae55f2abe202fee681251e47510e0ac09b8b68b1b0b83c5c790e3e44a310a878100b7c
checksum: 03e743a2ccb2af5fa695d2e4369113336ee9b9f09c4453d50a222cbb4ae3af321bff658e0e5bf8bfbce9d7f5a7bf6262d12a2a365e160f4e76380ec624d32e7b
languageName: node
linkType: hard

Expand Down Expand Up @@ -10045,12 +10017,12 @@ __metadata:
languageName: node
linkType: hard

"undici@npm:5.27.2":
version: 5.27.2
resolution: "undici@npm:5.27.2"
"undici@npm:5.28.4":
version: 5.28.4
resolution: "undici@npm:5.28.4"
dependencies:
"@fastify/busboy": "npm:^2.0.0"
checksum: 2bf96b102fb84568fb235bdf6e1e352e5d2bf99566b243cd1b13b41578bf9dd5c7c3d3d82192b20a3fec61fe7a528f9d80cd5b4555ce65405c06c69b023013de
checksum: a666a9f5ac4270c659fafc33d78b6b5039a0adbae3e28f934774c85dcc66ea91da907896f12b414bd6f578508b44d5dc206fa636afa0e49a4e1c9e99831ff065
languageName: node
linkType: hard

Expand Down

0 comments on commit 0ab0095

Please sign in to comment.