Release
Mock Service Worker Releases v3.0 with ESM-Only Build, Socket-Based Interception and GraphQL Subs
InfoQ · By Daniel Curtis ·
The Brief
- Mock Service Worker 3.0 is ESM-only and requires Node.js 22 or later.
- The package size drops from 416KB to 234KB.
- The release adds GraphQL subscription support, protocol-specific entrypoints, and an experimental defineNetwork API, and Node.js interception now works at the TCP and TLS level.
Why it matters
The ESM-only build and Node.js 22 requirement can break projects that use CommonJS or run older Node.js versions, so upgrades need checking before rollout.
Who’s affected
- Teams using Mock Service Worker
- Projects running Node.js versions below 22
What to do
- Confirm your project runs on Node.js 22 or later and loads the ESM-only package before upgrading to 3.0
Mock Service Worker 3.0 is now ESM-only, requires Node.js 22 or later, and cuts package size from 416KB to 234KB. It adds GraphQL subscription support, protocol-specific entrypoints, and an experimental defineNetwork API. Node.js interception now works at the TCP and TLS level…