Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,612 changes: 455 additions & 1,157 deletions common/config/rush/npm-shrinkwrap.json

Large diffs are not rendered by default.

26 changes: 24 additions & 2 deletions core/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: [ "Chromium_without_security" ],
listenAddress: 'localhost',
Expand Down Expand Up @@ -57,4 +79,4 @@ module.exports = function (config) {

logLevel: config.LOG_INFO
})
};
};
24 changes: 23 additions & 1 deletion core/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);
}

config.set({
browsers: [ "Chromium_without_security" ],
listenAddress: 'localhost',
Expand Down
3 changes: 2 additions & 1 deletion core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
"karma-mocha": "^2.0.1",
"karma-spec-reporter": "^0.0.36",
"karma-typescript": "^5.5.3",
"puppeteer": "^24.4.0",
"puppeteer": "^25.1.0",
"rollup": "^4.54.0",
"rollup-plugin-minify-es": "^1.1.1",
"rollup-plugin-istanbul": "^5.0.0",
Expand All @@ -105,3 +105,4 @@
"copyfiles": "^2.4.1"
}
}

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"grunt": "^1.6.2",
"grunt-cli": "^1.4.3",
"nyc": "^18.0.0",
"puppeteer": "^24.4.0",
"puppeteer": "^25.1.0",
"typedoc": "^0.28.2",
"typedoc-github-theme": "^0.4.0",
"typescript": "~5.2.2",
Expand Down
26 changes: 24 additions & 2 deletions shim/chai/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: [ "Chromium_without_security" ],
listenAddress: 'localhost',
Expand Down Expand Up @@ -57,4 +79,4 @@ module.exports = function (config) {

logLevel: config.LOG_INFO
})
};
};
26 changes: 24 additions & 2 deletions shim/chai/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);
}

config.set({
browsers: [ "Chromium_without_security" ],
listenAddress: 'localhost',
Expand Down Expand Up @@ -67,4 +89,4 @@ module.exports = function (config) {
captureTimeout: 60000,
browserNoActivityTimeout: 60000
});
};
};
3 changes: 2 additions & 1 deletion shim/chai/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
"karma-mocha": "^2.0.1",
"karma-spec-reporter": "^0.0.36",
"karma-typescript": "^5.5.3",
"puppeteer": "^24.4.0",
"puppeteer": "^25.1.0",
"rollup": "^4.54.0",
"rollup-plugin-minify-es": "^1.1.1",
"rollup-plugin-istanbul": "^5.0.0",
Expand All @@ -106,3 +106,4 @@
"copyfiles": "^2.4.1"
}
}

Loading