File tree Expand file tree Collapse file tree 4 files changed +34
-14
lines changed Expand file tree Collapse file tree 4 files changed +34
-14
lines changed Original file line number Diff line number Diff line change 44
44
" environments"
45
45
],
46
46
"devDependencies" : {
47
- "ava" : " ^6.1.1 " ,
47
+ "ava" : " ^6.1.3 " ,
48
48
"cheerio" : " ^1.0.0-rc.12" ,
49
- "eslint-plugin-jest" : " ^27.9.0 " ,
50
- "execa" : " ^8.0.1 " ,
51
- "get-port" : " ^7.0 .0" ,
52
- "npm-run-all2" : " ^6.1.2 " ,
49
+ "eslint-plugin-jest" : " ^28.8.3 " ,
50
+ "execa" : " ^9.4.0 " ,
51
+ "get-port" : " ^7.1 .0" ,
52
+ "npm-run-all2" : " ^6.2.3 " ,
53
53
"outdent" : " ^0.8.0" ,
54
- "puppeteer" : " ^22.1.0 " ,
54
+ "puppeteer" : " ^23.4.1 " ,
55
55
"shelljs" : " ^0.8.5" ,
56
- "tsd" : " ^0.30.4 " ,
57
- "type-fest" : " ^4.10.2 " ,
58
- "xo" : " ^0.57.0 "
56
+ "tsd" : " ^0.31.2 " ,
57
+ "type-fest" : " ^4.26.1 " ,
58
+ "xo" : " ^0.59.3 "
59
59
},
60
60
"xo" : {
61
61
"rules" : {
79
79
}
80
80
]
81
81
}
82
+ },
83
+ {
84
+ "files" : [
85
+ " scripts/*.mjs"
86
+ ],
87
+ "rules" : {
88
+ "n/no-unsupported-features/node-builtins" : " off"
89
+ }
82
90
}
83
91
]
84
92
},
Original file line number Diff line number Diff line change 3
3
// Will download when execute
4
4
module . exports = {
5
5
skipDownload : true ,
6
+ chrome : {
7
+ skipDownload : false ,
8
+ } ,
9
+ 'chrome-headless-shell' : {
10
+ skipDownload : false ,
11
+ } ,
12
+ firefox : {
13
+ skipDownload : false ,
14
+ } ,
6
15
} ;
Original file line number Diff line number Diff line change @@ -76,17 +76,20 @@ const isWritable = name =>
76
76
|| name . startsWith ( 'on' ) ;
77
77
78
78
async function downloadBrowser ( { product} = { } ) {
79
- const { downloadBrowser } = await import ( 'puppeteer/internal/node/install.js' ) ;
79
+ const { downloadBrowsers } = await import ( 'puppeteer/internal/node/install.js' ) ;
80
80
const originalEnv = { ...process . env } ;
81
81
try {
82
82
process . env . PUPPETEER_SKIP_DOWNLOAD = JSON . stringify ( false ) ;
83
83
if ( product ) {
84
84
process . env . PUPPETEER_PRODUCT = product ;
85
85
}
86
86
87
- await downloadBrowser ( ) ;
87
+ await downloadBrowsers ( ) ;
88
88
} finally {
89
- for ( const env of [ 'PUPPETEER_SKIP_DOWNLOAD' , 'PUPPETEER_PRODUCT' ] ) {
89
+ for ( const env of [
90
+ 'PUPPETEER_PRODUCT' ,
91
+ 'PUPPETEER_SKIP_DOWNLOAD' ,
92
+ ] ) {
90
93
if ( Object . hasOwn ( originalEnv ) ) {
91
94
process . env [ env ] = originalEnv [ env ] ;
92
95
} else {
Original file line number Diff line number Diff line change 1
- import util from 'node:util' ;
1
+ import { parseArgs } from 'node:util' ;
2
2
import { outdent } from 'outdent' ;
3
3
import { execaCommand } from 'execa' ;
4
4
import getBuiltinGlobals from './get-builtin-globals.mjs' ;
@@ -92,7 +92,7 @@ async function run(options) {
92
92
93
93
const {
94
94
values : options ,
95
- } = util . parseArgs ( {
95
+ } = parseArgs ( {
96
96
options : {
97
97
environment : {
98
98
type : 'string' ,
You can’t perform that action at this time.
0 commit comments