Skip to content

Commit e19c36a

Browse files
committed
Update to new Patchright Patch Infrastructure
1 parent d463d85 commit e19c36a

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

.github/workflows/patchright_workflow.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,17 @@ jobs:
6565
cd playwright
6666
npm ci
6767
68+
- name: Copy Patchright Patch Scripts
69+
if: steps.version_check.outputs.proceed == 'true'
70+
run: |
71+
git clone https://github.com/Kaliiiiiiiiii-Vinyzu/patchright.git
72+
cp -r patchright/driver_patches ./driver_patches
73+
rm -rf patchright
74+
curl -s "https://raw.githubusercontent.com/Kaliiiiiiiiii-Vinyzu/patchright/refs/heads/main/patchright_driver_patch.js" | tail -n +13 >> patchright_nodejs_patch.js
75+
6876
- name: Patch Playwright-NodeJS Package
6977
if: steps.version_check.outputs.proceed == 'true'
7078
run: |
71-
curl -s "https://raw.githubusercontent.com/Kaliiiiiiiiii-Vinyzu/patchright/refs/heads/main/patchright_driver_patch.js" | tail -n +10 >> patchright_nodejs_patch.js
7279
cd playwright
7380
node "../patchright_nodejs_patch.js"
7481

patchright_nodejs_patch.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import fs from "node:fs/promises";
2-
import { Project, SyntaxKind, IndentationText } from "ts-morph";
2+
import path from 'path';
3+
import { Project, SyntaxKind, IndentationText, ObjectLiteralExpression } from "ts-morph";
34
import YAML from "yaml";
45

6+
import * as patches from "./driver_patches/index.js";
7+
58
const project = new Project({
69
manipulationSettings: {
710
indentationText: IndentationText.TwoSpaces,

0 commit comments

Comments
 (0)