3 ms·
Wouldn't (shouldn't) npm block same named modules from being uploaded with a different username? Proposal: go with a java based naming system: com.yc.mymodule.
by andy9775 11y ago
Wouldn't (shouldn't) npm block same named modules from being uploaded with a different username?
Proposal: go with a java based naming system: com.yc.mymodule.
All installations would require the user to use com.yc.* in package.json and all users would be required to register as a com.yc style organization name. Thus only one user can remove/add that exact module.
- chrisfosterelli 11y agonpm has namespaces, but they are optional and not hugely adopted as of yet.
- andy9775 11y agoHmm but then is the scope/namespace reserved for each user that reserves/uses it? If I publish @andy9775/left-pad can someone publish under @andy9775/other-module or can only I publish under @andy9775/...? If so, why is no one using this???
- chrisfosterelli 11y agoYes, namespaces are specific to your username. Nobody else can publish packages under your username namespace. I think it's less common because it was released along with private modules and is often conflated with them. Basically all packages are still namespace-less. TBH I never thought about the benefit they'd have until now.