{"name":"find-chrome-bin","version":"2.0.1","description":"Finds local Chromium binary to use it with puppeteer-core","main":"index.js","exports":{"import":"./index.js"},"keywords":["chrome","chromium","headless","find-chrome","puppeteer-core","browser-fetcher","puppeteer"],"license":"MIT","author":{"name":"mbalabash","email":"maksim.balabash@gmail.com"},"engines":{"node":">=18.0.0"},"type":"module","types":"./index.d.ts","scripts":{"unit":"tsm node_modules/uvu/bin.js test/","check":"eslint . && check-dts && size-limit","test":"yarn unit && yarn check"},"dependencies":{"@puppeteer/browsers":"^1.8.0"},"devDependencies":{"@logux/eslint-config":"^52.0.2","@size-limit/preset-small-lib":"^11.0.0","check-dts":"^0.7.2","eslint":"^8.54.0","eslint-config-standard":"^17.1.0","eslint-plugin-import":"^2.29.0","eslint-plugin-n":"^16.3.1","eslint-plugin-node":"^11.1.0","eslint-plugin-prefer-let":"^3.0.1","eslint-plugin-promise":"^6.1.1","nanospy":"^1.0.0","puppeteer-core":"^21.5.2","size-limit":"^11.0.0","tsm":"^2.3.0","typescript":"^5.3.2","uvu":"^0.5.6"},"eslintConfig":{"extends":"@logux/eslint-config"},"eslintIgnore":["example/index.js"],"size-limit":[{"import":"{ delay }","path":"index.js","limit":"4 kB","ignore":["path","fs","child_process","os"]}],"prettier":{"arrowParens":"avoid","quoteProps":"as-needed","semi":false,"singleQuote":true,"trailingComma":"none"},"repository":{"type":"git","url":"git+https://github.com/mbalabash/find-chrome-bin.git"},"bugs":{"url":"https://github.com/mbalabash/find-chrome-bin/issues"},"homepage":"https://github.com/mbalabash/find-chrome-bin#readme","_id":"find-chrome-bin@2.0.1","gitHead":"69fbc87481ac655216b346771d6099926e5c5bda","_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-aDwC2y0dLxt0GFmQ+q8bqBCZ10VW9zYT/lNV806tRDqDAh5XpkTWulB96RKDHDuKu36m/dEvhmhD5IU237oOTg==","shasum":"e91a5496b7118bb9e3b4c306b25bda9616b572cb","tarball":"http://registry-npm.ywwl.com/find-chrome-bin/download/find-chrome-bin-2.0.1.tgz","fileCount":14,"unpackedSize":19032,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB+EtB8XIkfmP3VKOE2yHHl7nqPPrFAgAHYbdCubw4G8AiAXoULlqZg0lEti2UVp8rSi5v8zXNVPi9X5TkQ2YuzUrQ=="}],"size":6766,"noattachment":false,"key":"/find-chrome-bin/-/find-chrome-bin-2.0.1.tgz"},"_npmUser":{"name":"mbalabash","email":"maksim.balabash@gmail.com"},"directories":{},"maintainers":[{"name":"mbalabash","email":"maksim.balabash@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/find-chrome-bin_2.0.1_1701872991442_0.9654663115444226"},"_hasShrinkwrap":false,"readme":"# Finds local Chromium to use it with puppeteer-core\n\n- **Cross-platform.** Works on win, mac and linux.\n\n- **Small.** Only 2.4 kB.\n\n- **Zero-dependency.**\n\n## Usage\n\nBy default, it tries to find Chromium v85+ binary with you can then use for launching puppeteer-core for your needs.\n\nRespects `CHROMIUM_EXECUTABLE_PATH` and `PUPPETEER_EXECUTABLE_PATH` environment variables for CI purposes.\n\n```js\nimport { findChrome } from 'find-chrome-bin'\nconst chromeInfo = await findChrome()\nconsole.log(chromeInfo)\n// { browser: \"Google Chrome 96.0.4664.45\", executablePath: \"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome\" }\n```\n\n### Specifying `min` and/or `max` Chromium versions\n\nYou can configure a suitable version using `min` and `max` options.\n\n```js\nimport { findChrome } from 'find-chrome-bin'\nconst chromeInfo = await findChrome({ min: 95, max: 97 })\nconsole.log(chromeInfo)\n// { browser: \"Google Chrome 96.0.4664.45\", executablePath: \"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome\" }\n```\n\n### With fallback to download suitable Chromium revision\n\nIt can also download suitable Chromium revision as fallback (you have to provide puppeteer-core entity and Chromium revision to `download` option).\n\n```js\nimport { join } from 'path'\nimport puppeteer from 'puppeteer-core'\nimport { PUPPETEER_REVISIONS } from 'puppeteer-core/lib/cjs/puppeteer/revisions.js'\nimport { findChrome } from 'find-chrome-bin'\n\nlet chromeInfo = await findChrome({\n  max: 95,\n  download: {\n    puppeteer,\n    path: join('.', 'chrome'),\n    revision: PUPPETEER_REVISIONS.chromium\n  }\n})\nconsole.log(chromeInfo)\n// { browser: \"Chromium 94.0.4606.0\", executablePath: \"/Users/mbalabash/Projects/opensource/find-chrome-bin/example/chrome/mac-911515/chrome-mac/Chromium.app/Contents/MacOS/Chromium\" }\n```\n\n## Install\n\n```js\nnpm i find-chrome-bin\n```\n\nor\n\n```js\nyarn add find-chrome-bin\n```\n\n## License\n\nMIT\n","publish_time":1701872991757,"_cnpm_publish_time":1701872991757,"dist-tags":{"latest":"2.0.4"}}