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?
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.
Most helpful comment
It already works without the
semver:portion, simply: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.