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

alpha25+ requires ECMAScript 2018 #1630

Closed
john-shaffer opened this issue May 11, 2021 · 2 comments
Closed

alpha25+ requires ECMAScript 2018 #1630

john-shaffer opened this issue May 11, 2021 · 2 comments
Labels
support: question Community support but can be turned into an improvement

Comments

@john-shaffer
Copy link

john-shaffer commented May 11, 2021

348a673 introduced the use of Unicode property escapes in a regular expression.

https://github.com/mui-org/material-ui-x/blob/f62c6ba3965d25490380da93ea6968166f3ff4a9/packages/grid/_modules_/grid/utils/keyboardUtils.ts#L16

This change means that projects using DataGrid/XGrid have to be compiled to ES9 or later, whereas in v4.0.0-alpha24 ES5 seems to work fine. Considering the widespread usage of Material UI and the drastic change in compatibility, this could be a problem for a lot of projects.

I couldn't find any information on what versions Material UI intends to be compatible with or if this would be considered a bug, so this issue can help document those things as well.

@john-shaffer john-shaffer added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label May 11, 2021
@oliviertassinari
Copy link
Member

oliviertassinari commented May 11, 2021

It's actually a bug in TypeScript: microsoft/TypeScript#32214.

I couldn't find any information on what versions Material UI intends to be compatible with or if this would be considered a bug, so this issue can help document those things as well.

https://next.material-ui.com/getting-started/supported-platforms/#browser vs. https://caniuse.com/mdn-javascript_builtins_regexp_property_escapes it looks like we are good.


This also resonates with #50, Babel handles the problem correctly. In the core, we use .browserslistrc with Babel to transpile what we need, a feature TypeScript doesn't support: microsoft/TypeScript#19183 either.

@john-shaffer
Copy link
Author

Thank you for the quick response!

@oliviertassinari oliviertassinari added support: question Community support but can be turned into an improvement and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels May 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support: question Community support but can be turned into an improvement
Projects
None yet
Development

No branches or pull requests

2 participants