mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-08-20 22:23:02 +03:00
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:
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user