From c02554b450c61a3812485ac5a5849cc69439facc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= <1005065+DeepDiver1975@users.noreply.github.com> Date: Tue, 7 Jul 2026 09:38:49 +0200 Subject: [PATCH 1/2] fix(deps): bump karma from ^4.4 to ^6.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Clears two medium Dependabot advisories in the karma test runner: open redirect (fixed in 6.3.16) and cross-site scripting (fixed in 6.3.14). karma is a devDependency (test-only) and is never shipped in the app. The existing karma.conf.js loads unchanged under karma 6 (verified via karma.config.parseConfig) and all karma-* plugins install cleanly, so no config migration is required. Co-Authored-By: Claude Opus 4.8 Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 15c73dc7b..d5c1cd936 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "gulp-eslint": "^3.0.1", "gulp-ng-annotate": "^2.0.0", "gulp-sourcemaps": "^1.6.0", - "karma": "^4.4", + "karma": "^6.4", "karma-chai": "^0.1.0", "karma-coverage": "^1.1.2", "karma-firefox-launcher": "^1.3.0", From 58d4c0cf30c3d215bdbb37fad8ae951d0862299e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= <1005065+DeepDiver1975@users.noreply.github.com> Date: Tue, 7 Jul 2026 09:48:33 +0200 Subject: [PATCH 2/2] fix(build): update gulp karma task for karma 6 API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit karma 6 removed the static `Server.start()` used by the gulp `karma` task (`TypeError: KarmaServer.start is not a function`). Instantiate `new karma.Server(config, doneCallback)` with config built via `karma.config.parseConfig(...)` and call `.start()` on the instance. Also propagate a non-zero karma exit code as a task error so failing tests fail the build. Co-Authored-By: Claude Opus 4.8 Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com> --- gulpfile.js | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 49ba8c4d9..bbec06caf 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -2,15 +2,25 @@ var gulp = require('gulp'), concat = require('gulp-concat'), eslint = require('gulp-eslint'), ngAnnotate = require('gulp-ng-annotate'), - KarmaServer = require('karma').Server, + karma = require('karma'), sourcemaps = require('gulp-sourcemaps'); gulp.task('karma', function(done){ - KarmaServer.start({ - configFile: __dirname + '/karma.conf.js', - singleRun: true - }, function() { - done(); + karma.config.parseConfig( + __dirname + '/karma.conf.js', + { singleRun: true }, + { promiseConfig: true, throwErrors: true } + ).then(function(karmaConfig) { + var server = new karma.Server(karmaConfig, function(exitCode) { + if (exitCode !== 0) { + done(new Error('Karma exited with code ' + exitCode)); + } else { + done(); + } + }); + server.start(); + }).catch(function(err) { + done(err); }); });