0

npm has scopes like @somescope/somepackagename which is nice for avoiding package name collision, does spago has the same?

(maybe is not spago what should have them but package-sets?)

Coding Edgar
  • 1,285
  • 1
  • 8
  • 22
  • 1
    I'm not exactly sure what you're looking for here. NPM "scopes" are just part of the package name, and you're certainly free to name your Spago packages any way you want, including prefixing them with your organization name. – Fyodor Soikin Dec 14 '21 at 02:22

1 Answers1

1

Unique names of packages have traditionally been enforced by the packages being uploaded to bower. Bower doesn't accept new packages anymore. New packages must now register in a specific repository until we have a working registry.

One important property of a scope is that you have to be the owner of an organisation to publish packages under your scope. Meaning, if you know that Google owns @google, all packages starting with @google/ are published by that organisation. In PureScript, while you can prefix your package in any way you want, this does not prevent others from naming them after your organisation.

package-sets has groups. But groups are just files that organise packages of one author in one file. They do not reflect in the package names. I also don't think that this is currently a concern of the working group that is working on the new registry. PureScript is very small as a community and there are not that many packages. The package sets are manually maintained.

There is another level to this. Packages have names, but also modules have names. I have discussed briefly, if I should name a module after another one (e.g. Data.BigInt). People were not a fan even if it would support the same interface as a "drop in replacement". It is considered bad manners or bad practice to use an existing name. So basically people simply try not to name modules after other modules.

Overall it is not perfect, but the ecosystem is so small that it doesn't cause any big problems.

Herku
  • 7,198
  • 27
  • 36
  • 1
    that you so much for your detailed answer, I was indeed asking for name conflicts and decided to reach out to other packages with the same name to ask permission. And also I wanted to be sure if there existed something like ownership before using an established org name – Coding Edgar Jan 24 '22 at 16:37