Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: update puppeteer to v23 #28181

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Input hashes for repository rule npm_translate_lock(name = "npm2", pnpm_lock = "@//:pnpm-lock.yaml").
# This file should be checked into version control along with the pnpm-lock.yaml file.
.npmrc=-2023857461
package.json=684715267
package.json=-997435013
packages/angular/cli/package.json=-1878910022
packages/angular/pwa/package.json=1108903917
packages/angular_devkit/architect/package.json=-1496633956
Expand All @@ -13,6 +13,6 @@ packages/angular_devkit/schematics/package.json=673943597
packages/angular_devkit/schematics_cli/package.json=-1663529211
packages/ngtools/webpack/package.json=1463215526
packages/schematics/angular/package.json=251715148
pnpm-lock.yaml=-1421958199
pnpm-lock.yaml=-982617857
pnpm-workspace.yaml=1732591250
yarn.lock=-1426990307
yarn.lock=1511941294
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ yarn-error.log*
.husky/_
.bazelrc.user
.eslintcache
.cache/

# Mac OSX Finder files.
**/.DS_Store
Expand Down
9 changes: 9 additions & 0 deletions .puppeteerrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const { join } = require('path');

/**
* @type {import("puppeteer").Configuration}
*/
module.exports = {
// Changes the cache location for Puppeteer.
cacheDirectory: join(__dirname, '.cache', 'puppeteer'),
};
5 changes: 5 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ copy_to_bin(
],
)

copy_to_bin(
name = "puppeteer_browsers",
srcs = [".puppeteerrc.cjs"] + glob([".cache/puppeteer/**"]),
)

# Detect if the build is running under --stamp
config_setting(
name = "stamp",
Expand Down
1 change: 1 addition & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ load("@build_bazel_rules_nodejs//:index.bzl", "yarn_install")
yarn_install(
name = "npm",
data = [
"//:.puppeteerrc.cjs",
"//:.yarn/releases/yarn-4.5.0.cjs",
"//:.yarnrc.yml",
"//:patches/@angular+bazel+19.1.0-next.4.patch",
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"templates": "yarn admin templates",
"validate": "yarn admin validate",
"postinstall": "patch-package && yarn webdriver-update && yarn husky",
"//webdriver-update-README": "ChromeDriver version must match Puppeteer Chromium version, see https://github.com/GoogleChrome/puppeteer/releases http://chromedriver.chromium.org/downloads",
"webdriver-update": "webdriver-manager update --standalone false --gecko false --versions.chrome 106.0.5249.21",
"//webdriver-update-README": "ChromeDriver version must match Puppeteer Chromium version",
"webdriver-update": "yarn browsers install [email protected] --path=./.cache/puppeteer/",
"public-api:check": "node goldens/public-api/manage.js test",
"ng-dev": "node --no-warnings=ExperimentalWarning --loader ts-node/esm/transpile-only node_modules/@angular/ng-dev/bundles/cli.mjs",
"public-api:update": "node goldens/public-api/manage.js accept",
Expand Down Expand Up @@ -80,6 +80,7 @@
"@inquirer/confirm": "5.1.3",
"@inquirer/prompts": "7.2.3",
"@listr2/prompt-adapter-inquirer": "2.0.18",
"@puppeteer/browsers": "2.7.0",
"@rollup/plugin-alias": "^5.1.1",
"@rollup/plugin-commonjs": "^28.0.0",
"@rollup/plugin-node-resolve": "^13.0.5",
Expand Down Expand Up @@ -176,7 +177,7 @@
"postcss-loader": "8.1.1",
"prettier": "^3.0.0",
"protractor": "~7.0.0",
"puppeteer": "18.2.1",
"puppeteer": "23.1.0",
"quicktype-core": "23.0.171",
"resolve-url-loader": "5.0.0",
"rollup": "4.31.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ describeServeBuilder(
// See: https://github.com/angular/angular-cli/pull/17624
// eslint-disable-next-line max-len
// executablePath: '/Users/<USERNAME>/git/angular-cli/node_modules/puppeteer/.local-chromium/mac-818858/chrome-mac/Chromium.app/Contents/MacOS/Chromium',
ignoreHTTPSErrors: true,
acceptInsecureCerts: true,
args: ['--no-sandbox', '--disable-gpu'],
});
});
Expand Down
1 change: 1 addition & 0 deletions packages/angular_devkit/build_angular/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,7 @@ LARGE_SPECS = {
jasmine_node_test(
name = "build_angular_" + spec + "_test",
size = LARGE_SPECS[spec].get("size", "medium"),
data = ["//:puppeteer_browsers"],
flaky = LARGE_SPECS[spec].get("flaky", False),
shard_count = LARGE_SPECS[spec].get("shards", 2),
# These tests are resource intensive and should not be over-parallized as they will
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ describeServeBuilder(
// See: https://github.com/angular/angular-cli/pull/17624
// eslint-disable-next-line max-len
// executablePath: '/Users/<USERNAME>/git/angular-cli/node_modules/puppeteer/.local-chromium/mac-818858/chrome-mac/Chromium.app/Contents/MacOS/Chromium',
ignoreHTTPSErrors: true,
acceptInsecureCerts: true,
args: ['--no-sandbox', '--disable-gpu'],
});
});
Expand Down
Loading
Loading