Skip to content
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

Open
markstos opened this issue Nov 15, 2016 · 4 comments
Open

Comments

@markstos
Copy link
Contributor

markstos commented Nov 15, 2016

This concerns the docs for adding dependencies:

https://yarnpkg.com/en/docs/cli/add#toc-adding-dependencies

The docs say:

yarn add installs a package from a remote git repository

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.

@sesam
Copy link

sesam commented Nov 12, 2018

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.

@rally25rs
Copy link
Contributor

IIRC the format is the same as whatever the git clone command would accept.

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.

@sesam
Copy link

sesam commented Jan 7, 2019 via email

@rally25rs
Copy link
Contributor

if PRs are welcome in documenting this

PRs are very welcome 😺

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants