Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3ac0a1c

Browse files
author
Keen Yee Liau
committed
fix(@angular-devkit/build-angular): Downgrade Karma to 5.1.x
There's a bug in Karma 5.2.x that causes unit tests to fail when they should not. It was supposed to be fixed in karma-runner/karma#3565 but CI still failed, blocking the release of Karma. In order to mitigate this, we temporarily downgrade Karma back to 5.1.x A side-effect of this is that coverage tests that uses karma-coverage and exceeds the threshold will not fail, because karma-coverage requires Karma 5.2.x. We expect this to be fixed very soon.
1 parent a9175be commit 3ac0a1c

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

‎packages/angular_devkit/build_angular/package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"@angular-devkit/core": "0.0.0",
1414
"@babel/core": "7.12.3",
1515
"@babel/generator": "7.12.1",
16-
"@babel/plugin-transform-runtime": "7.12.1",
16+
"@babel/plugin-transform-runtime": "7.12.1",
1717
"@babel/preset-env": "7.12.1",
1818
"@babel/runtime": "7.12.1",
1919
"@babel/template": "7.10.4",
@@ -80,7 +80,7 @@
8080
"peerDependencies": {
8181
"@angular/compiler-cli": "^11.0.0 || ^11.0.0-next",
8282
"@angular/localize": "^11.0.0 || ^11.0.0-next",
83-
"karma": "^5.2.0",
83+
"karma": "^5.1.0",
8484
"ng-packagr": "^11.0.0 || ^11.0.0-next",
8585
"protractor": "^7.0.0",
8686
"tslint": "^6.1.0",

‎packages/angular_devkit/build_angular/src/webpack/plugins/karma.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ const init: any = (config: any, emitter: any, customFileHandlers: any) => {
9999
const hasIstanbulReporter = reporters.includes('coverage-istanbul');
100100
if (hasCoveragePlugin && !hasCoverageReporter) {
101101
reporters.push('coverage');
102+
logger.warn(`There is a known issue with Karma and karma-coverage. Tests that exceed the coverage threshold will not fail. This will be fixed in Karma 5.2.x soon.`)
102103
}
103104
else if (hasIstanbulPlugin && !hasIstanbulReporter) {
104105
// coverage-istanbul is deprecated in favor of karma-coverage

‎packages/schematics/angular/workspace/files/package.json.template‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"codelyzer": "^6.0.0",
3131
"jasmine-core": "~3.6.0",
3232
"jasmine-spec-reporter": "~5.0.0",
33-
"karma": "~5.2.0",
33+
"karma": "~5.1.0",
3434
"karma-chrome-launcher": "~3.1.0",
3535
"karma-coverage": "~2.0.3",
3636
"karma-jasmine": "~4.0.0",

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /