build(bazel): update to latest stable chromium 74 on osx and linux for karma under bazel (#30502)

We were on 69 for both of these platforms which is fairly old. This update also requires a temporary patch to the @bazel/karma npm package to disable chrome sandboxing on OSX as it is broken under Bazel as of chromium 73. Windows is still on Chromium 66 but updating this will require upstream changes to rules_webtesting as the archive name & executable name has changed as of 72 for Windows and hard-coded paths in rules_webtesting break things.

PR Close #30502
This commit is contained in:
Greg Magolan
2019-05-15 20:01:50 -07:00
committed by Jason Aden
parent 73e3f565e0
commit b4014e9a39
3 changed files with 138 additions and 17 deletions

View File

@ -27,21 +27,28 @@ const log = console.log;
// COMMENTED OUT BECAUSE WE CURRENTLY REQUIRE NO PATCHES
// UNCOMMENT TO REENABLE PATCHING AND LOG OUTPUT
//
// log('===== about to run the postinstall-patches.js script =====');
// // fail on first error
// set('-e');
// // print commands as being executed
// set('-v');
// // jump to project root
// cd(path.join(__dirname, '../'));
log('===== about to run the postinstall-patches.js script =====');
// fail on first error
set('-e');
// print commands as being executed
set('-v');
// jump to project root
cd(path.join(__dirname, '../'));
// /* EXAMPLE PATCH:
// // https://github.com/ReactiveX/rxjs/pull/3302
// // make node_modules/rxjs compilable with Typescript 2.7
// // remove when we update to rxjs v6
// log('\n# patch: reactivex/rxjs#3302 make node_modules/rxjs compilable with Typescript 2.7');
// sed('-i', '(\'response\' in xhr)', '(\'response\' in (xhr as any))',
// 'node_modules/rxjs/src/observable/dom/AjaxObservable.ts');
// */
/* EXAMPLE PATCH:
// https://github.com/ReactiveX/rxjs/pull/3302
// make node_modules/rxjs compilable with Typescript 2.7
// remove when we update to rxjs v6
log('\n# patch: reactivex/rxjs#3302 make node_modules/rxjs compilable with Typescript 2.7');
sed('-i', '(\'response\' in xhr)', '(\'response\' in (xhr as any))',
'node_modules/rxjs/src/observable/dom/AjaxObservable.ts');
*/
// log('===== finished running the postinstall-patches.js script =====');
// make chrome 74 work on OSX with karma under bazel
// remove when we update to the next @bazel/karma release
log('\n# patch: @bazel/karma 0.29.0 to disable chrome sandbox for OSX');
sed('-i', 'process.platform !== \'linux\'',
'process.platform !== \'linux\' && process.platform !== \'darwin\'',
'node_modules/@bazel/karma/karma.conf.js');
log('===== finished running the postinstall-patches.js script =====');