Skip to content

Commit ce46ce4

Browse files
committed
Refactor to use playwright-core instead of playwright
1 parent c1e7d85 commit ce46ce4

File tree

5 files changed

+6
-38
lines changed

5 files changed

+6
-38
lines changed

dockerfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
FROM mcr.microsoft.com/playwright:v1.55.0-jammy AS base
2-
1+
FROM mcr.microsoft.com/playwright:v1.55.0-jammy AS deps
32
WORKDIR /app
4-
5-
FROM base AS deps
3+
ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
64
COPY package.json package-lock.json ./
75
RUN npm ci --no-audit --no-fund
86

package-lock.json

Lines changed: 1 addition & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
"start": "node dist/index.js"
99
},
1010
"dependencies": {
11+
"playwright-core": "1.55.0",
1112
"devtools-protocol": "^0.0.1510116",
1213
"env-var": "^7.5.0",
13-
"playwright": "^1.55.0",
1414
"sharp": "^0.34.3",
1515
"ws": "^8.18.3",
1616
"xxhash-wasm": "^1.1.0"

src/browser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { chromium } from 'playwright';
1+
import { chromium } from 'playwright-core';
22
import { initCdpRootAsync, waitForCdpReadyAsync } from './cdpRoot.js';
33

44
const DEBUG_PORT = +(process.env.DEBUG_PORT || 9221);

src/deviceManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { CDPSession } from "playwright";
1+
import { CDPSession } from "playwright-core";
22
import sharp from "sharp";
33
import env from "env-var";
44
import { resolveDevice, loadDeviceMap } from "./config.js";

0 commit comments

Comments
 (0)