-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Docs for yarn add
should document the URL/git repo formats accepted
#266
Comments
With yarn 1.12.1 (and 1.10.x) I had to change from short form "gitlab:username/reponame" to long form with git+ssh and possibly also with .git in the end (mentioned as possible bug with #tags handling) - this is what worked for me: https://stackoverflow.com/a/53262092/296639 PS. The error messages I got when using the short form with a private repo said nothing, but that touches some other parts of the yarn code I suppose. |
IIRC the format is the same as whatever the npm does a bunch of "we'll try to fix that for you" stuff to make URLs conform to what git will accept. yarn pretty much just passes it down to git. |
I don't concur :). My experience is along what others have reported, that
some formats work, others not, or only if the repo is public. I work around
this by maintaining a shell script in parallell with package.json, and now
when colleges ask update? I say `. update` and that does `yarn add (long
line of private git repos)`
But just `yarn` would've been nicer.
I can dig up the formats that work and didn't work if PRs are welcome in
documenting this
|
PRs are very welcome 😺 |
This concerns the docs for adding dependencies:
https://yarnpkg.com/en/docs/cli/add#toc-adding-dependencies
The docs say:
But should be clarified to document all the different URL formats accepted. For example, there are 'github:' and `git+https://' and other URL formats are useful document as acceptable formats.
Here's the
npm install
docs which references the git URL formats in supports there:https://docs.npmjs.com/cli/install
The Git Remote URL formats supports should also be documented on our
package.json
page:https://yarnpkg.com/en/docs/package-json#toc-dependencies
NPM also provides the details of the Git Remote URLs in its package.json documentation as well:
https://docs.npmjs.com/files/package.json#dependencies
In addition to Git URLs, "file:" URLs are also accepted as dependencies, but not documented.
The text was updated successfully, but these errors were encountered: