Since just Node v4+ is supported wouldn't it be could to rewrite everything into ES6?
Yeah, Node 4+ supports most, but not all ES6 features. Given that this is a large codebase, porting to ES6 will take some time.
Currently, I've had a fairly passive approach to this; when I worked on a certain part of the codebase, I would port it to ES6.
If you want to work on this, thought, PRs welcome.
@jprichardson Do you have ES6 stylistic preferences? (i.e. should var be used)
@jprichardson Do you have ES6 stylistic preferences? (i.e. should var be used)
We should avoid var and use let/const if we can.
@jprichardson @RyanZim regarding the codebase, both internally and for the exported functions, do we want to keep the callback style or we want to change that to promise-based?
@manidlou: @jprichardson & I have discussed promise support via email in the past. It's something we definitely want to do sometime, but we want to do it right. That means:
fs methods as well.We also want a solution that will allow incremental porting of the internals to promises (i.e. our solution must be able to wrap both promise and callback functions).
I've been planning on attacking this as soon as I get time; I wanted to do it for v2, but it didn't happen.
Most helpful comment
@manidlou: @jprichardson & I have discussed promise support via email in the past. It's something we definitely want to do sometime, but we want to do it right. That means:
fsmethods as well.We also want a solution that will allow incremental porting of the internals to promises (i.e. our solution must be able to wrap both promise and callback functions).
I've been planning on attacking this as soon as I get time; I wanted to do it for v2, but it didn't happen.