Skip to content

Commit

Permalink
build: update puppeteer to v23
Browse files Browse the repository at this point in the history
  • Loading branch information
clydin committed Jan 22, 2025
1 parent 5fad329 commit 30a5a01
Show file tree
Hide file tree
Showing 11 changed files with 314 additions and 257 deletions.
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=-1617486497
package.json=1389938439
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=597254444
packages/schematics/angular/package.json=251715148
pnpm-lock.yaml=393090124
pnpm-lock.yaml=1772479024
pnpm-workspace.yaml=1732591250
yarn.lock=311829039
yarn.lock=-18707832
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 @@ -139,6 +139,7 @@ yarn_install(
"//:patches/@angular+bazel+19.1.0-next.4.patch",
"//:patches/@bazel+concatjs+5.8.1.patch",
"//:patches/@bazel+jasmine+5.8.1.patch",
"//:.puppeteerrc.cjs",
],
# Currently disabled due to:
# 1. Missing Windows support currently.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,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

0 comments on commit 30a5a01

Please sign in to comment.