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 4444 " environments"
4545 ],
4646 "devDependencies" : {
47- "ava" : " ^6.1.1 " ,
47+ "ava" : " ^6.1.3 " ,
4848 "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 " ,
5353 "outdent" : " ^0.8.0" ,
54- "puppeteer" : " ^22.1.0 " ,
54+ "puppeteer" : " ^23.4.1 " ,
5555 "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 "
5959 },
6060 "xo" : {
6161 "rules" : {
7979 }
8080 ]
8181 }
82+ },
83+ {
84+ "files" : [
85+ " scripts/*.mjs"
86+ ],
87+ "rules" : {
88+ "n/no-unsupported-features/node-builtins" : " off"
89+ }
8290 }
8391 ]
8492 },
Original file line number Diff line number Diff line change 33// Will download when execute
44module . exports = {
55 skipDownload : true ,
6+ chrome : {
7+ skipDownload : false ,
8+ } ,
9+ 'chrome-headless-shell' : {
10+ skipDownload : false ,
11+ } ,
12+ firefox : {
13+ skipDownload : false ,
14+ } ,
615} ;
Original file line number Diff line number Diff line change @@ -76,17 +76,20 @@ const isWritable = name =>
7676 || name . startsWith ( 'on' ) ;
7777
7878async function downloadBrowser ( { product} = { } ) {
79- const { downloadBrowser } = await import ( 'puppeteer/internal/node/install.js' ) ;
79+ const { downloadBrowsers } = await import ( 'puppeteer/internal/node/install.js' ) ;
8080 const originalEnv = { ...process . env } ;
8181 try {
8282 process . env . PUPPETEER_SKIP_DOWNLOAD = JSON . stringify ( false ) ;
8383 if ( product ) {
8484 process . env . PUPPETEER_PRODUCT = product ;
8585 }
8686
87- await downloadBrowser ( ) ;
87+ await downloadBrowsers ( ) ;
8888 } finally {
89- for ( const env of [ 'PUPPETEER_SKIP_DOWNLOAD' , 'PUPPETEER_PRODUCT' ] ) {
89+ for ( const env of [
90+ 'PUPPETEER_PRODUCT' ,
91+ 'PUPPETEER_SKIP_DOWNLOAD' ,
92+ ] ) {
9093 if ( Object . hasOwn ( originalEnv ) ) {
9194 process . env [ env ] = originalEnv [ env ] ;
9295 } else {
Original file line number Diff line number Diff line change 1- import util from 'node:util' ;
1+ import { parseArgs } from 'node:util' ;
22import { outdent } from 'outdent' ;
33import { execaCommand } from 'execa' ;
44import getBuiltinGlobals from './get-builtin-globals.mjs' ;
@@ -92,7 +92,7 @@ async function run(options) {
9292
9393const {
9494 values : options ,
95- } = util . parseArgs ( {
95+ } = parseArgs ( {
9696 options : {
9797 environment : {
9898 type : 'string' ,
You can’t perform that action at this time.
0 commit comments