3 ms·
There's a lot to like here - deterministic builds are great. However, yarn doesn't currently seem to support installing straight from github or private packages
by pfooti 10y ago
There's a lot to like here - deterministic builds are great. However, yarn doesn't currently seem to support installing straight from github or private packages [0], [1].
I'm sure this will be added in the future, but it is currently a dealbreaker for me - I'm using a single package that's just straight hosted in a private git repo, as the package itself isn't ready to be published yet. I'm sure other people are using private packages for more normal reasons (closed source, pre-production, etc).
If yarn actually made it simpler to refer to a local package during development, I'd be on board with that. (I am developing the dependency, but want to also work on the thing that depends on it, so I'd rather just save locally and refresh npm on the outer project, but that's hard to get right - file urls don't always update, the easiest workflow seems to be delete the package from node_modules, and npm install, with the package having a git url rather than a version in package.json).
0: https://github.com/yarnpkg/yarn/issues/573 https://github.com/yarnpkg/yarn/issues/573
1: https://github.com/yarnpkg/yarn/issues/521 https://github.com/yarnpkg/yarn/issues/521
- cpojer 10y agoYou are right, we aren't 100% compatible right now. Please track the issues on the Yarn GitHub repo that you linked or better yet: help us fix it. This is a community project and we are excited for the community to jump in and help us out and complete the few missing pieces. I agree local development with many packages can be hard. For Jest we adopted `lerna` See https://github.com/facebook/jest https://github.com/facebook/jest and https://github.com/lerna/lerna https://github.com/lerna/lerna which makes cross-package development in a mono-repo a lot of fun. Maybe that solution will work for you?
- evolve2k 10y agoThis. I came here to say this also. In ruby if you want to patch a repo for yourself you just fork it and make changes and then in bundler point to the git url (often on github). Then run bundle install and you're set. With npm I've been frustrated a few times whereby you can fork the repo and point package.json to the git repo but after running npm I usually get a bunch of compilation errors. It would be wonderful to make this as simple as with bundler within the ruby ecosystem, point to forked url and running yarn handles the rest.
- aarpmcgee 10y agoI'm very excited about this. Private package support is a must-have for it to get any traction in my company. We are more than ready to leave shrinkwrap behind.
- odbol_ 10y agoYeah, this is like the main reason I love npm: ability to use a Github repo as a package repo.