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

🐛 Bug: Add support for GitHub URLs in dependencies #25

Open
DjDCH opened this issue Apr 1, 2014 · 3 comments
Open

🐛 Bug: Add support for GitHub URLs in dependencies #25

DjDCH opened this issue Apr 1, 2014 · 3 comments
Labels
status: accepting prs Please, send a pull request to resolve this! 🙏 type: bug Something isn't working :( 🐛

Comments

@DjDCH
Copy link

DjDCH commented Apr 1, 2014

I'm currently trying to get my package.json valided before submiting a new package. However, the validation is faling since I'm trying to use GitHub URLs in my dependencies.

From the npm docs:

As of version 1.1.65, you can refer to GitHub urls as just "foo": "user/foo-project".

However, if I use the following de

"dependencies": {
  "foo": "user/foo-project"
}

package.json-validator tell me that my package.json is not valid:

package.json is NOT valid
{ valid: false,
  errors: [ 'Invalid version range for dependency foo: user/foo-project' ] }
@lukebatchelor
Copy link

The commit to fix this looks like it's been open for a while, we are currently working around it by adding the git://github.com/ prefix which works for some reason.

Documented here
https://docs.npmjs.com/files/package.json#urls-as-dependencies

@piranna
Copy link

piranna commented Jul 29, 2023

Any update on this? I'm facing the same issue.

@JoshuaKGoldberg JoshuaKGoldberg changed the title Add support for GitHub URLs in Dependencies 🐛 Bug: Add support for GitHub URLs in dependencies Mar 28, 2024
@JoshuaKGoldberg
Copy link
Owner

Per https://docs.npmjs.com/cli/v10/configuring-npm/package-json#github-urls, shorthand GitHub URLs -with or without branch/commit/etc. specifiers- should be supported. It's a bug that they're not. Accepting PRs!

@JoshuaKGoldberg JoshuaKGoldberg added type: bug Something isn't working :( 🐛 status: accepting prs Please, send a pull request to resolve this! 🙏 labels Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: accepting prs Please, send a pull request to resolve this! 🙏 type: bug Something isn't working :( 🐛
Projects
None yet
Development

No branches or pull requests

4 participants