-
Notifications
You must be signed in to change notification settings - Fork 281
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
Change TS output to ES6 for all libraries #1232
Conversation
Pull Request Test Coverage Report for Build 84669
💛 - Coveralls |
@jspruance can you add this change to your PR? |
@stevengum I've added your changes to the PR |
Could this be ES6 instead? We have ES6 features (such as in the RegEx). The browsers we target all (likley) support ES6. |
Conerns are (specifically) that runtime features such as the regex look-ahead, which is used in the recognizers-text, need ES6 features. These features cannot be polyfilled. |
Merge branch 'ts-compile-to-es5' of https://github.com/microsoft/botbuilder-js into ts-compile-to-es5
This has been updated to es6. Tested in browser echo bot and unit tests passed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you apply the output changes to the other libraries?
This is complete - ready for review. |
Relates to issue:
#1076
'botbuilder-core' TS compiler modified to output 'ES5' instead of 'ESNext':
"target": "ES5",
"lib": [ "es2015", "dom" ]
Unit tests pass and browser bot runs with no errors in Chrome (JS errors in IE11 before and after this change).
Note that this change does not guarantee 100% ES5 compatibility since TypeScript compilation only targets syntax and does not do any polyfilling (in contrast, Babel does both). However this should not introduce any new errors - if anything ESNext --> ES5 should be safer.
We could introduce a Babel layer to achieve complete ES5 compatibility, which would look like:
TS > ES6 > Babel > ES5