{"name":"@puppeteer/browsers","version":"3.0.3","keywords":["puppeteer","browsers"],"author":{"name":"The Chromium Authors"},"license":"Apache-2.0","_id":"@puppeteer/browsers@3.0.3","maintainers":[{"name":"mathias","email":"mathias@qiwi.be"},{"name":"google-wombot","email":"node-team-npm+wombot@google.com"}],"homepage":"https://github.com/puppeteer/puppeteer/tree/main#readme","bugs":{"url":"https://github.com/puppeteer/puppeteer/issues"},"bin":{"browsers":"lib/main-cli.js"},"dist":{"shasum":"61388895e2f3665b59491152d204b3d9096bddd6","tarball":"http://registry-npm.ywwl.com/@puppeteer/browsers/download/@puppeteer/browsers-3.0.3.tgz","fileCount":102,"integrity":"sha512-v3YaiGpzUTgOZkHBFR0iZg58Vto25SqBQxfLUXDiofJccwVl6Mlr7BdLCS1NZgxikdeIHf936cxYWL9IZp3tow==","signatures":[{"sig":"MEQCIH4mtNBFxfYlQTK+5K7c/QjQ9j1l9peA61WYMGdCl+LjAiBTu76Vn545UVCrsTF9miApMoGvpCFx6jg/crtH5B3K8w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@puppeteer%2fbrowsers@3.0.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":404262,"size":85347,"noattachment":false,"key":"/@puppeteer/browsers/-/@puppeteer/browsers-3.0.3.tgz"},"main":"./lib/main.js","type":"module","types":"./lib/main.d.ts","module":"./lib/main.js","wireit":{"test":{"files":[".mocharc.cjs"],"command":"node tools/downloadTestBrowsers.mjs && mocha","dependencies":["build:test"]},"build":{"clean":"if-file-deleted","files":["src/**/*.ts","tsconfig.json"],"output":["lib/**"],"command":"tsc -b && node --experimental-strip-types ../../tools/chmod.ts 755 lib/main-cli.js"},"build:docs":{"files":["api-extractor.docs.json","lib/main.d.ts","tsconfig.json"],"command":"api-extractor run --local --config \"./api-extractor.docs.json\"","dependencies":["build"]},"build:test":{"files":["test/**/*.ts","test/src/tsconfig.json"],"output":["test/build/**","!test/build/package.json"],"command":"tsc -b test/src/tsconfig.json","dependencies":["build","../testserver:build"]}},"engines":{"node":">=22.12.0"},"gitHead":"acb4b9ee4403eaeb7acc33a341db4a5032a24e7c","scripts":{"test":"wireit","build":"wireit","clean":"../../tools/clean.mjs","build:docs":"wireit","build:test":"wireit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:8c1b24d8-c2ae-43e7-8e72-3a86ebe7b7b0"}},"repository":{"url":"git+https://github.com/puppeteer/puppeteer.git#main","type":"git"},"_npmVersion":"11.12.1","description":"Download and launch browsers","directories":{},"_nodeVersion":"24.15.0","dependencies":{"debug":"^4.4.3","yargs":"^17.7.2","semver":"^7.7.4","tar-fs":"^3.1.1","progress":"^2.0.3"},"_hasShrinkwrap":false,"devDependencies":{"@types/ws":"8.18.1","proxy-agent":">=8.0.1","@types/debug":"4.1.13","@types/yargs":"17.0.33","@types/tar-fs":"2.0.4","@types/progress":"2.0.7"},"peerDependencies":{"proxy-agent":">=8.0.1"},"peerDependenciesMeta":{"proxy-agent":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/browsers_3.0.3_1779087656287_0.7123075237181695","host":"s3://npm-registry-packages-npm-production"},"readme":"# @puppeteer/browsers\n\nManage and launch browsers/drivers from a CLI or programmatically.\n\n## System requirements\n\n- A compatible Node version (see `engines` in `package.json`).\n- For Firefox downloads:\n  - Linux builds: `xz` and `bzip2` utilities are required to unpack `.tar.gz` and `.tar.bz2` archives.\n  - MacOS builds: `hdiutil` is required to unpack `.dmg` archives.\n- For Chrome downloads:\n  - On Linux/MacOS: `unzip`.\n  - On Windows: `tar.exe`.\n\n## CLI\n\nUse `npx` to run the CLI:\n\n```bash\n# This will install and run the @puppeteer/browsers package.\n# If it is already installed in the current directory, the installed\n# version will be used.\nnpx @puppeteer/browsers --help\n```\n\nBuilt-in per-command `help` will provide all documentation you need to use the CLI.\n\n```bash\nnpx @puppeteer/browsers --help # help for all commands\nnpx @puppeteer/browsers install --help # help for the install command\nnpx @puppeteer/browsers launch --help # help for the launch command\nnpx @puppeteer/browsers clear --help # help for the clear command\nnpx @puppeteer/browsers list --help # help for the list command\n```\n\nYou can specify the version of the `@puppeteer/browsers` when using\n`npx`:\n\n```bash\n# Always install and use the latest version from the registry.\nnpx @puppeteer/browsers@latest --help\n# Always use a specific version.\nnpx @puppeteer/browsers@2.4.1 --help\n# Always install the latest version and automatically confirm the installation.\nnpx --yes @puppeteer/browsers@latest --help\n```\n\nTo clear all installed browsers, use the `clear` command:\n\n```bash\nnpx @puppeteer/browsers clear\n```\n\nTo list all installed browsers, use the `list` command:\n\n```bash\nnpx @puppeteer/browsers list\n```\n\nSome example to give an idea of what the CLI looks like (use the `--help` command for more examples):\n\n```sh\n# Download the latest available Chrome for Testing binary corresponding to the Stable channel.\nnpx @puppeteer/browsers install chrome@stable\n\n# Download a specific Chrome for Testing version.\nnpx @puppeteer/browsers install chrome@116.0.5793.0\n\n# Download the latest Chrome for Testing version for the given milestone.\nnpx @puppeteer/browsers install chrome@117\n\n# Download the latest available ChromeDriver version corresponding to the Canary channel.\nnpx @puppeteer/browsers install chromedriver@canary\n\n# Download a specific ChromeDriver version.\nnpx @puppeteer/browsers install chromedriver@116.0.5793.0\n\n# On Ubuntu/Debian and only for Chrome, install the browser and required system dependencies.\n# If the browser version has already been installed, the command\n# will still attempt to install system dependencies.\n# Requires root privileges.\nnpx puppeteer browsers install chrome --install-deps\n```\n\n## Known limitations\n\n1. Launching the system browsers is only possible for Chrome/Chromium.\n\n## Proxies\n\nThe library and CLI respect `HTTP_PROXY`, `HTTPS_PROXY` and `NO_PROXY` environment variables. For them to work, you must have the `proxy-agent` package installed:\n\n```bash\nnpm install proxy-agent\n```\n\n## Debugging\n\nTo enable verbose logging for `@puppeteer/browsers` operations (like download progress, installation steps, and launching parameters), use Node.js's built-in `NODE_DEBUG` environment variable.\n\n```bash\nenv NODE_DEBUG=\"puppeteer:browsers:*\" npx @puppeteer/browsers install chrome@stable\n```\n\nThe following debug channels are available:\n\n- `puppeteer:browsers:cache`: Caching operations.\n- `puppeteer:browsers:fileUtil`: Decompressing and other file utility operations.\n- `puppeteer:browsers:install`: Download and install progress.\n- `puppeteer:browsers:launcher`: Browser launching parameters and process state.\n\n## Custom Providers\n\nYou can implement custom browser providers to download from alternative sources like corporate mirrors, private repositories, or specialized browser builds.\n\n```typescript\nimport {\n  BrowserProvider,\n  DownloadOptions,\n  Browser,\n  BrowserPlatform,\n} from '@puppeteer/browsers';\n\nclass SimpleMirrorProvider implements BrowserProvider {\n  constructor(private mirrorUrl: string) {}\n\n  supports(options: DownloadOptions): boolean {\n    return options.browser === Browser.CHROME;\n  }\n\n  getDownloadUrl(options: DownloadOptions): URL | null {\n    const {buildId, platform} = options;\n    const filenameMap = {\n      [BrowserPlatform.LINUX]: 'chrome-linux64.zip',\n      [BrowserPlatform.MAC]: 'chrome-mac-x64.zip',\n      [BrowserPlatform.MAC_ARM]: 'chrome-mac-arm64.zip',\n      [BrowserPlatform.WIN32]: 'chrome-win32.zip',\n      [BrowserPlatform.WIN64]: 'chrome-win64.zip',\n    };\n    const filename = filenameMap[platform];\n    if (!filename) return null;\n    return new URL(`${this.mirrorUrl}/chrome/${buildId}/${filename}`);\n  }\n\n  getExecutablePath(options: DownloadOptions): string {\n    const {platform} = options;\n    if (\n      platform === BrowserPlatform.MAC ||\n      platform === BrowserPlatform.MAC_ARM\n    ) {\n      return 'chrome-mac/Chromium.app/Contents/MacOS/Chromium';\n    } else if (platform === BrowserPlatform.LINUX) {\n      return 'chrome-linux64/chrome';\n    } else if (platform.includes('win')) {\n      return 'chrome-win64/chrome.exe';\n    }\n    throw new Error(`Unsupported platform: ${platform}`);\n  }\n}\n```\n\nUse with the `install` API:\n\n```typescript\nimport {install} from '@puppeteer/browsers';\n\nconst customProvider = new SimpleMirrorProvider('https://internal.company.com');\n\nawait install({\n  browser: Browser.CHROME,\n  buildId: '120.0.6099.109',\n  platform: BrowserPlatform.LINUX,\n  cacheDir: '/tmp/puppeteer-cache',\n  providers: [customProvider],\n});\n```\n\nMultiple providers can be chained - they're tried in order until one succeeds, with a default provider such as Chrome for Testing, as an automatic fallback.\n\n:::caution\nCustom providers are NOT officially supported by Puppeteer. You accept full responsibility for binary compatibility, testing, and maintenance.\n:::\n\n## API\n\nThe programmatic API allows installing and launching browsers from your code. See the `test` folder for examples on how to use the `install`, `canInstall`, `launch`, `computeExecutablePath`, `computeSystemExecutablePath`, and other methods.\n","publish_time":1779087656501,"_cnpm_publish_time":1779087656501,"dist-tags":{"latest":"3.2.6"}}