[ALOY-540] Resolve suboptimal compression from uglify-js v2 update
DescriptionThe v2 update of uglify-js in Alloy, specifically version 2.2.5, has some suboptimal compressions, which are causing the optimizer.js test spec to fail in certain cases. Specifically the issues are around booleans and cascading of variables in assignments. These issues have been logged with the Uglifyjs2 project in the following links: * https://github.com/mishoo/UglifyJS2/issues/137 * https://github.com/mishoo/UglifyJS2/issues/138 When these issues are resolved and distributed in an npm release, we need to revisit these compressions and testing to ensure that the fixes are in place, and that new uglify-js version has no regressions that impact alloy.
- Tim Poulsen 2014-07-11 With update to v2.4.15 of uglify, code is not compressed in the same way, nor as compactly as before. See updates to _generated (known-good) code addressed in https://github.com/appcelerator/alloy/pull/476. As part of this ticket, test the uglify options to see if we can return to the compression results we had before.
- Tim Poulsen 2014-07-14 Issue 137 has been resolved. Issue 138 has not. I've been through each of the compress options (Alloy/commands/compile/ast/compress.js) in succession and none of them returns the compressed output to match that of the previous Uglify version. Stopping progress, though not resolving this ticket; revisit once issue 138 is resolved.
- Feon Sua Xin Miao 2018-01-06