{"name":"win-detect-browsers","version":"3.0.0-rc1","description":"Fast browser detection on Windows","author":{"name":"Vincent Weevers"},"license":"MIT","main":"index.js","bin":{"win-detect-browsers":"cli.js"},"files":["lib","index.js","cli.js"],"scripts":{"test":"node test.js"},"dependencies":{"after":"~0.8.2","chalk":"~2.4.1","debug":"~3.1.0","existent":"~1.0.1","pascal-case":"~2.0.1","pe-machine-type":"~1.0.0","pretty-tree":"~1.0.0","resolve":"~1.7.1","which":"~1.3.0","windows-env":"~1.0.1","xtend":"^4.0.0","yargs":"~11.0.0","registry-js":"~1.0.7","win-version-info":"~2.0.0"},"optionalDependencies":{"registry-js":"~1.0.7","win-version-info":"~2.0.0"},"devDependencies":{"compare-version":"~0.1.2","tape":"~4.9.0","win-dummy-exe":"0.0.1"},"repository":{"type":"git","url":"git+https://github.com/vweevers/win-detect-browsers.git"},"bugs":{"url":"https://github.com/vweevers/win-detect-browsers/issues"},"homepage":"https://github.com/vweevers/win-detect-browsers","keywords":["browser","browsers","detect","windows","chrome","chromium","canary","firefox","phantomjs","ie","internet-explorer","safari","opera","maxthon","yandex"],"engines":{"node":">=6"},"readme":"# win-detect-browsers\n\n**Fast and native browser detection on Windows. Detects installed versions of Chrome, Chromium, Firefox, PhantomJS, Internet Explorer, Safari, Opera, Maxthon and Yandex.**\n\n[![npm status](http://img.shields.io/npm/v/win-detect-browsers.svg?style=flat-square)](https://www.npmjs.org/package/win-detect-browsers) [![Build status](https://img.shields.io/appveyor/ci/vweevers/win-detect-browsers.svg?style=flat-square)](https://ci.appveyor.com/project/vweevers/win-detect-browsers) [![Dependency Status](https://img.shields.io/david/vweevers/win-detect-browsers.svg?style=flat-square)](https://david-dm.org/vweevers/win-detect-browsers)\n\n## Table of Contents\n\n<details><summary>Click to expand</summary>\n\n- [Usage](#usage)\n- [API](#api)\n- [CLI](#cli)\n- [Install](#install)\n- [Changelog](#changelog)\n- [Background](#background)\n- [License](#license)\n\n</details>\n\n## Usage\n\n**If you are upgrading:** please see [the changelog](#changelog).\n\n```js\nconst detect = require('win-detect-browsers')\n\n// All browsers\ndetect(function (err, browsers) {\n  if (err) throw err\n  console.log(browsers)\n})\n\n// Chrome and Firefox\ndetect(['chrome', 'firefox'], function (err, browsers) {\n  if (err) throw err\n\n  for (let b of browsers) {\n    console.log(b.version) // '57.0.2931.0'\n    console.log(b.channel) // 'canary'\n  }\n})\n```\n\n## API\n\n### `detect([names, ]callback)`\n\n`names` is an array of browser names you want to find. If omitted or empty, it will detect *[everything](http://youtu.be/k1yvvNvlXtg)*. The `callback` receives an error if any and an array of `results`. A result is excluded if its path has no `.exe` extension or if its version could not be read.\n\nEach `result` is an object with the following properties:\n\n- `name` (string): `chrome`, `chromium`, `firefox`, `phantomjs`, `ie`, `safari`, `opera`, `maxthon` or `yandex`\n- `path` (string): absolute path to executable\n- `version` (string)\n- `arch` (string): CPU type the executable was built for: `amd64`, `i386` or [other](https://github.com/vweevers/pe-machine-type#types);\n- `info` (object): executable metadata (see [full sample](#full-sample) below).\n\nAdditional properties are usually available but not guaranteed:\n\n- `channel` (string):\n  - Chrome: `stable`, `canary`, `beta` or `dev`\n  - Firefox: `release`, `developer`, `nightly` or [`esr`](https://www.mozilla.org/en-US/firefox/organizations/faq/)\n  - Older versions of Firefox: `aurora`, `beta` or `rc`;\n  - Opera: `stable`, `beta` or `developer`.\n- `uninstall` (object): Chrome only. Uninstaller info with:\n  - `path` (string): path to installer;\n  - `arguments` (array): arguments to installer in order to uninstall.\n- `bitness` (number): Chrome only. 64 or 32.\n- `guid` (string): Chrome only.\n\n## CLI\n\n```\nwin-detect-browsers [options] [name, name..]\n```\n\nOptions:\n\n- `--help` `-h`: Show help\n- `--version` `-v`: Show CLI version number\n- `--json` `-j`: Print results as JSON array\n- `--summary` `-s`: Less properties;\n- `--debug` `-d`: Enable [debug](https://github.com/visionmedia/debug) scope.\n\n### Sample\n\nOn Windows 10 with `--summary`:\n\n<details><summary>Click to expand</summary>\n\n```\nPHANTOMJS 2 32-bit\n├── Path:    C:\\Users\\vweevers\\AppData\\Roaming\\nvm\\v10.0.0\\node_modules\\phantomjs-prebuilt\\lib\\phantom\\bin\\phantomjs.exe\n└── Version: 2.1.1.0\n\nIE 11 64-bit\n├── Path:    C:\\Program Files\\Internet Explorer\\iexplore.exe\n└── Version: 11.0.17134.1\n\nIE 11 32-bit\n├── Path:    C:\\Program Files (x86)\\Internet Explorer\\iexplore.exe\n└── Version: 11.0.17134.1\n\nCHROME 68 CANARY 64-bit\n├── Path:    C:\\Users\\vweevers\\AppData\\Local\\Google\\Chrome SxS\\Application\\chrome.exe\n├── Version: 68.0.3436.0\n└── GUID:    4EA16AC7-FD5A-47C3-875B-DBF4A2008C20\n\nCHROME 66 STABLE 64-bit\n├── Path:    C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe\n├── Version: 66.0.3359.181\n└── GUID:    8A69D345-D564-463C-AFF1-A69D9E530F96\n\nFIREFOX 61 RELEASE 64-bit\n├── Path:    C:\\Program Files\\Mozilla Firefox\\firefox.exe\n└── Version: 61.0.0.6711\n\nFIREFOX 62 NIGHTLY 64-bit\n├── Path:    C:\\Program Files\\Firefox Nightly\\firefox.exe\n└── Version: 62.0.0.6712\n\nFIREFOX 61 DEVELOPER 64-bit\n├── Path:    C:\\Program Files\\Firefox Developer Edition\\firefox.exe\n└── Version: 61.0.0.6711\n\nOPERA 53 BETA 64-bit\n├── Path:    C:\\Program Files\\Opera beta\\Launcher.exe\n└── Version: 53.0.2907.31\n\nFound 9 browsers in 26 ways within 76ms.\n```\n\n</details>\n\n### Full Sample\n\nOn Windows 10 with `--json`:\n\n<details><summary>Click to expand</summary>\n\n```json\n[\n  {\n    \"name\": \"phantomjs\",\n    \"path\": \"C:\\\\Users\\\\vweevers\\\\AppData\\\\Roaming\\\\nvm\\\\v10.0.0\\\\node_modules\\\\phantomjs-prebuilt\\\\lib\\\\phantom\\\\bin\\\\phantomjs.exe\",\n    \"version\": \"2.1.1.0\",\n    \"arch\": \"i386\",\n    \"info\": {\n      \"FileVersion\": \"2.1.1.0\",\n      \"FileDescription\": \"PhantomJS is a headless WebKit with JavaScript API\",\n      \"LegalCopyright\": \"Copyright (C) Ariya Hidayat 2012\",\n      \"OriginalFilename\": \"phantomjs.exe\",\n      \"ProductName\": \"PhantomJS\",\n      \"ProductVersion\": \"2.1.1\",\n      \"CompanyName\": \"PhantomJS\"\n    }\n  },\n  {\n    \"name\": \"ie\",\n    \"path\": \"C:\\\\Program Files\\\\Internet Explorer\\\\iexplore.exe\",\n    \"version\": \"11.0.17134.1\",\n    \"arch\": \"amd64\",\n    \"info\": {\n      \"FileVersion\": \"11.0.17134.1\",\n      \"CompanyName\": \"Microsoft Corporation\",\n      \"FileDescription\": \"Internet Explorer\",\n      \"InternalName\": \"iexplore\",\n      \"LegalCopyright\": \"© Microsoft Corporation. Alle rechten voorbehouden.\",\n      \"OriginalFilename\": \"IEXPLORE.EXE.MUI\",\n      \"ProductName\": \"Internet Explorer\",\n      \"ProductVersion\": \"11.00.17134.1\"\n    }\n  },\n  {\n    \"name\": \"ie\",\n    \"path\": \"C:\\\\Program Files (x86)\\\\Internet Explorer\\\\iexplore.exe\",\n    \"version\": \"11.0.17134.1\",\n    \"arch\": \"i386\",\n    \"info\": {\n      \"FileVersion\": \"11.0.17134.1\",\n      \"CompanyName\": \"Microsoft Corporation\",\n      \"FileDescription\": \"Internet Explorer\",\n      \"InternalName\": \"iexplore\",\n      \"LegalCopyright\": \"© Microsoft Corporation. Alle rechten voorbehouden.\",\n      \"OriginalFilename\": \"IEXPLORE.EXE.MUI\",\n      \"ProductName\": \"Internet Explorer\",\n      \"ProductVersion\": \"11.00.17134.1\"\n    }\n  },\n  {\n    \"name\": \"firefox\",\n    \"path\": \"C:\\\\Program Files\\\\Mozilla Firefox\\\\firefox.exe\",\n    \"version\": \"61.0.0.6711\",\n    \"channel\": \"release\",\n    \"arch\": \"amd64\",\n    \"info\": {\n      \"FileVersion\": \"61.0.0.6711\",\n      \"LegalCopyright\": \"©Firefox and Mozilla Developers; available under the MPL 2 license.\",\n      \"CompanyName\": \"Mozilla Corporation\",\n      \"FileDescription\": \"Firefox\",\n      \"ProductVersion\": \"61.0\",\n      \"InternalName\": \"Firefox\",\n      \"LegalTrademarks\": \"Firefox is a Trademark of The Mozilla Foundation.\",\n      \"OriginalFilename\": \"../../dist/bin/firefox.exe\",\n      \"ProductName\": \"Firefox\",\n      \"BuildID\": \"20180517141400\"\n    }\n  },\n  {\n    \"name\": \"firefox\",\n    \"path\": \"C:\\\\Program Files\\\\Firefox Developer Edition\\\\firefox.exe\",\n    \"version\": \"61.0.0.6711\",\n    \"channel\": \"developer\",\n    \"arch\": \"amd64\",\n    \"info\": {\n      \"FileVersion\": \"61.0.0.6711\",\n      \"LegalCopyright\": \"©Firefox and Mozilla Developers; available under the MPL 2 license.\",\n      \"CompanyName\": \"Mozilla Corporation\",\n      \"FileDescription\": \"Firefox Developer Edition\",\n      \"ProductVersion\": \"61.0\",\n      \"InternalName\": \"Firefox Developer Edition\",\n      \"LegalTrademarks\": \"Firefox is a Trademark of The Mozilla Foundation.\",\n      \"OriginalFilename\": \"../../dist/bin/firefox.exe\",\n      \"ProductName\": \"Firefox Developer Edition\",\n      \"BuildID\": \"20180517141400\"\n    }\n  },\n  {\n    \"name\": \"firefox\",\n    \"path\": \"C:\\\\Program Files\\\\Firefox Nightly\\\\firefox.exe\",\n    \"version\": \"62.0.0.6712\",\n    \"channel\": \"nightly\",\n    \"arch\": \"amd64\",\n    \"info\": {\n      \"FileVersion\": \"62.0.0.6712\",\n      \"LegalCopyright\": \"©Firefox and Mozilla Developers; available under the MPL 2 license.\",\n      \"CompanyName\": \"Mozilla Corporation\",\n      \"FileDescription\": \"Firefox Nightly\",\n      \"ProductVersion\": \"62.0a1\",\n      \"InternalName\": \"Firefox Nightly\",\n      \"LegalTrademarks\": \"Firefox is a Trademark of The Mozilla Foundation.\",\n      \"OriginalFilename\": \"firefox.exe\",\n      \"ProductName\": \"Firefox Nightly\",\n      \"BuildID\": \"20180518222751\"\n    }\n  },\n  {\n    \"name\": \"chrome\",\n    \"path\": \"C:\\\\Users\\\\vweevers\\\\AppData\\\\Local\\\\Google\\\\Chrome SxS\\\\Application\\\\chrome.exe\",\n    \"version\": \"68.0.3436.0\",\n    \"channel\": \"canary\",\n    \"arch\": \"amd64\",\n    \"bitness\": 64,\n    \"guid\": \"4EA16AC7-FD5A-47C3-875B-DBF4A2008C20\",\n    \"info\": {\n      \"FileVersion\": \"68.0.3436.0\",\n      \"CompanyName\": \"Google Inc.\",\n      \"FileDescription\": \"Google Chrome\",\n      \"InternalName\": \"chrome_exe\",\n      \"LegalCopyright\": \"Copyright 2017 Google Inc. All rights reserved.\",\n      \"OriginalFilename\": \"chrome.exe\",\n      \"ProductName\": \"Google Chrome\",\n      \"ProductVersion\": \"68.0.3436.0\",\n      \"CompanyShortName\": \"Google\",\n      \"ProductShortName\": \"Chrome\",\n      \"LastChange\": \"e0f81fe637f233bf12e821915b72bc8d2194c3f2-refs/branch-heads/3436@{#1}\",\n      \"Official Build\": \"1\"\n    },\n    \"uninstall\": {\n      \"path\": \"C:\\\\Users\\\\vweevers\\\\AppData\\\\Local\\\\Google\\\\Chrome SxS\\\\Application\\\\68.0.3436.0\\\\Installer\\\\setup.exe\",\n      \"arguments\": [\n        \"--uninstall\",\n        \"--chrome-sxs\"\n      ]\n    }\n  },\n  {\n    \"name\": \"chrome\",\n    \"path\": \"C:\\\\Program Files (x86)\\\\Google\\\\Chrome\\\\Application\\\\chrome.exe\",\n    \"version\": \"66.0.3359.181\",\n    \"channel\": \"stable\",\n    \"arch\": \"amd64\",\n    \"bitness\": 64,\n    \"guid\": \"8A69D345-D564-463C-AFF1-A69D9E530F96\",\n    \"info\": {\n      \"FileVersion\": \"66.0.3359.181\",\n      \"CompanyName\": \"Google Inc.\",\n      \"FileDescription\": \"Google Chrome\",\n      \"InternalName\": \"chrome_exe\",\n      \"LegalCopyright\": \"Copyright 2017 Google Inc. All rights reserved.\",\n      \"OriginalFilename\": \"chrome.exe\",\n      \"ProductName\": \"Google Chrome\",\n      \"ProductVersion\": \"66.0.3359.181\",\n      \"CompanyShortName\": \"Google\",\n      \"ProductShortName\": \"Chrome\",\n      \"LastChange\": \"a10b9cedb40738cb152f8148ddab4891df876959-refs/branch-heads/3359@{#828}\",\n      \"Official Build\": \"1\"\n    },\n    \"uninstall\": {\n      \"path\": \"C:\\\\Program Files (x86)\\\\Google\\\\Chrome\\\\Application\\\\66.0.3359.181\\\\Installer\\\\setup.exe\",\n      \"arguments\": [\n        \"--uninstall\",\n        \"--system-level\",\n        \"--verbose-logging\"\n      ]\n    }\n  },\n  {\n    \"name\": \"opera\",\n    \"path\": \"C:\\\\Program Files\\\\Opera beta\\\\Launcher.exe\",\n    \"version\": \"53.0.2907.31\",\n    \"channel\": \"beta\",\n    \"arch\": \"amd64\",\n    \"info\": {\n      \"FileVersion\": \"53.0.2907.31\",\n      \"LegalCopyright\": \"Copyright Opera Software 2018\",\n      \"InternalName\": \"Opera\",\n      \"CompanyName\": \"Opera Software\",\n      \"ProductName\": \"Opera beta Internet Browser\",\n      \"ProductVersion\": \"53.0.2907.31\",\n      \"FileDescription\": \"Opera beta Internet Browser\"\n    }\n  }\n]\n```\n\n</details>\n\n## Install\n\nWith [npm](https://npmjs.org) do:\n\n```bash\nnpm install win-version-info     # For API\nnpm install win-version-info -g  # For CLI\n```\n\n## Changelog\n\n### 3.0.0-rc1\n\n#### Changed\n\n- Error-first callback: `cb(err, browsers)` instead of `cb(browsers)`\n- Remove streams: with new metadata being discovered via multiple avenues, results have to be merged before we can emit something;\n- More than 2x faster by using native modules: [registry-js](https://www.npmjs.com/package/registry-js) to read the Windows Registry and [win-version-info](https://www.npmjs.org/package/win-version-info) to read executable metadata. No longer spawns child processes.\n\n#### Added\n\n- Add Node 6, 8, 9, 10\n- Add release channel for Chrome, Firefox and Opera\n- Add executable metadata and CPU type to all browsers\n- Support `phantomjs-prebuilt` (2.x) as well as `phantomjs` (1.x)\n- Detect Firefox ESR\n- Add Firefox Developer Edition default location;\n- Add Firefox Nightly default location.\n\n#### Removed\n\n- Drop Node 0.10, 4, 5\n- Drop XP and Vista\n- Remove `version` option;\n- Remove `lucky` option.\n\n### 2.0.0\n\n- Speed improvement (2-4x), because it uses a single `cscript` process to query the registry (replaces `reg` queries) and a single `cscript` process to get the version numbers (replaces `wmic` queries).\n- Exports a readable object stream, but 1.x callback style is still supported\n- Only emits executables (`*.exe`)\n- No longer uses command-line version flags or version numbers found in the registry or elsewhere. This simplifies the process and makes the version numbers consistent and more detailed.\n\n## Background\n\nBrowser detection on Windows can't be done right. This is the *try-everything-and-fail-silently* approach. It accounts for architecture differences, normalizes environment variables, tries default locations, searches the registry (in the HKLM and HKCU hives as well as WoW counterparts) (including [Start Menu Internet Applications](http://msdn.microsoft.com/en-us/library/windows/desktop/dd203067(v=vs.85).aspx), Google Updater and more), and looks in `PATH`. Version numbers are then read from the executable metadata.\n\n`browser-launcher` by substack has [poor Windows support](https://github.com/substack/browser-launcher/issues/7), and it prompted me to create this module. It is now used in [browser-launcher2](https://github.com/benderjs/browser-launcher2), ~~an active~~ a once active fork of `browser-launcher`.\n\n## License\n\n[MIT](http://opensource.org/licenses/MIT) © Vincent Weevers.\n","readmeFilename":"readme.md","gitHead":"9df75d24c33cbffec0cbe6fb636c97359dc31403","_id":"win-detect-browsers@3.0.0-rc1","_npmVersion":"5.3.0","_nodeVersion":"8.6.0","_npmUser":{"name":"vweevers","email":"dev@vincentweevers.nl"},"maintainers":[{"name":"vweevers","email":"dev@vincentweevers.nl"}],"dist":{"integrity":"sha512-92M+iBCKLYy6eDRYL9a9PtiJirnG4ba9oxiySCLf6XybMo67zlTKudyenIhxNHBVL3K443pASvviJ7M76J1XbA==","shasum":"c92bf95e5730303e6fc5b9659b57bd4f7c0ff0f4","tarball":"http://registry-npm.ywwl.com/win-detect-browsers/download/win-detect-browsers-3.0.0-rc1.tgz","fileCount":13,"unpackedSize":40506,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbAXP9CRA9TVsSAnZWagAAkiQP+wfhaa1ptHnNJiM8SUfc\n7zlcPmnJ6nUnXjrnHMVEBUTV7V0vQdGZefhsmbppb3Fxdd5Guu8EWPEdPs+m\nQtXcchRJjk7CAsrwE8fa9m6FAM2qj3SnbbnKjGU8BtDYwpWlLZUvRkYpLj/h\nZq6ygN9vzHlvubjVLFyB5KjzJajuE0/Qcb4hjzFi2BlWlyBJHZGa/eiVymhv\n47eL45FDAVUfKoExwSPYli197z7bBwcDfJrc1uLiGrhx8BS52uOJ90O7N4hg\nkPOZA0Fd9KGlEzbleaumGS2uSosJRNRRjUJoErGsVnLkSoUL+euMz73MMUu+\nYSaAy7A1GA04OJ+oGSG3T+RQs91L2oz501kX4D+IhxOWbz50A4owJzNOvEME\nGmQlHWLEm1dOJhTsgfkkm0OS4XxsfAbwMmyUwOKTyyVxkQXG8+2oDbE5PCKe\nPdRbGEXWzjQt4dyLYiEwLqnHG1V8MVi3Hz3J4B8DcQaCfTVtX5jRomZSPF1K\nL922EzGsUn1yBbBL4S+4tB7njV20WAI9ZkacxSke96zp1Gld1v3+tLD4HD/B\nwQfPEP26/RWqviYWP3avBeFS5yuN1imJT55BSVT2hR23MgLqV8ODnCaU81qg\nbQONJCjBinxH+NkpKAcpaJIzBFoGQdw9Cq2BjS54HxftMkxxEQ6HIgiqkN8A\npSf3\r\n=xJTm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBJzrD/K5V/rlAL1dFTCZpb0sjc6su5if84H5BDMFZPJAiEAuS0YCeWgMRaFOH11QYl1pAgLQwQ3A+SQjq3d816eWBw="}],"size":13009,"noattachment":false,"key":"/win-detect-browsers/-/win-detect-browsers-3.0.0-rc1.tgz"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/win-detect-browsers_3.0.0-rc1_1526821884220_0.9902842626415531"},"_hasShrinkwrap":false,"publish_time":1526821884900,"_cnpm_publish_time":1526821884900,"dist-tags":{"latest":"8.0.3","next":"3.0.0-rc1"}}