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
Add a public API for installation and linking #125
Comments
ah, neat! I don't think making a separate |
@patrickheeney looks good, only thing I would add is that it would be nice if it exposed an EventEmitter to track progress rather than logging to console. Perhaps even better might be a generator but that could be more difficult to implement. |
No breaking changes. An additional function exposed for package dependencies installation. close #125
No breaking changes. An additional function exposed for package dependencies installation. close #125
@zkochan: Finally got around to using this API. Works nicely! Only thing that is missing (IMO) is to return the installed package's info. So, for example, I could find out which version was actually installed. |
Shouldn't be hard to do it. Here that info is being written to the store.json. So we can get it from |
I am using pnpm as part of a mono repo and I need to install a subset of the package.json files. Something like
pnpm install -f package.local.json
. Since files are not supported, I looked at integration within my own CLI tool. These are the problems I ran into:On the surface, this looks pretty good, but it unfortunately uses the
package.json
from the current directory of my CLI tool as root, so it installs them in the wrong location.This did the trick, but as you can see its pretty verbose and reaches quite a bit into the
pnpm
internals. It would be nice to have a public API that could do something like this:The implementation would look like my last snippet above. Let me know if you would accept a pull request for this?
EDIT: Also wanted to point out that
installPeers
acceptspkg
as a first argument, but it does not use it in the function.The text was updated successfully, but these errors were encountered: