Replies: 1 comment
|
I know this has been opened quite a while ago (I'm running pnpm 11.13.0), but I ran into a similar thing today. In my case, I wanted to set Note: I think it's quite possible that pnpm did this differently when this was opened. The rest of this comment is mostly documentation of my findings if anyone else stubles upon this. I think pnpm runs the way you want it to by default. Publish gets run sequentially because of how the npm CLI asks for OTPs. This confuses me somewhat because I thought pnpm hasn't called the npm CLI since version 11. Maybe it's an assumption the npm registry makes about the client which pnpm then also has to fulfill. Either way, I believe recursive publishing always acts as if workspace-concurrency was set to 1. There's a loop over individual packages that awaits a Like the comment says though, even if the OTP issue is resolved, pnpm will probably still at least limit publishing concurrency because historically, not limiting it has lead to crashes. I think the "idiomatic" way to do publishing of many packages at once now is the |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi everyone!
I updated pnpm from v7 to v8 today in a project and my publishing stopped working. I use
pnpm -r publishto do that for all projects inside of my workspace.I noticed that one step performed in every project by
vite-plugin-dts(rollup of types) has problems, if multiple of those run concurrently, therefore I looked for a way to run the packing/publishing sequantially (again? I think it was like that in v7.26.3. This would at least explain why it worked before).In other occasions I used the
--workspace-concurrencyoption to achieve that, but this doesn't work. Neither with -r, nor with recursive:Therefore I worked around that by introducing a "publish-script"-Skript into every package.json:
Now I can run
pnpm -r --workspace-concurrency=1 run publish-script.But this looks rather unelegant to me and is some overhead for every package.json.
Does someone now a better way to achieve the same result?
Thanks!
All reactions