Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support multiple directories in "msw.workerDirectory" #1832

Merged
merged 5 commits into from
Jan 15, 2024

Conversation

kettanaito
Copy link
Member

@kettanaito kettanaito commented Nov 3, 2023

Changes

  • Running msw init without any directory will copy the worker script to all directories stored at msw.workerDirectory in your package.json.
  • Running msw init with an explicit directory path will only copy the worker script to that path. It will save/not save the path in msw.workerDirectory based on the --save/--no-save flags respectively.
  • Internal: refactors the init command to support reading and saving multiple worker script directories.
  • Internal: refactors the postinstall script to support automatically copying the worker script to multiple directories.

Roadmap

  • Fix the test/node/msw-api/auto-update-worker.node.test.ts tests.

@kettanaito kettanaito force-pushed the feat/multiple-worker-directory branch from 6d69129 to 386749d Compare November 3, 2023 14:35
@kettanaito kettanaito force-pushed the feat/multiple-worker-directory branch from 386749d to e6d4493 Compare November 3, 2023 14:35
@kettanaito kettanaito marked this pull request as draft November 3, 2023 14:37
@kettanaito kettanaito marked this pull request as ready for review November 3, 2023 15:18
@kettanaito kettanaito merged commit 4dbf99a into main Jan 15, 2024
10 of 11 checks passed
@kettanaito kettanaito deleted the feat/multiple-worker-directory branch January 15, 2024 10:25
@kettanaito
Copy link
Member Author

Released: v2.1.0 🎉

This has been released in v2.1.0!

Make sure to always update to the latest version (npm i msw@latest) to get the newest features and bug fixes.


Predictable release automation by @ossjs/release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for multiple worker directories
1 participant