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

package.json repository field #212

Open
joshkel opened this issue Jul 25, 2022 · 7 comments
Open

package.json repository field #212

joshkel opened this issue Jul 25, 2022 · 7 comments
Labels
support Questions, discussions, and general support

Comments

@joshkel
Copy link

joshkel commented Jul 25, 2022

Support plan

  • is this issue currently blocking your project? (yes/no): no
  • is this issue affecting a production system? (yes/no): no

Context

  • node version: 14.19.3
  • module version with issue: 7.0.0
  • last module version without issue: unknown
  • environment (e.g. node, browser, native): Node
  • used with (e.g. hapi application, another framework, standalone, ...): N/A
  • any other relevant information:

What are you trying to achieve or the steps to reproduce?

Vision's package.json's repository field is apparently incorrect. It says git://github.com/hapijs/vision; however, as far as I know, GitHub doesn't support the git:// URL scheme. Instead, it should be https://github.com/hapijs/vision.git.

What was the result you got?

Non-functioning repository

What result did you expect?

Usable repository

@joshkel joshkel added the support Questions, discussions, and general support label Jul 25, 2022
@Nargonath
Copy link
Member

Can you elaborate on how this is impacting your workflow, please?

@joshkel
Copy link
Author

joshkel commented Jul 25, 2022

yarn-plugin-outdated's purpose is to display a list of outdated NPM packages. As part of that, it parses packages' repository field so that it can display a link to information about changed packages.

Since Vision's repository is unusable, this feature of yarn-plugin-outdated doesn't work for it.

@Nargonath
Copy link
Member

Alright, thank you for the details. We'd have to investigate more to know where the problem comes from. I believe git URLs to be valid but I may be wrong, so perhaps that's yarn-plugin-outdated that needs to be updated.

@joshkel
Copy link
Author

joshkel commented Jul 27, 2022

Thanks for the reply.

It's my understanding that the git: protocol is rarely used, and it looks like GitHub removed support for it.

On the other hand, I'm taking a closer look at my node_modules tree now, and there are several git: URLs present. Maybe yarn-plugin-updated should be updated to handle those regardless.

@kanongil
Copy link

It could just be because git clone git://github.com/hapijs/vision fails:

Cloning into 'vision'...

fatal: unable to connect to github.com:
github.com[0: 140.82.121.3]: errno=Operation timed out

In any case it is an incorrect outdated repo link to include in the package.json, and should indeed be updated.

@kanongil
Copy link

kanongil commented Jul 27, 2022

FYI this is an issue across the hapijs ecosystem, and eg. hapi itself has a bad value.

It seems that inert is fine, since I apparently had the prescience to update it 5 years ago: hapijs/inert@dfcd066

@Nargonath
Copy link
Member

We can also have it as:

{
  "repository": {
    "type": "git",
    "url": "https://github.com/hapijs/vision.git"
  }
}

As shown here: https://docs.npmjs.com/cli/v8/configuring-npm/package-json#repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support Questions, discussions, and general support
Projects
None yet
Development

No branches or pull requests

3 participants