File tree Expand file tree Collapse file tree 4 files changed +150
-83
lines changed Expand file tree Collapse file tree 4 files changed +150
-83
lines changed Original file line number Diff line number Diff line change @@ -5,12 +5,15 @@ notifications:
5
5
email : false
6
6
node_js :
7
7
- v14
8
- - v12
9
8
- v10
10
9
env :
11
10
- PPTR_OVERRIDE_VERSION=1.6.x
12
11
- PPTR_OVERRIDE_VERSION=1.8.x
13
12
- PPTR_OVERRIDE_VERSION=1.12.x
13
+ - PPTR_OVERRIDE_VERSION=2.x.x
14
+ - PPTR_OVERRIDE_VERSION=3.x.x
15
+ - PPTR_OVERRIDE_VERSION=4.x.x
16
+ - PPTR_OVERRIDE_VERSION=5.x.x
14
17
- PPTR_OVERRIDE_VERSION=latest
15
18
before_install :
16
19
- npm install -g yarn coveralls nyc @patrickhulce/scripts
Original file line number Diff line number Diff line change @@ -13,22 +13,26 @@ function requireOrUndefined(path: string): any {
13
13
}
14
14
15
15
try {
16
- Page = require ( 'puppeteer/lib/Page.js' ) // tslint:disable-line
16
+ const libPrefix = requireOrUndefined ( `puppeteer/lib/cjs/puppeteer/common/Page.js` )
17
+ ? 'puppeteer/lib/cjs/puppeteer/common'
18
+ : 'puppeteer/lib'
19
+
20
+ Page = requireOrUndefined ( `${ libPrefix } /Page.js` ) // tslint:disable-line
17
21
if ( Page . Page ) Page = Page . Page
18
22
19
- ElementHandle = requireOrUndefined ( 'puppeteer/lib/ ElementHandle.js' ) // tslint:disable-line variable-name
23
+ ElementHandle = requireOrUndefined ( ` ${ libPrefix } / ElementHandle.js` ) // tslint:disable-line variable-name
20
24
if ( ElementHandle && ElementHandle . ElementHandle ) ElementHandle = ElementHandle . ElementHandle
21
25
22
26
if ( ! ElementHandle ) {
23
- const ExecutionContext = requireOrUndefined ( 'puppeteer/lib/ ExecutionContext.js' ) // tslint:disable-line variable-name
27
+ const ExecutionContext = requireOrUndefined ( ` ${ libPrefix } / ExecutionContext.js` ) // tslint:disable-line variable-name
24
28
if ( ExecutionContext && ExecutionContext . ElementHandle ) {
25
29
ElementHandle = ExecutionContext . ElementHandle
26
30
}
27
31
}
28
32
if ( ElementHandle && ElementHandle . ElementHandle ) ElementHandle = ElementHandle . ElementHandle
29
33
30
34
if ( ! ElementHandle ) {
31
- const JSHandle = require ( 'puppeteer/lib/ JSHandle.js' ) // tslint:disable-line
35
+ const JSHandle = require ( ` ${ libPrefix } / JSHandle.js` ) // tslint:disable-line
32
36
if ( JSHandle && JSHandle . ElementHandle ) {
33
37
ElementHandle = JSHandle . ElementHandle
34
38
}
Original file line number Diff line number Diff line change 68
68
"@types/puppeteer" : " ^2.0.0" ,
69
69
"generate-export-aliases" : " ^1.1.0" ,
70
70
"jest" : " ^25.1.0" ,
71
- "puppeteer" : " ^2.0.0 " ,
71
+ "puppeteer" : " ^5.2.1 " ,
72
72
"rollup" : " ^2.0.3" ,
73
73
"ts-jest" : " ^25.2.1" ,
74
74
"tslint" : " ^6.0.0" ,
You can’t perform that action at this time.
0 commit comments