Replies: 1 comment 3 replies
-
Hi, @jgarplind. Thanks for bringing this up! MSW has a I agree with PNPM here, and there's an issue open to make this auto-update an explicit choice (#1297). In that proposal, the // my-app/package.json
{
"scripts": {
"postinstall": "npx msw init"
}
} Would this suggestion work for you? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Since pnpm v10, scripts are automatically blocked, as can be read about here: https://github.com/pnpm/pnpm/releases/tag/v10.0.0
It says right in the announcement that the best way to handle this is to explictly allow some packages via pnpm config, so it's not a big problem.
When looking into what
msw
uses , I think it is pretty easily tracked to https://github.com/mswjs/msw/blob/main/config/scripts/postinstall.js and it seems to keep themockServiceWorker.js
script up-to-date.So I just wanted to confirm whether this still is part of msw's base functionality, and thus should be explicitly opted in for pnpm 10 users?
... On a slight tangent, I could go on to say that I'm running msw 2.6.9, but the version mentioned in my
mockServiceWorker.js
file is 1.1.0, so I'm a bit confused as to whether:msw
doesn't update themockServiceWorker.js
that often, ormsw
's assumptions (and has not been since v1.1.0)Grateful for any clarifications to let me and fellow msw-users continue to use it happily with pnpm 10 and beyond, thanks!
Beta Was this translation helpful? Give feedback.
All reactions