Skip to content

Begin update to MSW 2.x - #1114

Draft
tarrow wants to merge 6 commits into
mainfrom
T407364.21
Draft

Begin update to MSW 2.x#1114
tarrow wants to merge 6 commits into
mainfrom
T407364.21

Conversation

@tarrow

@tarrow tarrow commented Mar 27, 2026

Copy link
Copy Markdown
Contributor

This patch starts the migration from the broken 1.x MSW configuration to a 2.x one.

It vendors in a new public/mockServiceWorker.js.

It adjusts our browser mocks to use the new msw/browser .

It creates a new default_handlers file to start migrating worker response resolvers to and stops reading
from the existing, old format handlers.

In the new handlers it moves over just login functionality and leaves the remaining handler migration (including logout) to future work.

Bug: T407364
co-authored-by: Ollie
co-authored-by: Rosalie

@github-actions

Copy link
Copy Markdown

Deployment previews on netlify for branch refs/pull/1114/merge will be at the following locations (when build is done):

Collaborative attempt in Amsterdam

Bug: T407364
@tarrow tarrow changed the title Try again to fix MSW Begin update to MSW 2.x Aug 28, 2026
deer-wmde added a commit that referenced this pull request Aug 28, 2026
Basic preparations for reimplementation of mock service handlers.

Related (basically the same work as):
#1114

- **ran 'npx msw init public --save'**
- **start mock service with no handlers**
- old handlers kept for now as reference in `old.default_handlers.js`
- commented import line left as a hint for starting with
implementations; commented to make linter happy

https://phabricator.wikimedia.org/T436358
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant