Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm's koa-kwt@latest is v2 branch #80

Closed
sdd opened this issue Jan 27, 2017 · 1 comment
Closed

npm's koa-kwt@latest is v2 branch #80

sdd opened this issue Jan 27, 2017 · 1 comment

Comments

@sdd
Copy link
Collaborator

sdd commented Jan 27, 2017

I've just been reading Koa's v2 roadmap, and spotted this:

All of the current stable versions of middleware should be targeting koa v1. If it doesn't, let us know and we'll fix it.

Middleware may have an "alpha" version of the koa v2 version. These should NOT be marked as stable. If they do not exist, let us know and we'll create an alpha version so you can try it with koa v2. Better yet, make a PR!

Unfortunately my recent npm publish of v2 had dist-tag latest, so if someone starts a new empty project and runs npm install koa koa-jwt, they will end up with koa v1.2.4 and koa-jwt v2.2.1 😢 Consider this minimal example script in that environment:

const koa = require('koa');
const jwt = require('koa-jwt');

const app = koa();
app.use(jwt({ secret: 'shhh' }));
app.listen(3000);

This dies with AssertionError: app.use() requires a generator function. Sorry if anyone has been affected, it's my fault. I'll republish the 1.x branch ASAP with the latest tag to correct this.

For the v2 branch we should probably do what Koa does. This means that an npm publish on v2 will have the right tag automatically.

@sdd
Copy link
Collaborator Author

sdd commented Jan 29, 2017

Resolved.

@sdd sdd closed this as completed Jan 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant