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 Typescript target to es2017 #6224

Merged
merged 1 commit into from Apr 22, 2019
Merged

Conversation

@jasongrout
Copy link
Contributor

@jasongrout jasongrout commented Apr 20, 2019

Right now we have our typescript target as es2015:

"target": "es2015",

According to http://kangax.github.io/compat-table/es2016plus/, all supported browsers have basically everything from es2017 (at least everything we use, I think), even going back as far as FF 60 (ESR). Upgrading our target to es2017 means that we can support native async/await, instead of transpiling down to the iterators, which should make debugging easier.

If we do decide to switch the target, I think it should be before 1.0 so that we can maintain compatibility after 1.0 with that target. I also think we should do another prerelease so that we can catch any issues with switching the target before 1.0.

This brings native async/await and many other features. According to http://kangax.github.io/compat-table/es2016plus/, Firefox 60 (ESR), Chrome, and Safari all support most es2017 features for a while. I don’t think we use the features that are not well supported in recent browsers.
@jasongrout jasongrout added this to the 1.0 milestone Apr 20, 2019
@jupyterlab-dev-mode
Copy link

@jupyterlab-dev-mode jupyterlab-dev-mode bot commented Apr 20, 2019

Thanks for making a pull request to JupyterLab!

To try out this branch on binder, follow this link: Binder

@jasongrout
Copy link
Contributor Author

@jasongrout jasongrout commented Apr 20, 2019

It looks like Chrome 55 and Firefox 52 introduced async/await in 2016, and Safari 10.1 was a year later in middle of 2017.

@jasongrout
Copy link
Contributor Author

@jasongrout jasongrout commented Apr 20, 2019

In fact, what about going to es2018 target. Thoughts?

From microsoft/TypeScript#20463 (comment), es2018 target enables output that has:

  • async iterators (late 2017 for ff/chrome/safari)
  • Promise finally statements (late 2017 to Q1 2018 for ff/chrome/safari)
  • object spread/rest notation (earlier for ff/chrome, Q1 2018 for Safari)

I'm not sure if one year of support is enough to move to es2018, or if we should stick with es2017.

@blink1073
Copy link
Member

@blink1073 blink1073 commented Apr 20, 2019

👍 for ES2017, I agree that it is too soon for ES2018.

@jasongrout jasongrout merged commit 9c338a1 into jupyterlab:master Apr 22, 2019
9 checks passed
@lock lock bot locked as resolved and limited conversation to collaborators Aug 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants