├── .editorconfig ├── .eslintrc ├── .gitignore ├── .npmrc ├── .travis.yml ├── CHANGELOG.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── lib ├── checksum.js ├── chromedriver │ ├── download.js │ ├── index.js │ └── version.js ├── download.js ├── index.js ├── selenium │ ├── download.js │ ├── index.js │ └── version.js └── tempdir.js ├── package-lock.json ├── package.json └── test ├── chromedriver └── download.test.js └── download.test.js /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | charset = utf-8 7 | trim_trailing_whitespace = true 8 | insert_final_newline = true 9 | 10 | [*.md] 11 | trim_trailing_whitespace = false 12 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "groupon", 3 | "overrides": [ 4 | { 5 | "files": "*.test.js", 6 | "env": { 7 | "mocha": true 8 | } 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | npm-debug.log 3 | /tmp 4 | coverage 5 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | registry=https://registry.npmjs.org 2 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 10 4 | - 12 5 | - 14 6 | deploy: 7 | - provider: script 8 | script: npx nlm release 9 | skip_cleanup: true 10 | 'on': 11 | branch: main 12 | node: 14 13 | addons: 14 | apt: 15 | packages: 16 | - openjdk-9-jre-headless 17 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ### v2.0.16 (2021-03-26) 2 | 3 | #### 🏡 Internal 4 | 5 | * [#53](https://github.com/groupon/selenium-download/pull/53) chore: switch to main & update packages ([@aaarichter](https://github.com/aaarichter)) 6 | 7 | 8 | ### 2.0.15 9 | 10 | * fix download Key error - **[@dbushong](https://github.com/dbushong)** [#52](https://github.com/groupon/selenium-download/pull/52) 11 | - [`4783124`](https://github.com/groupon/selenium-download/commit/478312418ea2983f66bd57e518cf9c7d539da114) **chore:** npm audit fix --force 12 | - [`5a61e29`](https://github.com/groupon/selenium-download/commit/5a61e29a1e2790a7f6c8f7595e508ba76638505f) **style:** eslint --fix 13 | - [`8b850a6`](https://github.com/groupon/selenium-download/commit/8b850a62aca7c559824a4a3018860d14f08e51dc) **fix:** only download latest version with server 14 | - [`b70dce7`](https://github.com/groupon/selenium-download/commit/b70dce73fd62c0ef11813156b3c6f345441c7f55) **chore:** try openjdk for java test 15 | 16 | 17 | ### 2.0.14 18 | 19 | * Do not download alpha versions - **[@jkrems](https://github.com/jkrems)** [#50](https://github.com/groupon/selenium-download/pull/50) 20 | - [`d4edd83`](https://github.com/groupon/selenium-download/commit/d4edd834f99a74e5c088d080fe3440472091f93d) **fix:** Do not download alpha versions 21 | - [`447e3dd`](https://github.com/groupon/selenium-download/commit/447e3dde737f55cb32f8ef0055d12d87a25fbed9) **chore:** Fix travis setup 22 | 23 | 24 | ### 2.0.13 25 | 26 | * Add extension for windows - **[@jkrems](https://github.com/jkrems)** [#46](https://github.com/groupon/selenium-download/pull/46) 27 | - [`266232d`](https://github.com/groupon/selenium-download/commit/266232dd50550e3109a274d53e30684c0bdf3a4f) **style:** Run eslint --fix 28 | - [`e1e1623`](https://github.com/groupon/selenium-download/commit/e1e16233dd441d87bd3f9ac682708a558bac2905) **fix:** add extension for windows - see: [#41](https://github.com/groupon/selenium-download/issues/41) 29 | 30 | 31 | ### 2.0.12 32 | 33 | * Stop using magical offsets to determine latest selenium - **[@jkrems](https://github.com/jkrems)** [#43](https://github.com/groupon/selenium-download/pull/43) 34 | - [`21dbde7`](https://github.com/groupon/selenium-download/commit/21dbde72103e134f7f8fefbdaddabbc1f08c0f9c) **fix:** Stop using magical offsets to determine latest selenium - see: [#40](https://github.com/groupon/selenium-download/issues/40), [39](https://github.com/groupon/selenium-download/pull/39) 35 | 36 | 37 | ### 2.0.11 38 | 39 | * Apply latest nlm generator - **[@markowsiak](https://github.com/markowsiak)** [#42](https://github.com/groupon/selenium-download/pull/42) 40 | - [`2b7315d`](https://github.com/groupon/selenium-download/commit/2b7315dfe9187270352599bb5e3ae87b8223ff12) **chore:** Apply latest nlm generator 41 | 42 | 43 | ### 2.0.10 44 | 45 | * fix: The XML source from where we were getting the version changed - **[@jac1013](https://github.com/jac1013)** [#38](https://github.com/groupon/selenium-download/pull/38) 46 | - [`e68e819`](https://github.com/groupon/selenium-download/commit/e68e819250bb235a0c64223e2c4bab886b1de732) **fix:** The XML source from where we were getting the version changed 47 | - [`2716011`](https://github.com/groupon/selenium-download/commit/2716011c33eb564ed17806daae8876006dbc164c) **fix:** trying to add a greater java version through .travis.yml to make tests in CI pass. 48 | 49 | 50 | ### 2.0.9 51 | 52 | * Only delete files we created - **[@jkrems](https://github.com/jkrems)** [#36](https://github.com/groupon/selenium-download/pull/36) 53 | - [`b720fad`](https://github.com/groupon/selenium-download/commit/b720fad52bf759939465d94b91082398e142601d) **fix:** Only delete files we created - see: [#22](https://github.com/groupon/selenium-download/issues/22) 54 | 55 | 56 | ### 2.0.8 57 | 58 | * Bump dependencies - **[@jkrems](https://github.com/jkrems)** [#35](https://github.com/groupon/selenium-download/pull/35) 59 | - [`70f7fdf`](https://github.com/groupon/selenium-download/commit/70f7fdfcd815278b3c12ef9ff05361593cce8ecc) **chore:** Bump dependencies - see: [#23](https://github.com/groupon/selenium-download/issues/23) 60 | 61 | 62 | ### 2.0.7 63 | 64 | * Use https to download binaries - **[@jkrems](https://github.com/jkrems)** [#32](https://github.com/groupon/selenium-download/pull/32) 65 | - [`1957ca7`](https://github.com/groupon/selenium-download/commit/1957ca79707b9bee224b222500ceb250f736b93b) **fix:** Use https to download binaries 66 | 67 | 68 | ### 2.0.6 69 | 70 | * Fail cleanly when the chromedriver download 404s - **[@jkrems](https://github.com/jkrems)** [#31](https://github.com/groupon/selenium-download/pull/31) 71 | - [`f1a5d73`](https://github.com/groupon/selenium-download/commit/f1a5d73bd0d3b3ceab95f08b4353d8ce856bee68) **fix:** Fail cleanly when the chromedriver download 404s 72 | 73 | 74 | ### 2.0.5 75 | 76 | * Fix failing OSX chromedriver download due to 2.23 dropped support for mac 32 bit - **[@brettjonesdev](https://github.com/brettjonesdev)** [#30](https://github.com/groupon/selenium-download/pull/30) 77 | - [`f84195e`](https://github.com/groupon/selenium-download/commit/f84195ed0cd6986034de582869491db7981859fb) **fix:** chromedriver version 2.23 no longer supports mac 32 bit 78 | 79 | 80 | ### 2.0.4 81 | 82 | * Support for node v6 and shiny JavaScript - **[@jkrems](https://github.com/jkrems)** [#27](https://github.com/groupon/selenium-download/pull/27) 83 | - [`af2e601`](https://github.com/groupon/selenium-download/commit/af2e6012b5ff310e1baf472e29b2be3c75f7e628) **chore:** Port to JavaScript 84 | - [`861da47`](https://github.com/groupon/selenium-download/commit/861da4702118339bbe76bd7e73aaa8b69fd12370) **refactor:** drop download, runs on node 6 - see: [#19](https://github.com/groupon/selenium-download/issues/19) 85 | - [`6ffd489`](https://github.com/groupon/selenium-download/commit/6ffd48922466d66a44b40feef7b08a14ab38de3c) **test:** Set higher timeout for slow connections - see: [#24](https://github.com/groupon/selenium-download/issues/24) 86 | 87 | 88 | ### 2.0.3 89 | 90 | * [`803311c`](https://github.com/groupon/selenium-download/commit/803311c9e922b18195742f9b32b0dd367b761f8a) **fix:** chromedriver download on Windows unzips an .exe file 91 | 92 | 93 | ### 2.0.2 94 | 95 | * Updated selenium and chromedriver - **[@gabehayes](https://github.com/gabehayes)** [#21](https://github.com/groupon/selenium-download/pull/21) 96 | - [`fc359f2`](https://github.com/groupon/selenium-download/commit/fc359f229c765c86c7f6d7f3fd24eddcf4fc8305) **chore:** Update selenium version to 2.53.0 97 | - [`003876d`](https://github.com/groupon/selenium-download/commit/003876d79128a07d01f9a58699b15d75b79e2ceb) **chore:** Update chromedriver version to 2.22 98 | 99 | 100 | ### 2.0.1 101 | 102 | * fix: More reliable (and correct) download - **[@jkrems](https://github.com/jkrems)** [#17](https://github.com/groupon/selenium-download/pull/17) 103 | - [`7599b95`](https://github.com/groupon/selenium-download/commit/7599b95b98215567019be022c5b3425f4b9ce03c) **fix:** More reliable (and correct) download 104 | * Apply latest nlm generator - **[@i-tier-bot](https://github.com/i-tier-bot)** [#18](https://github.com/groupon/selenium-download/pull/18) 105 | - [`1e32749`](https://github.com/groupon/selenium-download/commit/1e327496277fad485c5fd7dc9649b8bd5787a8f2) **chore:** Apply latest nlm generator 106 | - [`0c616b6`](https://github.com/groupon/selenium-download/commit/0c616b6418fc60477b444b77ae903a36a6ecad31) **test:** Convert to proper mocha test 107 | - [`f16af5c`](https://github.com/groupon/selenium-download/commit/f16af5c3fa63a5393a55ef3042e76d4009ab7b0e) **chore:** Set author to Groupon 108 | - [`445ce55`](https://github.com/groupon/selenium-download/commit/445ce5533b24d53cddab19efe521ea832e642d2a) **style:** Use assertive over assert 109 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # Contributing 4 | 5 | 🎉🏅 Thanks for helping us improve this project! 🙏 6 | 7 | This document outlines some of the practices we care about. 8 | If you have any questions or suggestions about the process, 9 | feel free to [open an issue](#reporting-issues) 10 | . 11 | 12 | ## How Can I Contribute? 13 | 14 | ### Reporting Issues 15 | 16 | If you find any mistakes in the docs or a bug in the code, 17 | please [open an issue in Github](https://github.com/groupon/selenium-download/issues/new) so we can look into it. 18 | You can also [create a PR](#contributing-code) fixing it yourself, or course. 19 | 20 | If you report a bug, please follow these guidelines: 21 | 22 | * Make sure the bug exists in the latest version. 23 | * Include instructions on how to reproduce the issue. 24 | The instructions should be as minimal as possible 25 | and answer the three big questions: 26 | 1. What are the exact steps you took? This includes the exact versions of node, npm, and any packages involved. 27 | 1. What result are you expecting? 28 | 1. What is the actual result? 29 | 30 | ### Improving Documentation 31 | 32 | For small documentation changes, you can use [Github's editing feature](https://help.github.com/articles/editing-files-in-another-user-s-repository/). 33 | The only thing to keep in mind is to prefix the commit message with "docs: ". 34 | The default commit message generated by Github will lead to a failing CI build. 35 | 36 | For larger updates to the documentation 37 | it might be better to follow the [instructions for contributing code below](#contributing-code). 38 | 39 | ### Contributing Code 40 | 41 | **Note:** If you're planning on making substantial changes, 42 | please [open an issue first to discuss your idea](#reporting-issues). 43 | Otherwise you might end up investing a lot of work 44 | only to discover that it conflicts with plans the maintainers might have. 45 | 46 | The general steps for creating a pull request are: 47 | 48 | 1. Create a branch for your change. 49 | Always start your branch from the latest `main`. 50 | We often prefix the branch name with our initials, e.g. `jk-a-change`. 51 | 1. Run `npm install` to install the dependencies. 52 | 1. If you're fixing a bug, be sure to write a test *first*. 53 | That way you can validate that the test actually catches the bug and doesn't pass. 54 | 1. Make your changes to the code. 55 | Remember to update the tests if you add new features or change behavior. 56 | 1. Run the tests via `npm test`. This will also run style checks and other validations. 57 | You might see errors about uncommitted files. 58 | This is expected until you commit your changes. 59 | 1. Once you're done, `git add .` and `git commit`. 60 | Please follow the [commit message conventions](#commits--commit-messages) described below. 61 | 1. Push your branch to Github & create a PR. 62 | 63 | #### Code Style 64 | 65 | In addition to any linting rules the project might include, 66 | a few general rules of thumb: 67 | 68 | * Try to match the style of the rest of the code. 69 | * We prefer simple code that is easy to understand over terse, expressive code. 70 | * We try to structure projects by semantics instead of role. 71 | E.g. we'd rather have a `tree.js` module that contains tree traversal-related helpers 72 | than a `helpers.js` module. 73 | * Actually, if you create helpers you might want to put those into a separate package. 74 | That way it's easier to reuse them. 75 | 76 | #### Commits & Commit Messages 77 | 78 | Please follow the [angular commit message conventions](https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#-git-commit-guidelines). 79 | We use an automated tool for generating releases 80 | that depends on the conventions to determine the next version and the content of the changelog. 81 | Commit messages that don't follow the conventions will cause `npm test` (and thus CI) to fail. 82 | 83 | The short summary - a commit message should look like this: 84 | 85 | ``` 86 | : 87 | 88 | 89 | 90 | 91 | 92 |