-
Notifications
You must be signed in to change notification settings - Fork 4
chore(STRINGS-2449): upgrade karma to 6.4.4 #60
chore(STRINGS-2449): upgrade karma to 6.4.4 #60
Conversation
| range-parser "^1.2.1" | ||
| rimraf "^3.0.2" | ||
| socket.io "^2.3.0" | ||
| socket.io "^4.7.2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
beac380 to
b9f6ef3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Upgrades Karma to 6.4.4 to resolve a Socket.IO parser security issue, adds a dedicated CI test script, and refactors the Karma configuration for headless and CI environments.
- Bump Karma to version 6.4.4 and add
@types/node - Introduce
test:ciscript and update GitHub Actions to use it - Refactor
karma.conf.jsfor headless browsers, middleware stats, and CI flag handling
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| package.json | Updated test scripts, bumped karma, and added @types/node |
| karma.conf.js | Switched to headless browsers, added webpackMiddleware, and CI flag logic |
| .github/workflows/main.yml | Switched CI job to npm run test:ci |
Comments suppressed due to low confidence (1)
package.json:10
- The default
npm testscript now omits--single-run, causing Karma to stay in watch mode and never exit. Consider restoring--single-runhere or documenting its behavior change to avoid hanging processes.
"test": "npm run lint && karma start",
package.json
Outdated
| "@types/angular-mocks": "^1.7.0", | ||
| "@types/angular-translate": "^2.16.2", | ||
| "@types/jasmine": "^3.5.11", | ||
| "@types/node": "14.14.10", |
Copilot
AI
Jun 6, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Dev dependencies are no longer sorted alphabetically; sorting them helps maintain readability and makes diffs clearer when new entries are added.
.github/workflows/main.yml
Outdated
| export DISPLAY=:99.0 | ||
| xvfb-run --auto-servernum npm test -- --configuration=ci | ||
| xvfb-run --auto-servernum npm run test:ci |
Copilot
AI
Jun 6, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Since ChromeHeadless and FirefoxHeadless do not require an X server, you may be able to remove xvfb-run and the DISPLAY export to simplify the CI job and speed up test startup.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Purpose
socket-io.Vulnerability
https://github.com/phrase/angular-phrase/security/dependabot/33
https://github.com/phrase/angular-phrase/security/dependabot/22
Ticket
https://phrase.atlassian.net/browse/STRINGS-2449