From 3194ed6de117569995683fe299b5eb1ea6f4f80a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jind=C5=99ich=20B=C3=A4r?= Date: Mon, 26 Oct 2026 15:43:21 +0100 Subject: [PATCH] chore: switch the Camoufox image to the official camoufox package --- .../version-matrix/src/matrices/node/playwright.ts | 4 ++-- .../actions/version-matrix/src/shared/camoufox.test.ts | 8 ++++---- .github/actions/version-matrix/src/shared/camoufox.ts | 4 ++-- .github/scripts/set-dependency-versions.js | 2 +- Makefile | 2 +- node-playwright-camoufox/Dockerfile | 2 +- node-playwright-camoufox/firefox_test.js | 2 +- node-playwright-camoufox/package.json | 2 +- node-playwright-camoufox/package.slim.json | 2 +- 9 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/actions/version-matrix/src/matrices/node/playwright.ts b/.github/actions/version-matrix/src/matrices/node/playwright.ts index 5247d32e3..3c84347b0 100644 --- a/.github/actions/version-matrix/src/matrices/node/playwright.ts +++ b/.github/actions/version-matrix/src/matrices/node/playwright.ts @@ -18,7 +18,7 @@ import { fetchNodeRuntimeVersions } from '../../shared/runtime-versions.ts'; const playwrightVersions = await fetchPackageVersions('playwright'); const apifyVersions = await fetchPackageVersions('apify'); const crawleeVersions = await fetchPackageVersions('crawlee'); -const camoufoxVersions = await fetchPackageVersions('camoufox-js'); +const camoufoxVersions = await fetchPackageVersions('camoufox'); const nodeRuntimeVersions = await fetchNodeRuntimeVersions(supportedNodeVersions); if (!shouldUseLastFive) { @@ -46,7 +46,7 @@ console.error('Latest apify version', latestApifyVersion); console.error('Latest crawlee version', latestCrawleeVersion); console.error('Latest camoufox version', latestCamoufoxVersion); console.error( - `Playwright versions for camoufox (camoufox-js@${latestCamoufoxVersion} supports ${camoufoxPlaywrightRange ?? 'nothing we could resolve'})`, + `Playwright versions for camoufox (camoufox@${latestCamoufoxVersion} supports ${camoufoxPlaywrightRange ?? 'nothing we could resolve'})`, camoufoxPlaywrightVersions.length ? camoufoxPlaywrightVersions : '(none, camoufox images will be skipped)', ); console.error('Node runtime versions', nodeRuntimeVersions); diff --git a/.github/actions/version-matrix/src/shared/camoufox.test.ts b/.github/actions/version-matrix/src/shared/camoufox.test.ts index 41f572467..e8c72daa3 100644 --- a/.github/actions/version-matrix/src/shared/camoufox.test.ts +++ b/.github/actions/version-matrix/src/shared/camoufox.test.ts @@ -16,10 +16,10 @@ describe('resolveCamoufoxPlaywrightVersions', () => { assert.deepEqual(versions, ['1.56.0', '1.59.0', '1.60.0']); }); - it('reads the supported range from the camoufox-js package on npm', async () => { - const { range, versions } = await resolveCamoufoxPlaywrightVersions('node', '0.12.0', playwrightVersions); + it('reads the supported range from the camoufox package on npm', async () => { + const { range, versions } = await resolveCamoufoxPlaywrightVersions('node', '0.5.8', playwrightVersions); - // camoufox-js declares the range as a `playwright-core` peer dependency. What it declares is up to camoufox and + // camoufox declares the range as a `playwright-core` peer dependency. What it declares is up to camoufox and // is expected to change, so this asserts that we read a range and apply it - not what the range happens to be. assert.notEqual(range, undefined); assert.deepEqual( @@ -49,7 +49,7 @@ describe('fetchPackageManifest', () => { }); it('reads the declared peer dependency ranges of a published version', async () => { - const manifest = await fetchPackageManifest('camoufox-js', '0.12.0'); + const manifest = await fetchPackageManifest('camoufox', '0.5.8'); assert.equal(typeof manifest.peerDependencies?.['playwright-core'], 'string'); }); diff --git a/.github/actions/version-matrix/src/shared/camoufox.ts b/.github/actions/version-matrix/src/shared/camoufox.ts index 410c27036..ef02030f3 100644 --- a/.github/actions/version-matrix/src/shared/camoufox.ts +++ b/.github/actions/version-matrix/src/shared/camoufox.ts @@ -9,7 +9,7 @@ import { fetchPackageVersion, findRequirementSpecifierSet, pythonSpecifierSetToS * That range is not pinned here. It is read from the camoufox package metadata instead, so that the images follow * whatever camoufox currently supports: * - * - `camoufox-js` declares it as a `playwright-core` peer dependency + * - `camoufox` (npm) declares it as a `playwright-core` peer dependency * - `camoufox` (PyPI) declares it as a `playwright` requirement * * Note that the images install camoufox with a caret / compatible-release range, so the version actually installed @@ -18,7 +18,7 @@ import { fetchPackageVersion, findRequirementSpecifierSet, pythonSpecifierSetToS */ const camoufoxPackages = { node: { - packageName: 'camoufox-js', + packageName: 'camoufox', // `playwright` and `playwright-core` are released in lockstep under the same version numbers, so the range // declared for `playwright-core` applies as-is to the `playwright` version installed in the image dependencyName: 'playwright-core', diff --git a/.github/scripts/set-dependency-versions.js b/.github/scripts/set-dependency-versions.js index 87f1f6a14..e1f9d1661 100644 --- a/.github/scripts/set-dependency-versions.js +++ b/.github/scripts/set-dependency-versions.js @@ -11,7 +11,7 @@ const DEPENDENCY_VERSIONS = { 'playwright-chromium': process.env.PLAYWRIGHT_VERSION, 'playwright-firefox': process.env.PLAYWRIGHT_VERSION, 'playwright-webkit': process.env.PLAYWRIGHT_VERSION, - 'camoufox-js': process.env.CAMOUFOX_VERSION, + 'camoufox': process.env.CAMOUFOX_VERSION, }; for (const path of PACKAGE_JSON_PATHS) { diff --git a/Makefile b/Makefile index 15d46f00b..0e9d35032 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ NODE_VERSION ?= 22 # Tag must have format: v1.42.0- PLAYWRIGHT_VERSION ?= v1.57.0- -CAMOUFOX_VERSION ?= 0.12.0 +CAMOUFOX_VERSION ?= 0.5.8 # Tag must have format: 22.6.2 PUPPETEER_VERSION ?= 24.34.0 # Set SLIM=1 to build the -slim variant of a node image (uses package.slim.json) diff --git a/node-playwright-camoufox/Dockerfile b/node-playwright-camoufox/Dockerfile index 5f22f6ac5..f551aae2f 100644 --- a/node-playwright-camoufox/Dockerfile +++ b/node-playwright-camoufox/Dockerfile @@ -138,7 +138,7 @@ RUN if [ "$SLIM" = "1" ]; then mv package.slim.json package.json; else rm packag RUN npm --quiet set progress=false \ \ # Install Camoufox browser - && PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=0 npx camoufox-js fetch \ + && npx camoufox fetch \ # Resolve both flat and versioned Camoufox cache layouts. && CAMOUFOX_BINARY="$(find /home/myuser/.cache/camoufox -type f -name camoufox-bin)" \ && test -x "$CAMOUFOX_BINARY" \ diff --git a/node-playwright-camoufox/firefox_test.js b/node-playwright-camoufox/firefox_test.js index d692422e4..e5cb3c87f 100644 --- a/node-playwright-camoufox/firefox_test.js +++ b/node-playwright-camoufox/firefox_test.js @@ -1,5 +1,5 @@ const playwright = require('playwright'); -const { launchOptions: camoufoxLaunchOptions } = require('camoufox-js'); +const { launchOptions: camoufoxLaunchOptions } = require('camoufox'); const testPageLoading = async (browser) => { const page = await browser.newPage(); diff --git a/node-playwright-camoufox/package.json b/node-playwright-camoufox/package.json index e3d603c6c..c0049959c 100644 --- a/node-playwright-camoufox/package.json +++ b/node-playwright-camoufox/package.json @@ -8,7 +8,7 @@ }, "dependencies": { "apify": "APIFY_VERSION", - "camoufox-js": "CAMOUFOX_VERSION", + "camoufox": "CAMOUFOX_VERSION", "crawlee": "CRAWLEE_VERSION", "impit": "latest", "playwright": "PLAYWRIGHT_VERSION", diff --git a/node-playwright-camoufox/package.slim.json b/node-playwright-camoufox/package.slim.json index 680a33812..558c448a8 100644 --- a/node-playwright-camoufox/package.slim.json +++ b/node-playwright-camoufox/package.slim.json @@ -7,7 +7,7 @@ "start": "node main.js" }, "dependencies": { - "camoufox-js": "CAMOUFOX_VERSION", + "camoufox": "CAMOUFOX_VERSION", "impit": "latest", "playwright": "PLAYWRIGHT_VERSION" },