Skip to content
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

Update to ES6+ / Node v6+ #315

Open
blewisio opened this issue Jul 10, 2018 · 6 comments
Open

Update to ES6+ / Node v6+ #315

blewisio opened this issue Jul 10, 2018 · 6 comments

Comments

@blewisio
Copy link

I'd like to update the code to be ES6+ and beyond to make x-ray more modern. In tandem with that, it'd be great to update the engine in package.json to require Node v6.0 or above since v4.0 was recently deprecated.

@matthewmueller
Copy link
Owner

matthewmueller commented Jul 10, 2018

hi @blewisio, I think I'd be open to this change. Would it be possible to do it in a non-breaking way? Does node 6 support promises where node 4 didn't?

Generally speaking, I think trading compatibility for cleaner syntax is a bad deal unless it can really simplify the library. I thinkkk promises would be enough of a reason though 😊

@blewisio
Copy link
Author

Hey @matthewmueller - thanks for the quick response and interest!

As a library maintainer, the risk of not upgrading your ES/node version is that your code will diverge from the rest of the ecosystem - the syntax becomes so different that it's like writing in a different language. I don't think too many people are using v0.10 or v0.12 of node these days anyway, so it's almost a self-imposed limitation! Additionally, end-of-life generally means that that major version will stop receiving security updates.

That being said, I'm happy to target v4 instead of v6 if you'd like to be more conservative with compatibility (v4 and v6 both have similar support for promises, by the way)

@lathropd
Copy link
Collaborator

@blewisio how significant would the changes be (as in how much es6 would you foresee)? (Meanwhile, there's no need to bump to node version until we need to.)

@lathropd
Copy link
Collaborator

So... the testing dependencies mean that our tests all fail on older versions (per travis ci).

I think updating to the most recent LTS version, we’d be in good shape.

@lathropd
Copy link
Collaborator

(In terms of bumping to Node 6. Updating to ES6 or later may be more of an issue.)

@lathropd
Copy link
Collaborator

So ... @blewisio ... we're now targeting LTS (V6) and above. You've likely lost interest in this, but if you're still interested I think we'd be open to it...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants