-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
"Enhance conditionals" change creating invalid output #3269
Comments
Confirmed working in 3.4.8 and broken in 3.4.9 for me too, @alexlamsl it looks like there is a major bug in 3.4.9. Input: var modelClassName,
routeName = '',
parentName = '',
routeEnd = '';
if ( parentName === 'x' ) {
parentName = '';
}
if ( 'me' === routeEnd ) {
routeName = 'me';
}
if ( '' !== parentName && parentName !== routeName ) {
modelClassName = parentName + routeName;
modelClassName = mapping.models[ modelClassName ] || modelClassName;
loadingObjects.models[ modelClassName ] = thing();
} else {
modelClassName = routeName;
modelClassName = mapping.models[ modelClassName ] || modelClassName;
loadingObjects.models[ modelClassName ] = thing();
} Output with var modelClassName, routeName = "", parentName = "", routeEnd = "";
"x" === parentName && (parentName = ""), "me" === routeEnd && (routeName = "me"),
loadingObjects.models[modelClassName] = (modelClassName = (modelClassName = "" !== parentName && parentName !== routeName ? parentName + routeName : routeName,
mapping.models[modelClassName] || modelClassName), thing()); |
* Renovate[bot]: Update dependency grunt-contrib-uglify to v4 * Update options for grunt-contrib-uglify >2.x See: https://github.com/gruntjs/grunt-contrib-uglify/tree/v4.0.0#deprecated-options-from-2x * Pin uglify-js to 3.4.8 See: mishoo/UglifyJS#3269 (comment) * Re-enable IE8 support
Releasing a new version and then disappearing is bad form. Please follow up with your community after the release. If you don't have time to do that, better not to do the release in the first place. |
Someone at least, remove v3.4.9 from here and npm. It is a dangerous version |
Very surprised to see that this still has not been rolled back. We unfortunately did not catch the issue until it entered production code (it did not manifest itself as a code exception, but instead as data mutation), by which point it had triggered a major incident for us. |
Due to a bug in uglify-js 3.4.9 compressing conditionals during asset minization is broken, leading to #5450. This commit disables conditionals compression until we can test it is fixed in a future uglify-js release. Here is a similar issue reported in upstream project: mishoo/UglifyJS#3269 Fixes #5450
Due to a bug in uglify-js 3.4.9, compressing conditionals during asset minimization is broken, leading to #5450. This commit disables conditionals compression until we can test it is fixed in a future uglify-js release. There are several reports in the upstream project, one of them is: mishoo/UglifyJS#3269 Fixes #5450
Due to a bug in uglify-js 3.4.9, compressing conditionals during asset minimization is broken, leading to #5450. This commit disables conditionals compression until we can test it is fixed in a future uglify-js release. There are several reports in the upstream project, one of them is: mishoo/UglifyJS#3269 Fixes #5450
Due to a bug in uglify-js 3.4.9, compressing conditionals during asset minimization is broken, leading to #5450. This commit disables conditionals compression until we can test it is fixed in a future uglify-js release. There are several reports in the upstream project, one of them is: mishoo/UglifyJS#3269 Fixes #5450 (cherry picked from commit 28993f9)
Due to a bug in uglify-js 3.4.9, compressing conditionals during asset minimization is broken, leading to #5450. This commit disables conditionals compression until we can test it is fixed in a future uglify-js release. There are several reports in the upstream project, one of them is: mishoo/UglifyJS#3269 Fixes #5450 (cherry picked from commit 28993f9)
fixes mishoo#3245 fixes mishoo#3257 fixes mishoo#3260 fixes mishoo#3269 fixes mishoo#3271 fixes mishoo#3278 fixes mishoo#3309 fixes mishoo#3319 fixes mishoo#3321
Bug report
An optimization in v3.4.9 seems to be moving an array assignment to before the array is created.
Bisected the problem to 2bdaca1 (#3243).
Uglify version (
uglifyjs -V
)uglify-js 3.4.9
JavaScript input
Input (simplified from some code in Turbulenz that trigger this):
Expected output:
Float32Array [ 1, 2, 3 ]
The
uglifyjs
CLI command executed orminify()
options used.uglifyjs --compress
JavaScript output or error produced.
Generated code (with --beautify for clarity):
Running output:
The text was updated successfully, but these errors were encountered: