Skip to content

Commit

Permalink
feat: upgrade puppeteer to v13
Browse files Browse the repository at this point in the history
  • Loading branch information
wadackel committed Mar 27, 2022
1 parent 534b602 commit 6598c99
Show file tree
Hide file tree
Showing 11 changed files with 136 additions and 65 deletions.
2 changes: 1 addition & 1 deletion examples/html/acot.config.js
@@ -1,6 +1,6 @@
module.exports = {
extends: ['@acot'],
origin: 'http://localhost:5000',
origin: 'http://localhost:6005',
connection: {
command: 'yarn serve',
},
Expand Down
4 changes: 2 additions & 2 deletions examples/html/package.json
Expand Up @@ -3,15 +3,15 @@
"version": "0.0.14",
"private": true,
"scripts": {
"serve": "serve src",
"serve": "serve src -l 6005",
"test": "acot run"
},
"devDependencies": {
"@acot/acot-config": "0.0.14",
"@acot/acot-preset-axe": "0.0.14",
"@acot/acot-preset-wcag": "0.0.14",
"@acot/cli": "0.0.14",
"puppeteer": "^8.0.0",
"puppeteer": "^13.5.1",
"serve": "^11.3.0",
"typescript": "^4.1.2"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/storybook5/package.json
Expand Up @@ -17,7 +17,7 @@
"@storybook/react": "^5.3.18",
"babel-loader": "^8.2.1",
"eslint-plugin-react": "^7.20.0",
"puppeteer": "^8.0.0",
"puppeteer": "^13.5.1",
"styled-components": "^5.2.1"
},
"acot": {
Expand Down
2 changes: 1 addition & 1 deletion packages/acot-runner-sitemap/package.json
Expand Up @@ -47,7 +47,7 @@
"lodash": "^4.17.19",
"micromatch": "^4.0.2",
"node-fetch": "^2.6.1",
"puppeteer-core": "^8.0.0",
"puppeteer-core": "^13.5.1",
"serve-handler": "^6.1.3"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/acot-runner-storybook/package.json
Expand Up @@ -37,7 +37,7 @@
"deepmerge": "^4.2.2",
"is-plain-object": "^5.0.0",
"micromatch": "^4.0.2",
"puppeteer-core": "^8.0.0"
"puppeteer-core": "^13.5.1"
},
"devDependencies": {
"@acot/types": "0.0.14",
Expand Down
33 changes: 30 additions & 3 deletions packages/config/src/validator/config.validator.ts
Expand Up @@ -182,6 +182,10 @@ export const ConfigSchema = {
enum: ['*', 'canary', 'puppeteer', 'stable'],
type: 'string',
},
ChromeReleaseChannel: {
enum: ['chrome', 'chrome-beta', 'chrome-canary', 'chrome-dev'],
type: 'string',
},
ConnectionOptions: {
$ref: '#/definitions/__type_2',
},
Expand All @@ -208,6 +212,9 @@ export const ConfigSchema = {
T: {
$ref: '#/definitions/__type_3',
},
TargetFilterCallback: {
$ref: '#/definitions/__type_6',
},
U: {
type: 'string',
},
Expand Down Expand Up @@ -273,13 +280,20 @@ export const ConfigSchema = {
},
type: 'array',
},
channel: {
$ref: '#/definitions/ChromeReleaseChannel',
description: 'Chrome Release Channel',
},
debuggingPort: {
type: 'number',
},
defaultViewport: {
$ref: '#/definitions/Viewport',
description: 'Sets the viewport for each page.',
},
devtools: {
description:
'Whether to auto-open a DevTools panel for each tab. If this is set to\n`true`, then `headless` will be set to `false` automatically.',
'Whether to auto-open a DevTools panel for each tab. If this is set to\n`true`, then `headless` will be forced to `false`.',
type: 'boolean',
},
dumpio: {
Expand All @@ -300,7 +314,7 @@ export const ConfigSchema = {
extraPrefsFirefox: {
$ref: '#/definitions/Record_1',
description:
'{@link https://developer.mozilla.org/en-US/docs/Mozilla/Preferences/Preference_reference | Additional preferences } that can be passed when launching with Firefox.',
'{@link https://searchfox.org/mozilla-release/source/modules/libpref/init/all.js | Additional preferences } that can be passed when launching with Firefox.',
},
handleSIGHUP: {
description: 'Close the browser process on `SIGHUP`.',
Expand Down Expand Up @@ -347,22 +361,35 @@ export const ConfigSchema = {
'Slows down Puppeteer operations by the specified amount of milliseconds to\naid debugging.',
type: 'number',
},
targetFilter: {
$ref: '#/definitions/TargetFilterCallback',
description:
'Callback to decide if Puppeteer should connect to a given target or not.',
},
timeout: {
description:
'Maximum time in milliseconds to wait for the browser to start.\nPass `0` to disable the timeout.',
type: 'number',
},
userDataDir: {
description:
'Path to a user data directory.\n{@link https://chromium.googlesource.com/chromium/src/+/master/docs/user_data_dir.md | see the Chromium docs}\nfor more info.',
'Path to a user data directory.\n{@link https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/user_data_dir.md | see the Chromium docs}\nfor more info.',
type: 'string',
},
waitForInitialPage: {
description:
'Whether to wait for the initial page to be ready.\nUseful when a user explicitly disables that (e.g. `--no-startup-window` for Chrome).',
type: 'boolean',
},
},
type: 'object',
},
__type_5: {
type: 'object',
},
__type_6: {
type: 'object',
},
},
};
export type ValidateFunction<T> = ((data: unknown) => data is T) &
Expand Down
4 changes: 2 additions & 2 deletions packages/core/package.json
Expand Up @@ -49,13 +49,13 @@
"filenamify": "^4.1.0",
"lodash": "^4.17.19",
"p-series": "^2.1.0",
"puppeteer-core": "^8.0.0",
"puppeteer-core": "^13.5.1",
"puppeteer-element2selector": "^0.0.3"
},
"devDependencies": {
"@acot/mock": "0.0.14",
"@types/lodash": "4.14.172",
"puppeteer": "8.0.0"
"puppeteer": "13.5.1"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/document/package.json
Expand Up @@ -61,7 +61,7 @@
"micromatch": "^4.0.2",
"mustache": "^4.0.1",
"plur": "^4.0.0",
"puppeteer-core": "^8.0.0",
"puppeteer-core": "^13.5.1",
"remark-parse": "^9.0.0",
"remark-stringify": "^9.0.0",
"strip-ansi": "^6.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/types/package.json
Expand Up @@ -29,7 +29,7 @@
"dependencies": {
"@acot/find-chrome": "0.0.14",
"@acot/schema-validator": "0.0.14",
"puppeteer-core": "^8.0.0",
"puppeteer-core": "^13.5.1",
"type-fest": "^0.20.2"
},
"publishConfig": {
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/package.json
Expand Up @@ -36,7 +36,7 @@
]
},
"dependencies": {
"puppeteer-core": "^8.0.0",
"puppeteer-core": "^13.5.1",
"resolve-from": "^5.0.0"
},
"publishConfig": {
Expand Down

0 comments on commit 6598c99

Please sign in to comment.