-
Notifications
You must be signed in to change notification settings - Fork 231
Add support for package scopes #1821
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
Comments
@munificent and I talked about this long ago when we were first designing the package repository, but we ended up deciding (and I think this still holds) that there's very little value in having explicit scopes/namespaces that you don't get from just adding a prefix to the package name. |
Aside from namespacing to avoid package name collisions, I think there's another use case for team/company permission management as well. It's a lot more convenient for larger companies to manage permissions for a scope than it is to manage permissions for potentially hundreds of packages individually. For example, the company I work for has a single npm scope that we publish our packages to. It used to be a pain to manage those permissions for our various packages, but now it's substantially easier. |
That seems like something that could be done without adding complexity to package names—for example, by allowing packages to be explicitly associated with a team or project. |
For sure, but with the scope concept you get the benefits of namespacing and easier permission management from one new functional concept. I can open a separate issue for team package management if you'd like. |
That would be good; it should go in https://github.com/dart-lang/pub-dartlang-dart, since it's mostly a server-side feature. |
Scopes in NPM also aid in preventing accidental publishing of a package unless you own that specific scope. Second scopes in NPM allow group permissions which apply to many packages which are provided under that scope. Thus as an open source dev you can have a team of trusted devs which can publish the package. |
It'd be great if pub supported package scopes similar to npm. This is very useful for grouping packages from the same main project together. For example, all of the flutter packages could be published under one or more flutter scopes. This is also useful for when developers want to give a package a name that's already been taken (i.e. json_serializer which is a super generic name).
The text was updated successfully, but these errors were encountered: