Skip to content

Commit

Permalink
Update dependencies (#262)
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker authored Sep 27, 2024
1 parent b1d88b8 commit 560cf2f
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 14 deletions.
26 changes: 17 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,18 @@
"environments"
],
"devDependencies": {
"ava": "^6.1.1",
"ava": "^6.1.3",
"cheerio": "^1.0.0-rc.12",
"eslint-plugin-jest": "^27.9.0",
"execa": "^8.0.1",
"get-port": "^7.0.0",
"npm-run-all2": "^6.1.2",
"eslint-plugin-jest": "^28.8.3",
"execa": "^9.4.0",
"get-port": "^7.1.0",
"npm-run-all2": "^6.2.3",
"outdent": "^0.8.0",
"puppeteer": "^22.1.0",
"puppeteer": "^23.4.1",
"shelljs": "^0.8.5",
"tsd": "^0.30.4",
"type-fest": "^4.10.2",
"xo": "^0.57.0"
"tsd": "^0.31.2",
"type-fest": "^4.26.1",
"xo": "^0.59.3"
},
"xo": {
"rules": {
Expand All @@ -79,6 +79,14 @@
}
]
}
},
{
"files": [
"scripts/*.mjs"
],
"rules": {
"n/no-unsupported-features/node-builtins": "off"
}
}
]
},
Expand Down
9 changes: 9 additions & 0 deletions puppeteer.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,13 @@
// Will download when execute
module.exports = {
skipDownload: true,
chrome: {
skipDownload: false,
},
'chrome-headless-shell': {
skipDownload: false,
},
firefox: {
skipDownload: false,
},
};
9 changes: 6 additions & 3 deletions scripts/get-browser-globals.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,20 @@ const isWritable = name =>
|| name.startsWith('on');

async function downloadBrowser({product} = {}) {
const {downloadBrowser} = await import('puppeteer/internal/node/install.js');
const {downloadBrowsers} = await import('puppeteer/internal/node/install.js');
const originalEnv = {...process.env};
try {
process.env.PUPPETEER_SKIP_DOWNLOAD = JSON.stringify(false);
if (product) {
process.env.PUPPETEER_PRODUCT = product;
}

await downloadBrowser();
await downloadBrowsers();
} finally {
for (const env of ['PUPPETEER_SKIP_DOWNLOAD', 'PUPPETEER_PRODUCT']) {
for (const env of [
'PUPPETEER_PRODUCT',
'PUPPETEER_SKIP_DOWNLOAD',
]) {
if (Object.hasOwn(originalEnv)) {
process.env[env] = originalEnv[env];
} else {
Expand Down
4 changes: 2 additions & 2 deletions scripts/update.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import util from 'node:util';
import {parseArgs} from 'node:util';
import {outdent} from 'outdent';
import {execaCommand} from 'execa';
import getBuiltinGlobals from './get-builtin-globals.mjs';
Expand Down Expand Up @@ -92,7 +92,7 @@ async function run(options) {

const {
values: options,
} = util.parseArgs({
} = parseArgs({
options: {
environment: {
type: 'string',
Expand Down

0 comments on commit 560cf2f

Please sign in to comment.