-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Migration bot #625
Comments
So, the recommended way for koa@2's middlewares is async/await(babel compiled for now), not use Promise directly ? |
definitely. |
@coderhaoxin yea I think it's pointless to convert everything to promises, the yield -> async is almost a 1:1 change, promises are a little more complicated that way, and everyone will just be doing it all over again otherwise. I'm not suggesting babel here either though, just that we have something available for when Node gets async/await |
+1. Either use Babel compiled (and still keep it on |
I'd be happy to work on these things but I may need some guidance! |
@aquascaper just ask whenever you have questions / need help :) @tj Were you planning to run this bot on all koa 1.x middleware you can find in NPM or just the "official" ones (koajs/* repos)? I think it'd be fair to run them on ones we don't maintain as well since most of the "koa" related packages on NPM are middleware (since there's not much else I can think of that you can write for Koa haha). |
yea probably everything, could test drive on a few of the koajs/* ones first |
👍 fair |
If anyone wants to get started on this, I will make an empty repo in this org and add you to the team. |
I'm interested in doing this, need a couple days before i can start though. |
how about warn this in co. |
@tj consider using a codemod to transform javascript code using https://github.com/facebook/jscodeshift Take a look at this: https://medium.com/@cpojer/effective-javascript-codemods-5a6686bb46fb#.vh2b6nqse |
@jonathanong I would love to start on this, what's the next step? |
@shime start from scratch? i'm not sure anyone has started on this yet |
@jonathanong yup, sent you an email. |
@shime @jonathanong let me know if i can do anything to help. jscodeshift, linked above by @sibelius, looks like it could be pretty handy for the transforms. https://github.com/facebook/jscodeshift |
@hedgerh sure, yeah that's a good idea. feel free to submit PRs to related middleware, I haven't submitted any yet. |
I don't think we need this anymore :) |
Will implement this sometime unless someone wants to have some fun before me!
yield {}
,yield []
, etc)This doesn't need to really perform the PRs any time soon, but ideally we're ready for it when the time comes.
Related: #621
The text was updated successfully, but these errors were encountered: