We want to guarantee support for all ES6 syntax, functions, and types on all platforms (Android, iOS, Windows) and all supported OS versions by Titanium 8.0.0. This way, all CommonJS modules built for Titanium 8.0.0 can be written in ES6. This also means we need to drop support of our "tiapp.xml" <transpile/> setting so that it cannot be turned off.
Currently, CommonJS modules have to be written for ES5 since transpile/polyfill can be disabled by an app. This also means that they can't provide APIs that use promises, especially since iOS 9 doesn't natively support them. (A module could document that it only supports ES6 enabled apps, but this is inconvenient.)
Issues to be resolved:
- Babel is currently injecting 'use strict' into all JS files, which is a breaking change for app developers that don't adhere to this setting. (This is why transpile/polyfill is off by default.)
- We need a mapping file so that a runtime error's stack trace would lineup with the app developer's code. We currently log the trace and display the trace via an alert. We need to consider online crash reporting as well. (Do we add the mapping file to the app bundle for non-production builds?)
- Anything else?