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

Koa must be called with new in koa 2.0.0 #62

Closed
wants to merge 1 commit into from

Conversation

josephfinlayson
Copy link

this also works with koa 1

this also works with koa 1
@d4goxn
Copy link

d4goxn commented Aug 30, 2016

Looks like Travis is just complaining about code style - if you rename koa to Koa when requiring it, that should please Travis.

var Koa = require('koa')

in https://github.com/josephfinlayson/grant/blob/b3a3cb98f6a62bb5e03b0a58242d4cab043ebc68/lib/consumer/koa.js, and maybe in other places too.

@simov
Copy link
Owner

simov commented Aug 30, 2016

Thanks for letting me know. I pushed the complete fix here 7a7e10c (including the tests).

This works for both Koa1.x and Koa2.x. For Koa2.x you have to update the koa-mount module to v2.x as well.

It looks like this fix isn't going to work for Koa3 due to the use of generators in Grant, but we'll figure that out when it happens :)

@simov simov closed this Aug 30, 2016
@simov
Copy link
Owner

simov commented Aug 30, 2016

Version 3.6.4 with the fix is published.

@simov simov mentioned this pull request Dec 3, 2016
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

Successfully merging this pull request may close these issues.

None yet

3 participants