Update dependencies; fix uglify options from recent update#3710
Closed
timmywil wants to merge 2 commits intojquery:masterfrom
Closed
Update dependencies; fix uglify options from recent update#3710timmywil wants to merge 2 commits intojquery:masterfrom
timmywil wants to merge 2 commits intojquery:masterfrom
Conversation
|
@timmywil, thanks for your PR! By analyzing the history of the files in this pull request, we identified @gibson042, @mgol and @markelog to be potential reviewers. |
mgol
reviewed
Jul 3, 2017
| options: { | ||
| preserveComments: false, | ||
| sourceMap: true, | ||
| ASCIIOnly: true, |
Member
Author
There was a problem hiding this comment.
This option was removed.
Member
Author
There was a problem hiding this comment.
Or rather, replaced and taken care of by output.ascii_only.
mgol
requested changes
Jul 3, 2017
Gruntfile.js
Outdated
| preserveComments: false, | ||
| sourceMap: true, | ||
| ASCIIOnly: true, | ||
| ie8: true, |
Member
There was a problem hiding this comment.
Could you add a comment explaining why that's needed with a link to the UglifyJS bug (and maybe a support comment for IE<11)?
mgol
reviewed
Jul 3, 2017
Gruntfile.js
Outdated
| sourceMap: true, | ||
| ASCIIOnly: true, | ||
|
|
||
| // Support: IE<11 |
Member
There was a problem hiding this comment.
There should be a space before <. Otherwise looks good.
- Uses new typeofs option for compression - See mishoo/UglifyJS#2198 Close jquerygh-3710
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Uglify transforms
typeofstatements, causingelem.getAttributeto invoke the method despite the lack of parens (the reason we dotypeofin the first place). I opened a ticket on uglify-js, as I didn't think this transformation should occur unlessunsafeis set totrue. The resolution turned out better than I expected. Uglify added a newcompressoption:typeofsthat disables only this transformation. The result? -16 bytes to -79 bytes (gzipped).Checklist