fix(frontend): keep the MSW worker in step with the lockfile (#6222)

The tracked frontend/public/mockServiceWorker.js is generated by msw and pinned
at 2.14.7, while package-lock.json installs 2.15.0. msw rewrites the worker on
postinstall, so npm ci leaves the tree dirty on a clean checkout and every
contributor either commits an unrelated 30-line diff or discards it.

Regenerate the worker for the locked version and add a check that compares it
against the installed runtime, wired into make verify and CI so the pair cannot
drift again.
This commit is contained in:
n0ctal
2026-08-18 16:44:55 +05:00
committed by GitHub
parent 5c7ca5b579
commit f75ea08ab4
2 changed files with 8 additions and 1 deletions
+3
View File
@@ -182,6 +182,9 @@ jobs:
- name: Install
run: npm ci
working-directory: frontend
- name: Verify generated MSW worker is current
run: git diff --exit-code -- public/mockServiceWorker.js package-lock.json
working-directory: frontend
- name: Lint
run: npm run lint
working-directory: frontend