You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've got a monorepo with two packages and one is reliant on the other. There is a build step for each one. I have the build step in the prepublishOnly script.
A -> deps []
B -> deps [A]
B needs the build step for A to run first. When running pnpm -r build this isn't an issue, pnpm will run A before B. However when running pnpm -r publish you get inconsistent behavior (for good reason!)
When running pnpm -r publish when both packages need to be published pnpm will publish A before B.
When running pnpm -r publish when only A needs to be published no problem
When running pnpm -r publish when only B needs to be published A wont get built and the build will fail.
I don't blame pnpm for this. But I am looking for suggestions on a better way to set this up.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I've got a monorepo with two packages and one is reliant on the other. There is a build step for each one. I have the build step in the
prepublishOnly
script.B needs the build step for A to run first. When running
pnpm -r build
this isn't an issue, pnpm will run A before B. However when runningpnpm -r publish
you get inconsistent behavior (for good reason!)pnpm -r publish
when both packages need to be published pnpm will publish A before B.pnpm -r publish
when only A needs to be published no problempnpm -r publish
when only B needs to be published A wont get built and the build will fail.I don't blame pnpm for this. But I am looking for suggestions on a better way to set this up.
Example repo
Beta Was this translation helpful? Give feedback.
All reactions