-
-
Notifications
You must be signed in to change notification settings - Fork 952
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: add graph command #3302
base: main
Are you sure you want to change the base?
feat: add graph command #3302
Conversation
ebb5182
to
498b761
Compare
Need to add some tests still |
It is intended to be used with https://en.wikipedia.org/wiki/DOT_(graph_description_language). |
34bfd4b
to
ce7728a
Compare
Of note is that this currently only graphs the packages in the workspace, and so does not contain nodes for packages outside the workspace. |
Seems like a useful feature but could we, for now, publish it as a separate CLI? Currently, I try to keep the pnpm CLI small, as it needs to be fast. For now, I would recommend publishing it as a separate package and in the future maybe we could make pnpm pluggable with a library of "official plugins". Here are 2 examples of separate CLIs that are currently in this repository: |
I can reimplement based on whatever is decided, but I think this makes more sense as a pnpm command rather than a standalone CLI, given the following:
|
What do others think? cc @pnpm/collaborators If we merge it, I would definitely add to the description, that this is an experimental command. In long term, we'll probably need to add some lazy loading for the packages that are not related to installation. And maybe some API for plugins. |
I would also like this to be a separate package. Not only to keep the CLI small, but also to keep the dependencies at a lower number from a security perspective. A good rule of thumb for me is that anything that is outside of the scope of what is necessary to run a package manager should be separate. The user should explicitly opt-in. |
It really does feel like a niche feature, and it also kind of bound to the dot format. I also think this is not a strictly PNPM cli feature, but maybe a utility |
dot is pretty flexible and has SVG output so just basic support for this would rock. |
This is a very cool utility but I agree that it doesn’t make sense as part of the core CLI of pnpm. I’d love to see it as part of the potential library of official plugins @zkochan mentioned, because that would make it discoverable, and clearly indicate that it builds on pnpm’s features, without unnecessarily increasing the surface area of pnpm itself. Now, I could see including it in pnpm as an experimental command if said library of plugins were only a concept to mull over for the distant future, so that the idea doesn’t wither and die in the mean time. As long as it were clearly marked, moving it to a plugin later would be perfectly reasonable. However, doing so would also shift the responsibility for maintaining it to the pnpm repository itself, which I’m not sure is logical. |
Agree with the fashion of being a separate package. IMHO, we need guide people how to implement feature as a pnpm plugin. It‘s a important step to build pnpm ecosystem. |
I'm curious if updating Not sure what the exact command would be, but I bet some variation of of |
No description provided.