Skip to content
Merged
1,033 changes: 407 additions & 626 deletions common/config/rush/npm-shrinkwrap.json

Large diffs are not rendered by default.

26 changes: 24 additions & 2 deletions dbg/karma.browser.conf.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@
process.env.CHROME_BIN = require('puppeteer').executablePath();
const childProcess = require('child_process');

function _resolvePuppeteerExecutablePathSync() {
return childProcess.execFileSync(process.execPath, [
"-e",
"require('puppeteer').executablePath().then((path) => process.stdout.write(path || ''))"
], {
encoding: "utf8"
}).trim();
}

module.exports = function (config) {
// Puppeteer v25+ resolves executablePath asynchronously, so resolve it in a subprocess
// to keep this Karma config synchronous.
try {
const chromePath = _resolvePuppeteerExecutablePathSync();
if (chromePath) {
process.env.CHROME_BIN = chromePath;
process.env.CHROMIUM_BIN = chromePath;
}
} catch (error) {
console.warn("Puppeteer executable path could not be resolved. Chrome/Chromium tests may be skipped.");
process.exit(0);
}

config.set({
browsers: [ "ChromeHeadlessNoSandbox" ],
listenAddress: 'localhost',
Expand Down Expand Up @@ -53,4 +75,4 @@ module.exports = function (config) {
},
logLevel: config.LOG_INFO
})
};
};
26 changes: 24 additions & 2 deletions dbg/karma.worker.conf.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@
process.env.CHROME_BIN = require('puppeteer').executablePath()
const childProcess = require('child_process');

function _resolvePuppeteerExecutablePathSync() {
return childProcess.execFileSync(process.execPath, [
"-e",
"require('puppeteer').executablePath().then((path) => process.stdout.write(path || ''))"
], {
encoding: "utf8"
}).trim();
}

module.exports = function (config) {
// Puppeteer v25+ resolves executablePath asynchronously, so resolve it in a subprocess
// to keep this Karma config synchronous.
try {
const chromePath = _resolvePuppeteerExecutablePathSync();
if (chromePath) {
process.env.CHROME_BIN = chromePath;
process.env.CHROMIUM_BIN = chromePath;
}
} catch (error) {
console.warn("Puppeteer executable path could not be resolved. Chrome/Chromium tests may be skipped.");
process.exit(0);
}

const typescript = require("@rollup/plugin-typescript");
const plugin = require("@rollup/plugin-node-resolve");
const commonjs = require("@rollup/plugin-commonjs");
Expand Down Expand Up @@ -61,4 +83,4 @@ module.exports = function (config) {
},
logLevel: config.LOG_DEBUG
})
};
};
3 changes: 2 additions & 1 deletion dbg/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"karma-coverage": "^2.2.0",
"mocha": "^10.0.0",
"nyc": "^18.0.0",
"puppeteer": "24.43.1",
"puppeteer": "25.0.2",
"rollup": "^4.54.0",
"rollup-plugin-minify-es": "^1.1.1",
"rollup-plugin-istanbul": "^5.0.0",
Expand All @@ -123,3 +123,4 @@




26 changes: 24 additions & 2 deletions providers/karma.browser.conf.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@
process.env.CHROME_BIN = require('puppeteer').executablePath();
const childProcess = require('child_process');

function _resolvePuppeteerExecutablePathSync() {
return childProcess.execFileSync(process.execPath, [
"-e",
"require('puppeteer').executablePath().then((path) => process.stdout.write(path || ''))"
], {
encoding: "utf8"
}).trim();
}

module.exports = function (config) {
// Puppeteer v25+ resolves executablePath asynchronously, so resolve it in a subprocess
// to keep this Karma config synchronous.
try {
const chromePath = _resolvePuppeteerExecutablePathSync();
if (chromePath) {
process.env.CHROME_BIN = chromePath;
process.env.CHROMIUM_BIN = chromePath;
}
} catch (error) {
console.warn("Puppeteer executable path could not be resolved. Chrome/Chromium tests may be skipped.");
process.exit(0);
}

config.set({
browsers: [ "ChromeHeadlessNoSandbox" ],
listenAddress: 'localhost',
Expand Down Expand Up @@ -53,4 +75,4 @@ module.exports = function (config) {
},
logLevel: config.LOG_INFO
})
};
};
26 changes: 24 additions & 2 deletions providers/karma.worker.conf.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@
process.env.CHROME_BIN = require('puppeteer').executablePath()
const childProcess = require('child_process');

function _resolvePuppeteerExecutablePathSync() {
return childProcess.execFileSync(process.execPath, [
"-e",
"require('puppeteer').executablePath().then((path) => process.stdout.write(path || ''))"
], {
encoding: "utf8"
}).trim();
}

module.exports = function (config) {
// Puppeteer v25+ resolves executablePath asynchronously, so resolve it in a subprocess
// to keep this Karma config synchronous.
try {
const chromePath = _resolvePuppeteerExecutablePathSync();
if (chromePath) {
process.env.CHROME_BIN = chromePath;
process.env.CHROMIUM_BIN = chromePath;
}
} catch (error) {
console.warn("Puppeteer executable path could not be resolved. Chrome/Chromium tests may be skipped.");
process.exit(0);
}

const typescript = require("@rollup/plugin-typescript");
const plugin = require("@rollup/plugin-node-resolve");
const commonjs = require("@rollup/plugin-commonjs");
Expand Down Expand Up @@ -65,4 +87,4 @@ module.exports = function (config) {
},
logLevel: config.LOG_DEBUG
})
};
};
2 changes: 1 addition & 1 deletion providers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
"karma-coverage": "^2.2.0",
"mocha": "^10.0.0",
"nyc": "^18.0.0",
"puppeteer": "24.43.1",
"puppeteer": "25.0.2",
"rollup": "^4.54.0",
"rollup-plugin-minify-es": "^1.1.1",
"rollup-plugin-istanbul": "^5.0.0",
Expand Down