Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: giggio/node-chromedriver
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 955d73c482487c6516ec5924141ef0abe69eb9fd
Choose a base ref
...
head repository: giggio/node-chromedriver
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 5e2c65c53a74a57e5884c4096c3a4d65367d1b01
Choose a head ref
  • 17 commits
  • 13 files changed
  • 8 contributors

Commits on Sep 18, 2019

  1. Automated Chromedriver updates (#230)

    Add an npm script `update-chromedriver` to automate Chromedriver updates
    js-kyle authored and giggio committed Sep 18, 2019
    Copy the full SHA
    0f9ec80 View commit details

Commits on Oct 8, 2019

  1. Versioning LATEST => 75.0.3770.140

    It would probably be more useful for readers to refer to a real version in addition to the default of LATEST
    Kelly Selden authored and giggio committed Oct 8, 2019
    Copy the full SHA
    4c43b45 View commit details

Commits on Oct 28, 2019

  1. Bump ChromeDriver to 78.0.3904.70

    Marc-Aurel Audoin authored and giggio committed Oct 28, 2019
    Copy the full SHA
    b93c62d View commit details
  2. Remove .github from package

    giggio committed Oct 28, 2019
    Copy the full SHA
    4fd9570 View commit details
  3. Honor XDG_CACHE_HOME and make npm_config_tmp work

    Ref #72.
    
    * For npm_config_tmp to work as (optional) override for the default
      temporary directory, it has to be checked first, not last
      in the chain of default-operator checks.
    
    * Add support for XDG_CACHE_HOME which some XDG-compliant environments
      will set to a directory that is persisted between CI runs and such.
    
      The XDG Cache home concept is ideal for this purpose because
      node-chromedriver takes care to clean up after itself and uses a
      deterministic filename. As such, it won't grow out of control and can
      be safely cached and persisted when XDG is provided.
    
      This way, downstream users of node-chromedriver are not required to
      set npm_config_tmp to a persisted directory, which can be undesirable
      due to the inherit nature and expectation of a temp directory.
      E.g. software tends to place files with random files name here, or
      leave behind large files, a directory with files that would grow
      rapidly if persisted between subsequent CI runs.
    
    * Remove the redundant manual handling of TMPDIR, TMP and "/tmp".
      These predate the addition of os.tmpdir() by 60c4706, which
      handles all these already. This code appears to be inspired by
      <https://github.com/Medium/phantomjs/blob/v2.1.8/install.js#L107>,
      which also does not have these additional checks.
    Krinkle authored and giggio committed Oct 28, 2019
    Copy the full SHA
    f331bbe View commit details
  4. Bump version to 78.0.1

    giggio committed Oct 28, 2019
    Copy the full SHA
    d8d4734 View commit details

Commits on Dec 10, 2019

  1. Bump version to 79.0.0

    dan9186 authored and giggio committed Dec 10, 2019
    Copy the full SHA
    7a08121 View commit details

Commits on Dec 11, 2019

  1. Fix typo in console.log

    wooferzfg authored and giggio committed Dec 11, 2019
    Copy the full SHA
    f61cbbd View commit details

Commits on Jan 28, 2020

  1. Copy the full SHA
    b361ec9 View commit details
  2. Bump version

    giggio committed Jan 28, 2020
    Copy the full SHA
    b1f0cab View commit details
  3. Copy the full SHA
    67253e1 View commit details
  4. Copy the full SHA
    b62bef3 View commit details
  5. Copy the full SHA
    a24d2f3 View commit details

Commits on Feb 3, 2020

  1. Update @testim/chrome-version

    giggio committed Feb 3, 2020
    Copy the full SHA
    9a561eb View commit details

Commits on Feb 4, 2020

  1. Bump version to 80.0.0

    giggio committed Feb 4, 2020
    Copy the full SHA
    1974478 View commit details
  2. Copy the full SHA
    fe02d5f View commit details

Commits on Feb 12, 2020

  1. Replace request with axios and other updates

    Updated other deps.
    Modernized code with async/await.
    Updated node versions to only include
    supported versions.
    Closes #189
    giggio committed Feb 12, 2020
    2
    Copy the full SHA
    5e2c65c View commit details
Showing with 527 additions and 600 deletions.
  1. +2 −2 .devcontainer/Dockerfile
  2. +2 −2 .eslintrc.json
  3. +3 −1 .npmignore
  4. +19 −3 .vscode/launch.json
  5. +4 −1 .vscode/settings.json
  6. +40 −2 README.md
  7. +6 −6 azure-pipelines.yml
  8. +171 −169 install.js
  9. +1 −1 lib/chromedriver.js
  10. +230 −405 package-lock.json
  11. +7 −5 package.json
  12. +3 −3 shippable.yml
  13. +39 −0 update.js
4 changes: 2 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -5,6 +5,6 @@ ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y git curl build-essential procps
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
RUN [ "/bin/bash", "-c", "source $HOME/.nvm/nvm.sh && nvm i --no-progress 6 && nvm i 8 --no-progress && nvm i 10 --no-progress && nvm i --no-progress 12.2.0" ]
RUN [ "/bin/bash", "-c", "source $HOME/.nvm/nvm.sh && nvm alias default 12" ]
RUN [ "/bin/bash", "-c", "source $HOME/.nvm/nvm.sh && nvm i 10.19.0 --no-progress && nvm i --no-progress 12.12.0 && nvm i --no-progress 13.8.0" ]
RUN [ "/bin/bash", "-c", "source $HOME/.nvm/nvm.sh && nvm alias default 13" ]
ENV DEBIAN_FRONTEND=dialog
4 changes: 2 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
"jsx": false
},
"sourceType": "module",
"ecmaVersion": 5
"ecmaVersion": 2017
},
"rules": {
"no-const-assign": "warn",
@@ -26,4 +26,4 @@
"no-var": "error",
"prefer-const": "error"
}
}
}
4 changes: 3 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -5,9 +5,11 @@ tmp
Dockerfile
test-driver.sh
testInstall.js
update.js
*.tgz
.vscode
.editorconfig
shippable.yml
.devcontainer/**/*
azure-pipelines.yml
azure-pipelines.yml
.github
22 changes: 19 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/install.js",
"runtimeVersion": "12.2.0",
"runtimeVersion": "13.8.0",
"cwd": "${workspaceRoot}",
"runtimeArgs": [
"--nolazy"
@@ -20,7 +20,7 @@
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/install.js",
"runtimeVersion": "12.2.0",
"runtimeVersion": "13.8.0",
"cwd": "${workspaceRoot}",
"runtimeArgs": [
"--nolazy"
@@ -30,6 +30,22 @@
"CHROMEDRIVER_VERSION": "LATEST"
}
},
{
"name": "Launch (with proxy)",
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/install.js",
"runtimeVersion": "13.8.0",
"cwd": "${workspaceRoot}",
"runtimeArgs": [
"--nolazy"
],
"env": {
"NODE_ENV": "development",
"https_proxy": "https://localhost:3128"
// "npm_config_https_proxy": "https://localhost:3128"
}
},
{
"name": "Attach",
"type": "node",
@@ -50,4 +66,4 @@
"port": 5858,
}
]
}
}
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"vsicons.presets.angular": false,
"editor.formatOnSave": true,
"eslint.autoFixOnSave": true
"eslint.autoFixOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}
42 changes: 40 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -105,6 +105,7 @@ npm config set https-proxy http://[user:pwd]@domain.tld:port
```

Use different User-Agent.

```shell
npm config set user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0"
```
@@ -183,7 +184,7 @@ You can also use the start and stop methods:
var chromedriver = require('chromedriver');

args = [
// optional arguments
// optional arguments
];
chromedriver.start(args);
// run your tests
@@ -210,7 +211,7 @@ executed as a callback at the end of your tests
The NPM package version tracks the version of chromedriver that will be installed,
with an additional build number that is used for revisions to the installer.
You can use the package version number to install a specific version, or use the
setting to a specific version. To always install the latest version of Chromedriver,
setting to a specific version. If there is a new Chromedriver version available which is not yet available as a version of `node-chromedriver`, the npm command `npm run update-chromedriver` in this repository can be used to make the required updates to this module, please submit the change as a PR. To always install the latest version of Chromedriver,
use `LATEST` as the version number:

```shell
@@ -229,6 +230,43 @@ Another option is to use env variable `CHROMEDRIVER_VERSION`.
CHROMEDRIVER_VERSION=LATEST npm install chromedriver
```

You can force the latest release for a specific major version by specifying `LATEST_{VERSION_NUMBER}`:

```shell
CHROMEDRIVER_VERSION=LATEST_80 npm install chromedriver
```

You can also force a different version of chromedriver by replacing `LATEST` with a version number:

```shell
CHROMEDRIVER_VERSION=75.0.3770.140 npm install chromedriver
```

## Detect ChromeDriver Version

The NPM package version may not be always compatible to your Chrome version.
To get the chromedriver that corresponds to the version of Chrome installed,
you can use the npm config property `detect_chromedriver_version`.

```shell
npm install chromedriver --detect_chromedriver_version
```

Or add property into your [`.npmrc`](https://docs.npmjs.com/files/npmrc) file.

```
detect_chromedriver_version=true
```

Another option is to use environment variable `DETECT_CHROMEDRIVER_VERSION`.

```shell
DETECT_CHROMEDRIVER_VERSION=true npm install chromedriver
```

**Note:** When the property `detect_chromedriver_version` is provided,
`chromedriver_version` and `chromedriver_filepath` properties are ignored.

## A Note on chromedriver

Chromedriver is not a library for NodeJS.
12 changes: 6 additions & 6 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -7,12 +7,12 @@ jobs:
vmImage: 'ubuntu-16.04'
strategy:
matrix:
node_8:
nodeversion: '8.x'
node_10:
nodeversion: '10.x'
node_12:
nodeversion: '12.x'
node_13:
nodeversion: '13.x'
steps:
- task: NodeTool@0
inputs:
@@ -28,12 +28,12 @@ jobs:
vmImage: 'macOS-10.14'
strategy:
matrix:
node_8:
nodeversion: '8.x'
node_10:
nodeversion: '10.x'
node_12:
nodeversion: '12.x'
node_13:
nodeversion: '13.x'
steps:
- task: NodeTool@0
inputs:
@@ -48,12 +48,12 @@ jobs:
vmImage: 'windows-2019'
strategy:
matrix:
node_8:
nodeversion: '8.x'
node_10:
nodeversion: '10.x'
node_12:
nodeversion: '12.x'
node_13:
nodeversion: '13.x'
steps:
- task: NodeTool@0
inputs:
Loading