Skip to content

Commit bd48fe6

Browse files
committed
build: update puppeteer to v24.37.5
1 parent 7f36a36 commit bd48fe6

File tree

8 files changed

+315
-126
lines changed

8 files changed

+315
-126
lines changed

modules/testing/builder/projects/hello-world-app/karma.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// https://karma-runner.github.io/1.0/config/configuration-file.html
1111

1212
const path = require('path');
13-
process.env.CHROME_BIN = require('puppeteer').executablePath();
13+
// process.env.CHROME_BIN = require('puppeteer').executablePath();
1414

1515
module.exports = function(config) {
1616
config.set({

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
"lodash": "^4.17.21",
119119
"magic-string": "0.30.21",
120120
"prettier": "^3.0.0",
121-
"puppeteer": "18.2.1",
121+
"puppeteer": "24.37.5",
122122
"quicktype-core": "23.2.6",
123123
"rollup": "4.59.0",
124124
"rollup-license-plugin": "~3.1.0",

packages/angular/build/src/builders/dev-server/tests/behavior/serve-live-reload-proxies_spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ describeServeBuilder(
158158
// See: https://github.com/angular/angular-cli/pull/17624
159159
// eslint-disable-next-line max-len
160160
// executablePath: '/Users/<USERNAME>/git/angular-cli/node_modules/puppeteer/.local-chromium/mac-818858/chrome-mac/Chromium.app/Contents/MacOS/Chromium',
161-
ignoreHTTPSErrors: true,
161+
acceptInsecureCerts: true,
162162
args: ['--no-sandbox', '--disable-gpu'],
163163
});
164164
});

packages/angular_devkit/build_angular/src/builders/dev-server/tests/behavior/serve-live-reload-proxies_spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ describeServeBuilder(
161161
// See: https://github.com/angular/angular-cli/pull/17624
162162
// eslint-disable-next-line max-len
163163
// executablePath: '/Users/<USERNAME>/git/angular-cli/node_modules/puppeteer/.local-chromium/mac-818858/chrome-mac/Chromium.app/Contents/MacOS/Chromium',
164-
ignoreHTTPSErrors: true,
164+
acceptInsecureCerts: true,
165165
args: ['--no-sandbox', '--disable-gpu'],
166166
});
167167
});

pnpm-lock.yaml

Lines changed: 296 additions & 120 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/e2e/tests/build/auto-csp.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export default async function () {
9797
checkFn: async (page) => {
9898
const warnMessages: string[] = [];
9999
page.on('console', (msg) => {
100-
if (msg.type() === 'warning') {
100+
if (msg.type() === 'warn') {
101101
warnMessages.push(msg.text());
102102
}
103103
});

tests/e2e/utils/puppeteer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export async function executeBrowserTest(options: BrowserTestOptions = {}) {
5353
}
5454
});
5555
page.on('pageerror', (err) => {
56-
errors.push(err.toString());
56+
errors.push(`${err}`);
5757
});
5858

5959
await page.goto(url);

tools/defaults.bzl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,22 @@ def jasmine_test(data = [], args = [], **kwargs):
6565
# we change the `chdir` below to the package directory.
6666
relative_to_root = "/".join([".."] * len(native.package_name().split("/")))
6767

68+
# Chromium browser toolchain
69+
env = kwargs.pop("env", {})
70+
env.update({
71+
"CHROME_BIN": "$(CHROME-HEADLESS-SHELL)",
72+
"CHROME_PATH": "$(CHROME-HEADLESS-SHELL)",
73+
"CHROMEDRIVER_BIN": "$(CHROMEDRIVER)",
74+
})
75+
toolchains = kwargs.pop("toolchains", [])
76+
toolchains = toolchains + ["@rules_browsers//browsers/chromium:toolchain_alias"]
77+
data = data + ["@rules_browsers//browsers/chromium"]
78+
6879
_jasmine_test(
6980
node_modules = "//:node_modules",
7081
chdir = native.package_name(),
82+
env = env,
83+
toolchains = toolchains,
7184
args = [
7285
"--require=%s/node_modules/source-map-support/register.js" % relative_to_root,
7386
# Escape so that the `js_binary` launcher triggers Bash expansion.

0 commit comments

Comments
 (0)