AI & Tech··1 sources verified
Mock Service Worker 3.0 Drops CommonJS, Adds TCP-Level Node.js Interception and GraphQL Subscriptions
Summarised by Relevant News AI · Read time: 3 min
Mock Service Worker 3.0 ships as an ESM-only build that requires Node.js 22 or later, cutting package size 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. Some users report test failures from newly intercepted OPTIONS preflight requests.
Why it matters: Teams using MSW in Node.js test suites need to check their Node version and module format before upgrading, and should expect CORS preflight mocks to need updating.
All sources