koa depreciated support for generators
rogueturnip opened this issue · comments
Started trying to get this to work and had this warning appear
koa deprecated Support for generators will be removed in v3. See the documentation for examples of how to convert old middleware https://github.com/koajs/koa/blob/master/docs/migration.md src/index.js:54:9
@rogueturnip the project currently uses babel for backward compatibility with node 4 and being able to use ES6 JS syntax. Babel transforms async/await
to generators, that's how it works with older versions of node.
I could create an @next tag on npm that works only with Node 7+ (just like Koa), and drop generators transformation, will that solve any specific issues you may be facing?
That would be a perfect solution. I didn't realize that was what being done by babel.
@rogueturnip done, there is now a next
branch and a next
tag on npm
:
npm install agenda-rest@next
you'd need node 7.6+ for this version.
Please feel free to re-open if you faced any further issues.
UPDATE
The current babel setup uses the "env"
preset and "node": "current"
, hence only adding the transforms needed for the node version that is being used. Accordingly, the @next
tag and the corresponding branch (deleted) are now obsolete.