Allow transform to be a promise. Resolves #210.#237
Conversation
|
Test failures are on Node v4. This is expected, as v4 does not have async function support. It is worth noting that Node v4 is end of life in two months. |
|
any updates on merging this PR? |
1 similar comment
|
any updates on merging this PR? |
|
Does this have a performance impact for non-async transforms, if they're running across tens of thousands of files? This seems safe to me, given jscodeshift now has a minimum of Node.js 8.x which comes with async/await enabled out-of-the-box, I'm just curious as to if it has a noticeable perf impact. |
|
I don't have any good stress tests to benchmark. :( There will be some impact, yes, but whether it's perceptible is hard to say. |
|
@Daniel15 any chance we can consider merging this? Would be nice to have async support for more complex codemods |
|
Let's do it! |
|
I'll publish this to npm soon, I just need to figure out who has permission to publish the package. Sorry for the delay @rektide! |
|
Published as 0.12.0. Thanks for your contribution! |
Hello. Wanted to float this, as a way to allow transforms to be async. This unlocks any kind of transform that would want to query some exterior piece of state.