File tree Expand file tree Collapse file tree 4 files changed +24
-18
lines changed Expand file tree Collapse file tree 4 files changed +24
-18
lines changed Original file line number Diff line number Diff line change @@ -147,8 +147,6 @@ jobs:
147
147
148
148
test-types :
149
149
<< : *defaults
150
- docker :
151
- - image : circleci/node:latest-browsers
152
150
steps :
153
151
- checkout
154
152
- attach_workspace :
Original file line number Diff line number Diff line change 62
62
"node-fetch" : " ^2.3.0" ,
63
63
"pug" : " ^2.0.3" ,
64
64
"pug-plain-loader" : " ^1.0.0" ,
65
- "puppeteer" : " ~1.11.0 " ,
65
+ "puppeteer-core " : " ^1.12.1 " ,
66
66
"request" : " ^2.88.0" ,
67
67
"request-promise-native" : " ^1.0.5" ,
68
68
"rimraf" : " ^2.6.3" ,
80
80
"tslint" : " ^5.12.1" ,
81
81
"typescript" : " ^3.3.1" ,
82
82
"vue-jest" : " ^3.0.2" ,
83
- "vue-property-decorator" : " ^7.3.0"
83
+ "vue-property-decorator" : " ^7.3.0" ,
84
+ "which" : " ^1.3.1"
84
85
},
85
86
"repository" : {
86
87
"type" : " git" ,
Original file line number Diff line number Diff line change 1
- import puppeteer from 'puppeteer'
1
+ import puppeteer from 'puppeteer-core'
2
+ import which from 'which'
2
3
3
4
export default class Browser {
4
5
async start ( options = { } ) {
5
6
// https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#puppeteerlaunchoptions
6
- this . browser = await puppeteer . launch (
7
- Object . assign (
8
- {
9
- args : [ '--no-sandbox' , '--disable-setuid-sandbox' ] ,
10
- executablePath : process . env . PUPPETEER_EXECUTABLE_PATH
11
- } ,
12
- options
13
- )
14
- )
7
+ const _opts = {
8
+ args : [
9
+ '--no-sandbox' ,
10
+ '--disable-setuid-sandbox'
11
+ ] ,
12
+ executablePath : process . env . PUPPETEER_EXECUTABLE_PATH ,
13
+ ...options
14
+ }
15
+
16
+ if ( ! _opts . executablePath ) {
17
+ const resolve = cmd => which . sync ( cmd , { nothrow : true } )
18
+ _opts . executablePath = resolve ( 'google-chrome' ) || resolve ( 'chromium' )
19
+ }
20
+
21
+ this . browser = await puppeteer . launch ( _opts )
15
22
}
16
23
17
24
async close ( ) {
Original file line number Diff line number Diff line change @@ -9231,10 +9231,10 @@ punycode@^2.1.0, punycode@^2.1.1:
9231
9231
resolved "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
9232
9232
integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==
9233
9233
9234
- puppeteer@~1.11.0 :
9235
- version "1.11.0 "
9236
- resolved "https://registry.npmjs.org/puppeteer/-/puppeteer-1.11.0 .tgz#63cdbe12b07275cd6e0b94bce41f3fcb20305770 "
9237
- integrity sha512-iG4iMOHixc2EpzqRV+pv7o3GgmU2dNYEMkvKwSaQO/vMZURakwSOn/EYJ6OIRFYOque1qorzIBvrytPIQB3YzQ ==
9234
+ puppeteer-core@^1.12.1 :
9235
+ version "1.12.1 "
9236
+ resolved "https://registry.npmjs.org/puppeteer-core /-/puppeteer-core-1.12.1 .tgz#aec39d9c199ceff6ddd4da00e0733bb73fce4156 "
9237
+ integrity sha512-arGXPRe1dkX3+tOh1GMQ0Ny3CoOCRurkHAW4AZEBIBMX/LdY6ReFqRTT9YSV3d9zzxiIat9kJc3v9h9nkxAu3g ==
9238
9238
dependencies :
9239
9239
debug "^4.1.0"
9240
9240
extract-zip "^1.6.6"
You can’t perform that action at this time.
0 commit comments