{"action":"created","issue":{"url":"https://api.github.com/repos/koajs/koa/issues/530","labels_url":"https://api.github.com/repos/koajs/koa/issues/530/labels{/name}","comments_url":"https://api.github.com/repos/koajs/koa/issues/530/comments","events_url":"https://api.github.com/repos/koajs/koa/issues/530/events","html_url":"https://github.com/koajs/koa/pull/530","id":111300086,"number":530,"title":"async (ctx, next) => await next()","user":{"login":"jonathanong","id":643505,"avatar_url":"https://avatars.githubusercontent.com/u/643505?v=3","gravatar_id":"","url":"https://api.github.com/users/jonathanong","html_url":"https://github.com/jonathanong","followers_url":"https://api.github.com/users/jonathanong/followers","following_url":"https://api.github.com/users/jonathanong/following{/other_user}","gists_url":"https://api.github.com/users/jonathanong/gists{/gist_id}","starred_url":"https://api.github.com/users/jonathanong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonathanong/subscriptions","organizations_url":"https://api.github.com/users/jonathanong/orgs","repos_url":"https://api.github.com/users/jonathanong/repos","events_url":"https://api.github.com/users/jonathanong/events{/privacy}","received_events_url":"https://api.github.com/users/jonathanong/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":34,"created_at":"2015-10-14T00:45:26Z","updated_at":"2015-10-16T08:49:53Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/koajs/koa/pulls/530","html_url":"https://github.com/koajs/koa/pull/530","diff_url":"https://github.com/koajs/koa/pull/530.diff","patch_url":"https://github.com/koajs/koa/pull/530.patch"},"body":"closes https://github.com/koajs/koa/pull/530\r\n\r\nplease test this. if you guys wanna benchmark this, that would be helpful too!\r\n\r\n- [ ] update docs\r\n- [ ] add end-to-end testing w/ babel\r\n- [ ] publish and set `koa-compose` version\r\n- [ ] add a warning to `koa@1` about the middleware signature change"},"comment":{"url":"https://api.github.com/repos/koajs/koa/issues/comments/148657626","html_url":"https://github.com/koajs/koa/pull/530#issuecomment-148657626","issue_url":"https://api.github.com/repos/koajs/koa/issues/530","id":148657626,"user":{"login":"felixfbecker","id":10532611,"avatar_url":"https://avatars.githubusercontent.com/u/10532611?v=3","gravatar_id":"","url":"https://api.github.com/users/felixfbecker","html_url":"https://github.com/felixfbecker","followers_url":"https://api.github.com/users/felixfbecker/followers","following_url":"https://api.github.com/users/felixfbecker/following{/other_user}","gists_url":"https://api.github.com/users/felixfbecker/gists{/gist_id}","starred_url":"https://api.github.com/users/felixfbecker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felixfbecker/subscriptions","organizations_url":"https://api.github.com/users/felixfbecker/orgs","repos_url":"https://api.github.com/users/felixfbecker/repos","events_url":"https://api.github.com/users/felixfbecker/events{/privacy}","received_events_url":"https://api.github.com/users/felixfbecker/received_events","type":"User","site_admin":false},"created_at":"2015-10-16T08:49:53Z","updated_at":"2015-10-16T08:49:53Z","body":"+1 for koa-convert. We could also name it koa-legacy.\r\nFor deprecation warnings, consider this: The new koa works with promise-returning functions. Therefore, we can show a deprecation warning everytime it is called with a generator function, which most of the middleware will be. Also, we can show a deprecation warning if a function does not return a promise (an async function always returns a promise, even if it doesn't await next). This will work with babel-transpiled generators. The warning could look like \"Generator functions are deprecated in favor of promises/async functions. Use koa-convert to convert legacy middleware.\""}}