-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
require a newer version of uglify that fixes a bug with regexp #4902
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
Conversation
cc @gaearon |
trying to get the tests passing. i can't even run the master tests locally though. i get an Error: Cannot find module 'webpack/lib/removeAndDo' |
see CONTRIBUTING.md.
To update the test snapshots:
|
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.
Update test snapshots
it's passing in travis but i still get an error locally.
|
@@ -20,7 +20,7 @@ it("should pass mangle options", function() { | |||
var fs = require("fs"), | |||
path = require("path"); | |||
var source = fs.readFileSync(path.join(__dirname, "ie8.js"), "utf-8"); | |||
source.should.containEql("function r(n){return function(n){try{t()}catch(t){n(t)}}}"); | |||
source.should.containEql("function r(n){return function(t){try{n()}catch(n){t(n)}}}"); |
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.
on second thought not sure i should have switched n and t. it looks like it might change the behavior of the resulting code. but i'm not sure why the output switched either.
Thank you for your pull request! The most important CI builds succeeded, we’ll review the pull request soon. |
Thanks |
What kind of change does this PR introduce?
Just requiring a newer version of uglify js that includes a bugfix mishoo/UglifyJS#1964
Did you add tests for your changes?
No code changes were made.
Summary
There was a bug in earlier versions of uglify where the reduce_vars option (which is on by default) was causing some changes to the global RegExp prototype in certain scenarios (such as if babel-polyfill is included). This could break methods like string.split when using node 6 or chrome 51.
Does this PR introduce a breaking change?
No