Repository navigation
fix(mocker): support both MSW v2 and v3 - #11412
EskiMojo14 wants to merge 1 commit into
Conversation
✅ Deploy Preview for vitest-dev ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
hmm, even with the vite-ignore, vite is trying to eagerly resolve the import and failing 🤔 i assume a breaking change to only support v3 would be undesirable? |
|
Tried this branch (35f0718) downstream:
|
|
test failures are now unrelated, and appear on main as well (introduced by #11417) related tests and typechecking are passing |
|
Fixed in #11482 |
|
Which release of vitest will have this change? |
Description
MSW v3 renames the
msw/core/httpentry point tomsw/http, which is used by@vitest/mocker. This PR takes the more conservative approach of allowing both v2 and v3 (usingPromise.anyon the dynamic imports and adjusting the peer dependency), meaning that this shouldn't be a breaking change.Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
pnpm-lock.yamlunless you introduce a new test example.Tests
pnpm test:ci.Documentation
pnpm run docscommand.Changesets
feat:,fix:,perf:,docs:, orchore:.