[英]Github references reported as outdated by NPM
When referencing a github repository within package.json
like this:当像这样在
package.json
引用 github 存储库时:
"my-package": "https://user:password@github.com/user-name/my-package.git"
Command npm outdated
produces the following:命令
npm outdated
产生以下内容:
Package Current Wanted Latest Location
my-package 1.0.0 git git screener
Is there a way in that reference syntax to specify a version?有没有办法在该参考语法中指定版本? And if not, is there a way to make NPM suppress reporting the package as outdated?
如果没有,有没有办法让 NPM 禁止将包报告为过时?
Tested with Node.js v12.6.0 and NPM v6.9.0使用 Node.js v12.6.0 和 NPM v6.9.0 进行测试
The package.json documentation mentions in the Git URLs as Dependencies package.json 文档在Git URL 中作为依赖项提及
Git urls are of the form:
Git 网址的格式为:
<protocol>://[<user>[:<password>]@]<hostname>[:<port>][:][/]<path>[#<commit-ish> | #semver:<semver>]
<protocol>
is one ofgit
,git+ssh
,git+http
,git+https
, orgit+file
.<protocol>
是git
、git+ssh
、git+http
、git+https
或git+file
。
That could explain the " Wanted git
" part of the error message.这可以解释错误消息的“
Wanted git
”部分。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.