Skip to content

Commit 6a1471b

Browse files
committed
build: update puppeteer to v24.37.5
1 parent e0fa7bf commit 6a1471b

File tree

9 files changed

+326
-137
lines changed

9 files changed

+326
-137
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
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+
14+
// Resolve from relative paths to absolute paths within the bazel runfiles tree
15+
// so subprocesses spawned in a different working directory can still find them.
16+
process.env.CHROME_BIN = process.env.CHROME_BIN ? path.resolve(path.join(process.cwd(), '..', '..', '..'), process.env.CHROME_BIN) : require('puppeteer').executablePath();
1417

1518
module.exports = function(config) {
1619
config.set({

package.json

Lines changed: 1 addition & 2 deletions
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",
@@ -144,7 +144,6 @@
144144
},
145145
"pnpm": {
146146
"onlyBuiltDependencies": [
147-
"puppeteer",
148147
"webdriver-manager"
149148
],
150149
"overrides": {

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
@@ -153,7 +153,7 @@ describeServeBuilder(executeDevServer, DEV_SERVER_BUILDER_INFO, (harness, setupT
153153
// See: https://github.com/angular/angular-cli/pull/17624
154154
// eslint-disable-next-line max-len
155155
// executablePath: '/Users/<USERNAME>/git/angular-cli/node_modules/puppeteer/.local-chromium/mac-818858/chrome-mac/Chromium.app/Contents/MacOS/Chromium',
156-
ignoreHTTPSErrors: true,
156+
acceptInsecureCerts: true,
157157
args: ['--no-sandbox', '--disable-gpu'],
158158
});
159159
});

packages/angular_devkit/build_angular/src/builders/dev-server/specs/hmr_spec.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
*/
88

99
import { Architect, BuilderRun } from '@angular-devkit/architect';
10+
import path from 'node:path';
1011
// eslint-disable-next-line import/no-extraneous-dependencies
1112
import puppeteer, { Browser, Page } from 'puppeteer';
1213
import { debounceTime, switchMap, take } from 'rxjs';
@@ -28,12 +29,10 @@ describe('Dev Server Builder HMR', () => {
2829

2930
beforeAll(async () => {
3031
browser = await puppeteer.launch({
31-
// MacOSX users need to set the local binary manually because Chrome has lib files with
32-
// spaces in them which Bazel does not support in runfiles
33-
// See: https://github.com/angular/angular-cli/pull/17624
34-
// eslint-disable-next-line max-len
35-
// executablePath: '/Users/<USERNAME>/git/angular-cli/node_modules/puppeteer/.local-chromium/mac-800071/chrome-mac/Chromium.app/Contents/MacOS/Chromium',
3632
args: ['--no-sandbox', '--disable-gpu'],
33+
executablePath: process.env.CHROME_BIN
34+
? path.resolve(path.join(process.cwd(), '..', '..', '..'), process.env.CHROME_BIN)
35+
: undefined,
3736
});
3837
});
3938

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
/* eslint-disable import/no-extraneous-dependencies */
1010
import { tags } from '@angular-devkit/core';
1111
import { createServer } from 'node:http';
12+
import path from 'node:path';
1213
import { createProxyServer } from 'http-proxy';
1314
import { AddressInfo } from 'node:net';
1415
import { setTimeout as setTimeoutPromise } from 'node:timers/promises';
@@ -156,12 +157,10 @@ describeServeBuilder(
156157

157158
beforeAll(async () => {
158159
browser = await puppeteer.launch({
159-
// MacOSX users need to set the local binary manually because Chrome has lib files with
160-
// spaces in them which Bazel does not support in runfiles
161-
// See: https://github.com/angular/angular-cli/pull/17624
162-
// eslint-disable-next-line max-len
163-
// executablePath: '/Users/<USERNAME>/git/angular-cli/node_modules/puppeteer/.local-chromium/mac-818858/chrome-mac/Chromium.app/Contents/MacOS/Chromium',
164-
ignoreHTTPSErrors: true,
160+
executablePath: process.env.CHROME_BIN
161+
? path.resolve(path.join(process.cwd(), '..', '..', '..'), process.env.CHROME_BIN)
162+
: undefined,
163+
acceptInsecureCerts: true,
165164
args: ['--no-sandbox', '--disable-gpu'],
166165
});
167166
});

0 commit comments

Comments
 (0)