koa icon indicating copy to clipboard operation
koa copied to clipboard

Suggestion: consistent package names on NPM

Open njlr opened this issue 5 years ago • 9 comments

One of the off-putting things about Koa vs other solutions is that it isn't clear which NPM packages are maintained by the Koa authors and which are community efforts. I would like to stick to official Koa packages to get some degree of assurance.

It would be great if these packages had a common naming scheme on NPM.

My suggestion would be to follow the @koa/router package:

  • Koa main package koa
  • Router @koa/router
  • Body Parser @koa/bodyparser
  • Static @koa/static
  • etc...

This convention is already used by Babel.

njlr avatar May 12 '20 10:05 njlr

Who has the access required to do this?

njlr avatar Jun 01 '20 10:06 njlr

I can try to look at this once I'm done with other major projects.

niftylettuce avatar Aug 22 '20 20:08 niftylettuce

Out of curisosity, why having the main package outside of the @koa namespace?

import koa from 'koa';
import router from '@koa/router';

Why not having everything within the namespace?

import koa from '@koa/core';   // or '@koa/app'
import router from '@koa/router';

This is what other projects, for example Material UI, and Babel, etc. do.

yanickrochon avatar Aug 24 '20 14:08 yanickrochon

Yes I know. It would be nice. Time is a constraint, as are developers that actually know how to publish and semver release. We're also not funded by Facebook or Google.

niftylettuce avatar Aug 24 '20 14:08 niftylettuce

@niftylettuce I totally agree. But this issue should be tied with the 3.0 roadmap. In that sense, some group should be formed and assignments made with ETAs. There are over 200 contributors to this project, so surely a dozen could spare a few hours and everything could happen by the end of this year.

That sounds reasonable to me.

yanickrochon avatar Aug 24 '20 14:08 yanickrochon

I don't think you can put an ETA on open-source software unless you financially sponsor and routinely follow up. Like I said, I will try to dedicate time in the near future to this. I highly doubt others would have the time.

niftylettuce avatar Aug 24 '20 14:08 niftylettuce

There also has to be an enforced mirroring concept, where koa-something gets mirrored to @koa/something for at least 1 semver major version, then deprecated afterwards. I've been doing this with koa-router and @koa/router since I finally got hold of it on npm after this debacle https://news.ycombinator.com/item?id=19156707.

niftylettuce avatar Aug 24 '20 14:08 niftylettuce

There also has to be an enforced mirroring concept, where koa gets mirrored to @koa/app (or whatever we name it)

I wrote about this in the 3.0 issue, I would really love for Koa npm package to just stay as "koa".

miwnwski avatar Aug 24 '20 14:08 miwnwski

There also has to be an enforced mirroring concept, where koa gets mirrored to @koa/app (or whatever we name it)

I wrote about this in the 3.0 issue, I would really love for Koa npm package to just stay as "koa".

Yeah, we'll definitely stick with just koa I'm sure for the main package. The issue though is that npm still doesn't let you share a package ownership with an organization. I've written to them about this countless times. If anyone else wants to voice their thoughts with npm to add this feature, please email [email protected].

niftylettuce avatar Aug 24 '20 14:08 niftylettuce