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

ES6 #14813

Closed
artemgurzhii opened this issue Jan 11, 2017 · 13 comments
Closed

ES6 #14813

artemgurzhii opened this issue Jan 11, 2017 · 13 comments
Assignees

Comments

@artemgurzhii
Copy link
Contributor

It's probably more a question rather than an issue. I have notice that you are using ES5 and ES6. Why not to choose only one of them? For example using template literals and without.

@locks
Copy link
Contributor

locks commented Jan 11, 2017

Because different people write different parts of the code, and some of them are older than ES6 ;)
What's your interest? We're currently doing some updating and eslinting of the codebase that's related.

@artemgurzhii
Copy link
Contributor Author

Would it be ok if I create pull request with some updated code?

@locks
Copy link
Contributor

locks commented Jan 12, 2017

I'll close this since we can track progress through your pull requests :)

@locks locks closed this as completed Jan 12, 2017
@locks locks reopened this Jan 12, 2017
@locks
Copy link
Contributor

locks commented Jan 12, 2017

I'm reopening after all, it'll be useful to have somewhere to discuss things that are relevant for all the PRs. There is a concern here about performance and size bloat due to transpilations, which we currently don't have a way to benchmark for Pull Requests.

We might want to come up with a subset of features we know to be "safe".
My suggestions:

  • template strings with interpolation
  • object property short-hand (let obj = { someProperty }).
  • let/const

@runspired
Copy link
Contributor

Avoid array destructuring and anything, for of, and anything requiring regenerator or other babel polyfills.

@mani-mishra
Copy link
Contributor

mani-mishra commented Jan 13, 2017

@locks We could have used js-codemod scripts. instead of doing it manually everywhere.
https://github.com/cpojer/js-codemod#included-scripts

We used the same tool, for converting our old files to ES6.

@bjornharrtell
Copy link

FYI https://lebab.io/

@locks
Copy link
Contributor

locks commented Jan 13, 2017

@manimis902 I don't know how @artemgurzhii is doing it :P

@artemgurzhii
Copy link
Contributor Author

artemgurzhii commented Jan 13, 2017

Lebab converting code using for of loop, String.includes and some other methods which are throwing errors and tests are failing, so mostly I'm trying to do this by myself.

@SathishkumarThangavel
Copy link

@artemgurzhii what is the status? Can I help you by taking one part of job in converting to ES6?

@artemgurzhii
Copy link
Contributor Author

artemgurzhii commented Jan 21, 2017

@GitHubSathishKumar This is the list of all packages, that I haven't refactored yet.

  • container
  • ember-glimmer
  • ember-testing
  • external-helpers
  • internal-test-helpers
  • loader

@Serabe
Copy link
Member

Serabe commented Mar 8, 2017

@artemgurzhii what is the state of this?

Thank you!

@artemgurzhii
Copy link
Contributor Author

@Serabe ember-glimmer has nothing to refactor as it always stays up to date. I'm not sure about loader package, but as I noticed it can't be changed, as it not compiled through babel, and making any changes makes all tests fail. I was trying to refactor external-helpers but it has no tests, so I'm afraid to break something) And I just got refactored container and internal-test-helpers packages. I haven't refactored ember-testing and also, I was having problems refactoring internal-test-helpers/lib/factory.js.

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

No branches or pull requests

8 participants