diff --git a/.changeset/playwright-dry-run-format.md b/.changeset/playwright-dry-run-format.md new file mode 100644 index 00000000000..044d37ed208 --- /dev/null +++ b/.changeset/playwright-dry-run-format.md @@ -0,0 +1,5 @@ +--- +"@trigger.dev/build": patch +--- + +Support Playwright 1.58+ dry-run output when installing browsers in the Playwright build extension. diff --git a/packages/build/src/extensions/playwright.ts b/packages/build/src/extensions/playwright.ts index 0931a4855c7..19df32ece56 100644 --- a/packages/build/src/extensions/playwright.ts +++ b/packages/build/src/extensions/playwright.ts @@ -317,7 +317,9 @@ class PlaywrightExtension implements BuildExtension { Array.from(browsersToInstall).forEach((browser) => { instructions.push( - `RUN grep -A5 -m1 "browser: ${browser}" /tmp/browser-info.txt > /tmp/${browser}-info.txt`, + // Playwright ≤1.57: "browser: chromium version ..." + // Playwright ≥1.58: "Chrome for Testing ... (playwright chromium v...)" + `RUN grep -A5 -m1 -E "browser: ${browser}|playwright ${browser}" /tmp/browser-info.txt > /tmp/${browser}-info.txt`, `RUN INSTALL_DIR=$(grep "Install location:" /tmp/${browser}-info.txt | cut -d':' -f2- | xargs) && \ DIR_NAME=$(basename "$INSTALL_DIR") && \