npm 包的可见性取决于包所在的范围(命名空间),以及为包设置的访问级别(私有或公共)。
🌐 Visibility of npm packages depends on the scope (namespace) in which the package is contained, and the access level (private or public) set for the package.
注意: 要创建组织范围的软件包,你必须先创建一个组织。有关详细信息,请参阅“创建组织”。
🌐 npm Package Access Matrix
| Scope | Access level | Can view and download | Can write (publish) |
|---|---|---|---|
| Org | Private | Members of a team in the organization with read access to the package | Members of a team in the organization with read and write access to the package |
| Org | Public | Everyone | Members of a team in the organization with read and write access to the package |
| User | Private | The package owner and users who have been granted read access to the package | The package owner and users who have been granted read and write access to the package |
| User | Public | Everyone | The package owner and users who have been granted read and write access to the package |
| Unscoped | Public | Everyone | The package owner and users who have been granted read and write access to the package |
注意: 只有用户账户可以创建和管理无范围的包。组织只能管理有范围的包。