Skip to content

feat!: v3.0.0 - #2692

Draft
kettanaito wants to merge 58 commits into
mainfrom
feat/3.0
Draft

feat!: v3.0.0#2692
kettanaito wants to merge 58 commits into
mainfrom
feat/3.0

Conversation

@kettanaito

@kettanaito kettanaito commented Apr 6, 2026

Copy link
Copy Markdown
Member

BREAKING CHANGES

Features

Bug fixes


Roadmap

  • Migrate to ESM-only.
  • msw/ws
  • msw/http
  • Decide on the root vs explicit export paths import experience. msw/graphql is the only way to consume GraphQL due to optional peer dependency on graphql.
  • Consider renaming msw/native to msw/react-native OR consider @msw/react-native altogether to have necessary polyfills, full RN app tests, etc.
  • Support Node.js v26.
  • Revise defineNetwork and move it out from /experimental.
  • Migrate to pnpm@11.
  • Support TypeScript up to 7.0 (investigate if 7.0 can be supported, too).
  • Consider dropping statuses. That's the only CJS dependency requiring a shim.
  • Update graphql version (d9f389d).
  • Remove the postinstall hook in favor of explicit msw init (Make worker autoupdate an explicit choice #1297, Issue: postinstall breaks during ci installation #2704).
  • Remove cookie management in Node.js (Stop managing cookies in node.js #2550).
  • Upgrade cookie package since it now ships ESM (drop the shim).
  • Migrate to undici@latest now that node@20 is dropped.
  • Remove graphql.* methods. Make GraphQL mocking link-first: graphql.link().
  • Delete src/core/utils/handleRequest.ts, it's no longer used by anything.
  • Reconsider life-cycle events. Things like GraphQL subscriptions or SMTP cannot have events. Are events even needed?
  • Refactor WebSocket events. connection -> websocket:connection. Ensure the WebSocket connection life cycle is sufficiently represented with events.
  • Consider lazy interceptors, if feasible.
  • Migrate to the new Interceptors architecture (feat: adopt the new interceptors architecture #2767).
  • Drop deferred-promise in favor of Promise.withResolvers().
  • Remove fallback /node, /native directories.
  • Rename all modules to kebab-case.
  • Adopt multi-project Vitest setup. Use VBM for most browser tests. Use Playwright only for multi-page/otherwise impossible tests in VBM.
  • Drop webpack and its dependencies.
  • Add http.connect(), http.query(), and any other methods we can now intercept. They wont do anything in the browser, let them be. Add Node.js tests.

Todos

  • Document the changes.
  • Write the migration guidelines.
  • Stress-test the features.

@kettanaito kettanaito added the BREAKING CHANGE Pull request introducing breaking changes. label Apr 6, 2026
@coderabbitai

coderabbitai Bot commented Apr 6, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9f8510bb-2903-4e1a-8b25-69ce3d84d9d4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/3.0

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Apr 6, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/msw@2692

commit: 2a80603

@socket-security

socket-security Bot commented May 12, 2026

Copy link
Copy Markdown

All alerts resolved. Learn more about Socket for GitHub.

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report

@dsonet

dsonet commented May 15, 2026

Copy link
Copy Markdown

Hey @kettanaito, thanks a lot for your great work!

Is it possible to include this feature? Here’s the link: #2357
It would be nice if it could cross the finish line.

@kettanaito

Copy link
Copy Markdown
Member Author

@dsonet GraphQL subscriptions will likely make it either to 3.0 or even to 2.0. They aren't as tedious to implement with the new architecture now. I've introduced the concept of handlers merging in the recent changes to 2.0 and that was the missing piece for the subscriptions.

As always, if your company needs that support in MSW, please consider becoming a sponsor! Thank you.

@kettanaito kettanaito mentioned this pull request Jul 23, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BREAKING CHANGE Pull request introducing breaking changes.

Projects

None yet

3 participants