npm / policies

Privacy policy, code of conduct, license, and other npm legal stuff
70 stars 78 forks source link

Can NPM be used as a types repository? E.G. TypeScript #112

Closed sancarn closed 5 years ago

sancarn commented 5 years ago

LaunchMenu is an open source application and we are looking for a type registration system whereby types are unique and discoverable.

It dawned on us that we could use NPM packages to store these type data (json files) as separate NPM repositories. However it is unclear whether this is okay as per the acceptable content guidelines.

On the one hand, TypeScript types are often stored in NPM modules. On the other hand, "Packages that are not functionally compatible with the NPM command-line client" might apply to these data.

For example, a "package" cannot simply be a PNG or JPEG image, a movie file, or a text document uploaded directly to the registry.

So the question really is - Is @types organisation violating terms of service or is this a valid use case of NPM?

seldo commented 5 years ago

First off, thanks for asking! It's always good to check when you're in a grey area.

As long as the type registration files you're publishing are contained inside valid npm packages, this use-case doesn't run afoul of our policies. Keeping them all within a scope, the way @types does, would obviously be tidy and community-minded of you.

Keep in mind we also have policies about abusing the registry -- don't post hundreds of thousands of packages, don't publish 10,000 packages at the exact same second, as those things will stress our systems. But as you've noted, @types already does pretty much exactly what you're proposing so unless it starts overloading us we're not likely to object.