Yarn: Support semver syntax for git urls

Created on 27 Dec 2017  路  2Comments  路  Source: yarnpkg/yarn

With v5.0.0 release NPM supports semver range when using git urls: https://docs.npmjs.com/files/package.json#git-urls-as-dependencies

Short example:

git+ssh://[email protected]:npm/npm#semver:^5.0

In NPM this feature was discussed here

Are there any chance to implement this in yarn?

cat-compatibility help wanted triaged

Most helpful comment

It already works without the semver: portion, simply:

git+ssh://[email protected]:npm/npm#^5.0

However we should probably support that semver: keyword for NPM compatibility. Honestly, I never even knew that was a thing that NPM supported until a week or 2 ago.

All 2 comments

It already works without the semver: portion, simply:

git+ssh://[email protected]:npm/npm#^5.0

However we should probably support that semver: keyword for NPM compatibility. Honestly, I never even knew that was a thing that NPM supported until a week or 2 ago.

I've fixed a few bugs related to GitHub package patterns recently so I can take a look at this.

Was this page helpful?
0 / 5 - 0 ratings