Skip to content

Commit

Permalink
Add yarn patch for msw for Node v18 native fetch compatibility
Browse files Browse the repository at this point in the history
- Basically, `msw` can mostly work with node-native `fetch` powered
by undici, but it does not currently create its lone export `createServer`
with the `FetchInterceptor` that is necessary to intercept `globalFetch`
- Clone the library locally, fix this issue, build it locally, and copy the build
files into this Yarn patch

Upstream, I've started the chain of PRs necessary to fix this:

- mswjs/interceptors#283 (migrate to Node 18)
- milesforks/msw-interceptors#5 (wip, add native fetch tests)
- Last: one line change to msw that I made in our patch here
  • Loading branch information
milesrichardson committed Aug 31, 2022
1 parent e97712e commit 45b391f
Show file tree
Hide file tree
Showing 3 changed files with 1,108 additions and 1 deletion.
Loading

0 comments on commit 45b391f

Please sign in to comment.