Skip to content

Commit d7eff11

Browse files
dependabot[bot]Copilotnev21nevware21-bot
authored
build(deps-dev): bump puppeteer from 24.43.1 to 25.1.0 and update Karma config compatibility (#321)
* build(deps-dev): bump puppeteer from 24.43.1 to 25.1.0 Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 24.43.1 to 25.1.0. - [Release notes](https://github.com/puppeteer/puppeteer/releases) - [Changelog](https://github.com/puppeteer/puppeteer/blob/main/CHANGELOG.md) - [Commits](puppeteer/puppeteer@puppeteer-v24.43.1...puppeteer-v25.1.0) --- updated-dependencies: - dependency-name: puppeteer dependency-version: 25.1.0 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * test: unblock karma with puppeteer executable path resolution * Refactor Puppeteer executable path resolution * Refactor Puppeteer executable path resolution * Refactor Puppeteer executable path resolution * Refactor Puppeteer executable path resolution * chore: syncing versions and shrinkwrap --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: nev21 <82737406+nev21@users.noreply.github.com> Co-authored-by: nevware21-bot <252503968+nevware21-bot@users.noreply.github.com>
1 parent e9df56f commit d7eff11

8 files changed

Lines changed: 555 additions & 1167 deletions

File tree

common/config/rush/npm-shrinkwrap.json

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

core/karma.browser.conf.js

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,28 @@
1-
process.env.CHROME_BIN = require('puppeteer').executablePath();
1+
const childProcess = require('child_process');
2+
3+
function _resolvePuppeteerExecutablePathSync() {
4+
return childProcess.execFileSync(process.execPath, [
5+
"-e",
6+
"require('puppeteer').executablePath().then((path) => process.stdout.write(path || ''))"
7+
], {
8+
encoding: "utf8"
9+
}).trim();
10+
}
211

312
module.exports = function (config) {
13+
// Puppeteer v25+ resolves executablePath asynchronously, so resolve it in a subprocess
14+
// to keep this Karma config synchronous.
15+
try {
16+
const chromePath = _resolvePuppeteerExecutablePathSync();
17+
if (chromePath) {
18+
process.env.CHROME_BIN = chromePath;
19+
process.env.CHROMIUM_BIN = chromePath;
20+
}
21+
} catch (error) {
22+
console.warn("Puppeteer executable path could not be resolved. Chrome/Chromium tests may be skipped.");
23+
process.exit(0);
24+
}
25+
426
config.set({
527
browsers: [ "Chromium_without_security" ],
628
listenAddress: 'localhost',
@@ -57,4 +79,4 @@ module.exports = function (config) {
5779

5880
logLevel: config.LOG_INFO
5981
})
60-
};
82+
};

core/karma.worker.conf.js

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,28 @@
1-
process.env.CHROME_BIN = require('puppeteer').executablePath();
1+
const childProcess = require('child_process');
2+
3+
function _resolvePuppeteerExecutablePathSync() {
4+
return childProcess.execFileSync(process.execPath, [
5+
"-e",
6+
"require('puppeteer').executablePath().then((path) => process.stdout.write(path || ''))"
7+
], {
8+
encoding: "utf8"
9+
}).trim();
10+
}
211

312
module.exports = function (config) {
13+
// Puppeteer v25+ resolves executablePath asynchronously, so resolve it in a subprocess
14+
// to keep this Karma config synchronous.
15+
try {
16+
const chromePath = _resolvePuppeteerExecutablePathSync();
17+
if (chromePath) {
18+
process.env.CHROME_BIN = chromePath;
19+
process.env.CHROMIUM_BIN = chromePath;
20+
}
21+
} catch (error) {
22+
console.warn("Puppeteer executable path could not be resolved. Chrome/Chromium tests may be skipped.");
23+
process.exit(0);
24+
}
25+
426
config.set({
527
browsers: [ "Chromium_without_security" ],
628
listenAddress: 'localhost',

core/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
"karma-mocha": "^2.0.1",
9393
"karma-spec-reporter": "^0.0.36",
9494
"karma-typescript": "^5.5.3",
95-
"puppeteer": "^24.4.0",
95+
"puppeteer": "^25.1.0",
9696
"rollup": "^4.54.0",
9797
"rollup-plugin-minify-es": "^1.1.1",
9898
"rollup-plugin-istanbul": "^5.0.0",
@@ -105,3 +105,4 @@
105105
"copyfiles": "^2.4.1"
106106
}
107107
}
108+

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
"grunt": "^1.6.2",
8888
"grunt-cli": "^1.4.3",
8989
"nyc": "^18.0.0",
90-
"puppeteer": "^24.4.0",
90+
"puppeteer": "^25.1.0",
9191
"typedoc": "^0.28.2",
9292
"typedoc-github-theme": "^0.4.0",
9393
"typescript": "~5.2.2",

shim/chai/karma.browser.conf.js

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,28 @@
1-
process.env.CHROME_BIN = require('puppeteer').executablePath();
1+
const childProcess = require('child_process');
2+
3+
function _resolvePuppeteerExecutablePathSync() {
4+
return childProcess.execFileSync(process.execPath, [
5+
"-e",
6+
"require('puppeteer').executablePath().then((path) => process.stdout.write(path || ''))"
7+
], {
8+
encoding: "utf8"
9+
}).trim();
10+
}
211

312
module.exports = function (config) {
13+
// Puppeteer v25+ resolves executablePath asynchronously, so resolve it in a subprocess
14+
// to keep this Karma config synchronous.
15+
try {
16+
const chromePath = _resolvePuppeteerExecutablePathSync();
17+
if (chromePath) {
18+
process.env.CHROME_BIN = chromePath;
19+
process.env.CHROMIUM_BIN = chromePath;
20+
}
21+
} catch (error) {
22+
console.warn("Puppeteer executable path could not be resolved. Chrome/Chromium tests may be skipped.");
23+
process.exit(0);
24+
}
25+
426
config.set({
527
browsers: [ "Chromium_without_security" ],
628
listenAddress: 'localhost',
@@ -57,4 +79,4 @@ module.exports = function (config) {
5779

5880
logLevel: config.LOG_INFO
5981
})
60-
};
82+
};

shim/chai/karma.worker.conf.js

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,28 @@
1-
process.env.CHROME_BIN = require('puppeteer').executablePath();
1+
const childProcess = require('child_process');
2+
3+
function _resolvePuppeteerExecutablePathSync() {
4+
return childProcess.execFileSync(process.execPath, [
5+
"-e",
6+
"require('puppeteer').executablePath().then((path) => process.stdout.write(path || ''))"
7+
], {
8+
encoding: "utf8"
9+
}).trim();
10+
}
211

312
module.exports = function (config) {
13+
// Puppeteer v25+ resolves executablePath asynchronously, so resolve it in a subprocess
14+
// to keep this Karma config synchronous.
15+
try {
16+
const chromePath = _resolvePuppeteerExecutablePathSync();
17+
if (chromePath) {
18+
process.env.CHROME_BIN = chromePath;
19+
process.env.CHROMIUM_BIN = chromePath;
20+
}
21+
} catch (error) {
22+
console.warn("Puppeteer executable path could not be resolved. Chrome/Chromium tests may be skipped.");
23+
process.exit(0);
24+
}
25+
426
config.set({
527
browsers: [ "Chromium_without_security" ],
628
listenAddress: 'localhost',
@@ -67,4 +89,4 @@ module.exports = function (config) {
6789
captureTimeout: 60000,
6890
browserNoActivityTimeout: 60000
6991
});
70-
};
92+
};

shim/chai/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
"karma-mocha": "^2.0.1",
9494
"karma-spec-reporter": "^0.0.36",
9595
"karma-typescript": "^5.5.3",
96-
"puppeteer": "^24.4.0",
96+
"puppeteer": "^25.1.0",
9797
"rollup": "^4.54.0",
9898
"rollup-plugin-minify-es": "^1.1.1",
9999
"rollup-plugin-istanbul": "^5.0.0",
@@ -106,3 +106,4 @@
106106
"copyfiles": "^2.4.1"
107107
}
108108
}
109+

0 commit comments

Comments
 (0)