vision
vision copied to clipboard
`package.json` repository field
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
Can you elaborate on how this is impacting your workflow, please?
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.
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.
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.
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.
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: https://github.com/hapijs/inert/commit/dfcd06685a8c095655625aeb17f10431c1919058
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.