[Question] How does the topological pnpm run
strategy work
#5204
Replies: 4 comments 8 replies
-
Yes, it should run the scripts in topological order, unless you use the --no-sort option. Are your local deps added using the workspace protocol?
I guess it should work. If it doesn't work, it is probably a bug. |
Beta Was this translation helpful? Give feedback.
-
not yet. my dependencies are just using package name and version as normal, not |
Beta Was this translation helpful? Give feedback.
-
is the workspace protocol required for topological ordering? |
Beta Was this translation helpful? Give feedback.
-
Could we have a little documentation on how the "topological" algorithm works? It would be nice to read something that confirms I understand it correctly.
Using the documentation's search for "topological" I do see references to it in terms of "use this flag to turn it off if you want" which is a bit of an understanding-by-deduction exercise. Thanks very much ✨. Really great work on |
Beta Was this translation helpful? Give feedback.
-
I have a monorepo that I’m testing switching to pnpm, and my packages have several cross-pkg dependencies.
For example,
package/a
depends oncore
and package/a won’t build correctly unless core has been built first.I’ve tried to run
pnpm -r build
with the understanding that pnpm will look at the dependencies of a package and run the same script on dependencies first. In my example, this would mean that core’s build script gets run first then thebuild
script forpackage/a
.But i don’t see this happening, and the topological order of script runs isn’t very well documented.
Another related question is about symlinking those same dependencies. when i run
pnpm i
at the root and i’m usinglinkDirectory:true
to symlinking each of my packagesdist
folders, it seems that pnpm won’t create the symlink unless the folder exists. Is there an option to create the symlink anyway since the dist folder will exist later?Beta Was this translation helpful? Give feedback.
All reactions