electron-chromedriver 22.0.0 → 23.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.circleci/config.yml +137 -51
- package/.github/workflows/release.yml +10 -32
- package/.github/workflows/semantic.yml +8 -2
- package/LICENSE +21 -0
- package/README.md +2 -3
- package/download-chromedriver.js +12 -0
- package/package.json +5 -2
- package/script/publish.js +10 -0
- package/script/update-version.js +2 -2
package/.circleci/config.yml
CHANGED
|
@@ -1,71 +1,157 @@
|
|
|
1
|
-
|
|
2
|
-
#
|
|
3
|
-
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
|
|
4
|
-
#
|
|
5
|
-
version: 2
|
|
6
|
-
jobs:
|
|
7
|
-
install-test-linux:
|
|
8
|
-
docker:
|
|
9
|
-
# specify the version you desire here
|
|
10
|
-
- image: circleci/node:14-browsers
|
|
1
|
+
version: 2.1
|
|
11
2
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
# - image: circleci/mongo:3.4.4
|
|
16
|
-
|
|
17
|
-
working_directory: ~/repo
|
|
3
|
+
orbs:
|
|
4
|
+
node: circleci/node@5.1.0
|
|
5
|
+
win: circleci/windows@5.0.0
|
|
18
6
|
|
|
7
|
+
commands:
|
|
8
|
+
install:
|
|
9
|
+
parameters:
|
|
10
|
+
node-version:
|
|
11
|
+
description: Node.js version to install
|
|
12
|
+
type: string
|
|
19
13
|
steps:
|
|
14
|
+
- node/install:
|
|
15
|
+
node-version: << parameters.node-version >>
|
|
16
|
+
- run: nvm use << parameters.node-version >>
|
|
20
17
|
- checkout
|
|
21
|
-
|
|
22
|
-
# Download and cache dependencies
|
|
23
18
|
- restore_cache:
|
|
24
19
|
keys:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
20
|
+
- v1-dependencies-{{ arch }}-{{ checksum "package-lock.json" }}
|
|
21
|
+
- v1-dependencies-{{ arch }}
|
|
22
|
+
- when:
|
|
23
|
+
condition: << pipeline.git.tag >>
|
|
24
|
+
steps:
|
|
25
|
+
- run:
|
|
26
|
+
name: Update Version
|
|
27
|
+
command: node script/update-version.js << pipeline.git.tag >>
|
|
28
|
+
- run: npm install
|
|
29
|
+
- unless:
|
|
30
|
+
condition: << pipeline.git.tag >>
|
|
31
|
+
steps:
|
|
32
|
+
- run:
|
|
33
|
+
command: npm install
|
|
34
|
+
environment:
|
|
35
|
+
ELECTRON_CHROMEDRIVER_STABLE_FALLBACK: 1
|
|
31
36
|
- save_cache:
|
|
32
37
|
paths:
|
|
33
38
|
- node_modules
|
|
34
|
-
key: v1-dependencies-{{ checksum "package.json" }}
|
|
35
|
-
|
|
36
|
-
|
|
39
|
+
key: v1-dependencies-{{ arch }}-{{ checksum "package-lock.json" }}
|
|
40
|
+
test:
|
|
41
|
+
steps:
|
|
37
42
|
- run: node --version
|
|
38
43
|
- run: npm --version
|
|
39
44
|
- run: npm test
|
|
40
45
|
|
|
41
|
-
|
|
46
|
+
jobs:
|
|
47
|
+
test-linux:
|
|
48
|
+
docker:
|
|
49
|
+
- image: cimg/base:stable
|
|
50
|
+
parameters:
|
|
51
|
+
node-version:
|
|
52
|
+
description: Node.js version to install
|
|
53
|
+
type: string
|
|
54
|
+
steps:
|
|
55
|
+
- install:
|
|
56
|
+
node-version: << parameters.node-version >>
|
|
57
|
+
- test
|
|
58
|
+
test-mac:
|
|
42
59
|
macos:
|
|
43
60
|
xcode: "13.3.0"
|
|
61
|
+
parameters:
|
|
62
|
+
node-version:
|
|
63
|
+
description: Node.js version to install
|
|
64
|
+
type: string
|
|
65
|
+
steps:
|
|
66
|
+
- install:
|
|
67
|
+
node-version: << parameters.node-version >>
|
|
68
|
+
- test
|
|
69
|
+
test-windows:
|
|
70
|
+
executor:
|
|
71
|
+
name: win/default
|
|
72
|
+
shell: bash.exe
|
|
73
|
+
parameters:
|
|
74
|
+
node-version:
|
|
75
|
+
description: Node.js version to install
|
|
76
|
+
type: string
|
|
77
|
+
steps:
|
|
78
|
+
- install:
|
|
79
|
+
node-version: << parameters.node-version >>
|
|
80
|
+
- test
|
|
81
|
+
release:
|
|
82
|
+
docker:
|
|
83
|
+
- image: cimg/node:18.14
|
|
44
84
|
steps:
|
|
45
85
|
- checkout
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
- run:
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
86
|
+
- run:
|
|
87
|
+
name: Update Version
|
|
88
|
+
command: node script/update-version.js << pipeline.git.tag >>
|
|
89
|
+
- run:
|
|
90
|
+
name: Install Dependencies
|
|
91
|
+
command: npm ci
|
|
92
|
+
- run:
|
|
93
|
+
name: Obtain Publishing Credentials
|
|
94
|
+
command: npx @continuous-auth/circleci-oidc-github-auth@1.0.4
|
|
95
|
+
- run:
|
|
96
|
+
name: Confirm Version Updated
|
|
97
|
+
command: node -e "if (require('./package.json').version === '0.0.0-development') process.exit(1)"
|
|
98
|
+
- run:
|
|
99
|
+
name: Set NPM Credentials
|
|
100
|
+
command: echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > ~/.npmrc
|
|
101
|
+
- run:
|
|
102
|
+
name: Check NPM Credentials
|
|
103
|
+
command: npm whoami
|
|
104
|
+
- run:
|
|
105
|
+
name: CFA Publish
|
|
106
|
+
command: node script/publish.js
|
|
63
107
|
|
|
64
108
|
workflows:
|
|
65
|
-
|
|
66
|
-
test-linux:
|
|
67
|
-
jobs:
|
|
68
|
-
- install-test-linux
|
|
69
|
-
test-osx:
|
|
109
|
+
test_and_release:
|
|
70
110
|
jobs:
|
|
71
|
-
-
|
|
111
|
+
- test-linux:
|
|
112
|
+
matrix:
|
|
113
|
+
parameters:
|
|
114
|
+
node-version:
|
|
115
|
+
- 18.14.0
|
|
116
|
+
- 16.19.0
|
|
117
|
+
- 14.19.0
|
|
118
|
+
filters:
|
|
119
|
+
tags:
|
|
120
|
+
only: /.*/
|
|
121
|
+
- test-mac:
|
|
122
|
+
matrix:
|
|
123
|
+
parameters:
|
|
124
|
+
node-version:
|
|
125
|
+
- 18.14.0
|
|
126
|
+
- 16.19.0
|
|
127
|
+
- 14.19.0
|
|
128
|
+
filters:
|
|
129
|
+
tags:
|
|
130
|
+
only: /.*/
|
|
131
|
+
- test-windows:
|
|
132
|
+
matrix:
|
|
133
|
+
parameters:
|
|
134
|
+
node-version:
|
|
135
|
+
- 18.14.0
|
|
136
|
+
- 16.19.0
|
|
137
|
+
- 14.19.0
|
|
138
|
+
filters:
|
|
139
|
+
tags:
|
|
140
|
+
only: /.*/
|
|
141
|
+
- release:
|
|
142
|
+
requires:
|
|
143
|
+
- test-linux-18.14.0
|
|
144
|
+
- test-linux-16.19.0
|
|
145
|
+
- test-linux-14.19.0
|
|
146
|
+
- test-mac-18.14.0
|
|
147
|
+
- test-mac-16.19.0
|
|
148
|
+
- test-mac-14.19.0
|
|
149
|
+
- test-windows-18.14.0
|
|
150
|
+
- test-windows-16.19.0
|
|
151
|
+
- test-windows-14.19.0
|
|
152
|
+
filters:
|
|
153
|
+
tags:
|
|
154
|
+
only: /^v.*/
|
|
155
|
+
branches:
|
|
156
|
+
ignore: /.*/
|
|
157
|
+
context: cfa-release
|
|
@@ -11,13 +11,14 @@ env:
|
|
|
11
11
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
12
12
|
|
|
13
13
|
jobs:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
matrix:
|
|
17
|
-
os: [ubuntu-latest, macos-latest]
|
|
18
|
-
runs-on: ${{ matrix.os }}
|
|
14
|
+
smoke_test:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
19
16
|
steps:
|
|
20
|
-
- uses: actions/checkout@v3
|
|
17
|
+
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # tag: v3.3.0
|
|
18
|
+
- name: Setup Node.js
|
|
19
|
+
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # tag: v3.6.0
|
|
20
|
+
with:
|
|
21
|
+
node-version: "16.19.0"
|
|
21
22
|
- name: Update Version
|
|
22
23
|
run: node script/update-version.js ${{ github.event.inputs.version }}
|
|
23
24
|
- name: Install Dependencies
|
|
@@ -26,29 +27,10 @@ jobs:
|
|
|
26
27
|
run: npm test
|
|
27
28
|
create_new_version:
|
|
28
29
|
runs-on: ubuntu-latest
|
|
29
|
-
needs:
|
|
30
|
+
needs: smoke_test
|
|
30
31
|
steps:
|
|
31
|
-
- uses: actions/checkout@v3
|
|
32
|
-
|
|
33
|
-
uses: actions/setup-node@v3
|
|
34
|
-
with:
|
|
35
|
-
node-version: 16.x
|
|
36
|
-
registry-url: 'https://registry.npmjs.org'
|
|
37
|
-
- name: Check npm credentials
|
|
38
|
-
run: npm whoami
|
|
39
|
-
env:
|
|
40
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
|
|
41
|
-
- name: Set Git Credentials
|
|
42
|
-
run: |
|
|
43
|
-
git config user.name electron-bot
|
|
44
|
-
git config user.email electron@github.com
|
|
45
|
-
- name: Update Version
|
|
46
|
-
run: node script/update-version.js ${{ github.event.inputs.version }}
|
|
47
|
-
- name: Push Update Commit
|
|
48
|
-
run: |
|
|
49
|
-
git add .
|
|
50
|
-
git commit -m "chore: update version to ${{ github.event.inputs.version }}"
|
|
51
|
-
git push origin main
|
|
32
|
+
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # tag: v3.3.0
|
|
33
|
+
# Tag here, the CircleCI workflow will trigger on the new tag and do the CFA publish
|
|
52
34
|
- name: Push New Tag
|
|
53
35
|
run: |
|
|
54
36
|
git tag ${{ github.event.inputs.version }}
|
|
@@ -56,7 +38,3 @@ jobs:
|
|
|
56
38
|
- name: Create Release
|
|
57
39
|
run: |
|
|
58
40
|
gh release create ${{ github.event.inputs.version }} -t ${{ github.event.inputs.version }}
|
|
59
|
-
- name: Publish to npm
|
|
60
|
-
run: npm publish
|
|
61
|
-
env:
|
|
62
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
|
|
@@ -7,14 +7,20 @@ on:
|
|
|
7
7
|
- edited
|
|
8
8
|
- synchronize
|
|
9
9
|
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
|
|
10
13
|
jobs:
|
|
11
14
|
main:
|
|
15
|
+
permissions:
|
|
16
|
+
pull-requests: read # for amannn/action-semantic-pull-request to analyze PRs
|
|
17
|
+
statuses: write # for amannn/action-semantic-pull-request to mark status of analyzed PR
|
|
12
18
|
name: Validate PR Title
|
|
13
19
|
runs-on: ubuntu-latest
|
|
14
20
|
steps:
|
|
15
21
|
- name: semantic-pull-request
|
|
16
|
-
uses: amannn/action-semantic-pull-request@
|
|
22
|
+
uses: amannn/action-semantic-pull-request@01d5fd8a8ebb9aafe902c40c53f0f4744f7381eb # tag: v5
|
|
17
23
|
env:
|
|
18
24
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
19
25
|
with:
|
|
20
|
-
validateSingleCommit:
|
|
26
|
+
validateSingleCommit: false
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Contributors to the Electron project
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
# Electron ChromeDriver
|
|
2
2
|
|
|
3
|
-
[](https://circleci.com/gh/electron/chromedriver/tree/main)
|
|
4
|
+
[](https://www.npmjs.com/package/electron-chromedriver)
|
|
5
5
|
<br>
|
|
6
6
|
[](https://standardjs.com/)
|
|
7
7
|
[](https://opensource.org/licenses/MIT)
|
|
8
8
|
<br>
|
|
9
|
-
[](https://www.npmjs.com/package/electron-chromedriver)
|
|
10
9
|
[](https://www.npmjs.com/package/electron-chromedriver)
|
|
11
10
|
|
|
12
11
|
Simple node module to download the [ChromeDriver](https://sites.google.com/corp/chromium.org/driver/)
|
package/download-chromedriver.js
CHANGED
|
@@ -18,6 +18,18 @@ function download (version) {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
async function attemptDownload (version) {
|
|
21
|
+
// Fall back to latest stable if there is not a stamped version, for tests
|
|
22
|
+
if (version === '0.0.0-development') {
|
|
23
|
+
if (!process.env.ELECTRON_CHROMEDRIVER_STABLE_FALLBACK) {
|
|
24
|
+
console.log('WARNING: chromedriver in development needs the environment variable ELECTRON_CHROMEDRIVER_STABLE_FALLBACK set')
|
|
25
|
+
process.exit(1)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const { ElectronVersions } = require('@electron/fiddle-core')
|
|
29
|
+
const versions = await ElectronVersions.create(undefined, { ignoreCache: true })
|
|
30
|
+
version = versions.latestStable.version
|
|
31
|
+
}
|
|
32
|
+
|
|
21
33
|
try {
|
|
22
34
|
const targetFolder = path.join(__dirname, 'bin')
|
|
23
35
|
const zipPath = await download(version)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "electron-chromedriver",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "23.3.6",
|
|
4
4
|
"description": "Electron ChromeDriver",
|
|
5
5
|
"repository": "https://github.com/electron/chromedriver",
|
|
6
6
|
"bin": {
|
|
@@ -21,7 +21,10 @@
|
|
|
21
21
|
"extract-zip": "^2.0.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
+
"@continuous-auth/client": "^2.2.2",
|
|
25
|
+
"@electron/fiddle-core": "^1.3.0",
|
|
24
26
|
"mocha": "^10.1.0",
|
|
27
|
+
"semver": "^7.3.8",
|
|
25
28
|
"standard": "^13.1.0"
|
|
26
29
|
}
|
|
27
|
-
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Publish the package in the CWD with an OTP code from CFA
|
|
2
|
+
const { getOtp } = require('@continuous-auth/client')
|
|
3
|
+
const { spawnSync } = require('child_process')
|
|
4
|
+
|
|
5
|
+
async function publish () {
|
|
6
|
+
const { status } = spawnSync('npm', ['publish', '--otp', await getOtp()])
|
|
7
|
+
process.exit(status)
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
publish()
|
package/script/update-version.js
CHANGED
|
@@ -10,8 +10,8 @@ const normalizeVersion = (version = '') => {
|
|
|
10
10
|
async function updateVersion () {
|
|
11
11
|
const version = normalizeVersion(process.argv[2])
|
|
12
12
|
if (!versionFormat.test(version)) {
|
|
13
|
-
console.error(`
|
|
14
|
-
|
|
13
|
+
console.error(`Unsupported version ${version} - only major, minor, and patch releases are currently supported`)
|
|
14
|
+
return
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
const PJ_PATH = path.join(__dirname, '..', 'package.json')
|