koajs / koa

Expressive middleware for node.js using ES2017 async functions
https://koajs.com
MIT License
35.12k stars 3.23k forks source link

Suggestion: consistent package names on NPM #1458

Closed njlr closed 2 weeks ago

njlr commented 4 years ago

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:

This convention is already used by Babel.

njlr commented 4 years ago

Who has the access required to do this?

niftylettuce commented 4 years ago

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

yanickrochon commented 4 years ago

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.

niftylettuce commented 4 years ago

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.

yanickrochon commented 4 years ago

@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.

niftylettuce commented 4 years ago

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 commented 4 years ago

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.

miwnwski commented 4 years ago

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".

niftylettuce commented 4 years ago

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 support@npmjs.com.

jonathanong commented 2 weeks ago

we're slowly moving modules into the koa org with @koa/ (though koa itself will remain). LMK if you want to move a module into the org