This is a new feature of NPM called 'scoped packages', which effectively allow NPM packages to be namespaced.(这是NPM的一项新功能,称为“作用域软件包”,可有效地使NPM软件包具有名称空间。)
Every user and organization on NPM has their own scope, and they are the only people can add packages to it.(NPM上的每个用户和组织都有自己的范围,并且是唯一可以向其中添加软件包的人员。)
This is useful for several reasons:(这很有用,原因如下:)
It allows organizations to make it clear which packages are 'official' and which ones are not.(它使组织可以明确哪些软件包是“官方”软件包,哪些不是。)
For example, if a package has the scope @angular
, you know it was published by the Angular core team.(例如,如果包的作用域为@angular
,则您知道它是由Angular核心团队发布的。)
The package name only has to be unique to the scope it is published in, not the entire registry.(程序包名称仅对于发布的范围是唯一的,而不是整个注册表。)
For example, the package name http
is already taken in the main repository, but Angular is able to have @angular/http
as well.(例如,包名称http
已在主存储库中使用,但是Angular也可以具有@angular/http
。)
The reason that scoped packages don't show up in public search is because a lot of them are private packages created by organizations using NPM's paid services, and they're not comfortable opening the search up until they can be totally certain they're not going to make anything public that shouldn't be public - from a legal perspective, this is pretty understandable.(范围内的软件包未显示在公共搜索中的原因是,其中许多是由使用NPM付费服务的组织创建的私有软件包,并且他们不满意打开搜索,直到可以完全确定它们不是将会公开任何不应该公开的东西-从法律的角度来看,这是可以理解的。)
For more information, see the NPM docs and the Angular docs .(有关更多信息,请参阅NPM文档和Angular文档 。)
EDIT: It appears that public scoped packages now show up properly in search!(编辑:似乎公共范围的软件包现在可以正确显示在搜索中!) 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…