Commit Graph

1087 Commits

Author SHA1 Message Date
achingbrain 4613644cce passes in references to process and Buffer to silence ReferenceErrors 2015-01-04 19:26:47 +01:00
Derek Wickern 718e475613 Fix backslashes in source-map paths on Windows 2015-01-04 19:08:19 +01:00
Austin Brown aa5dd15352 Update README.md
otions => options
2015-01-04 16:01:53 +01:00
Peter Dave Hello 5bff65c132 Use svg instead of png to get better image quality 2015-01-04 15:58:00 +01:00
Richard van Velzen 24bc09b79b Fix #556
`\uFEFF` (ZERO WIDTH NO-BREAK SPACE) is removed when parsing, but was
un-escaped for the output when `ascii_only` was false.

When using
UglifyJS multiple times (creating packages from minified sources, for
example), this would lead to problems because the byte was removed when
parsing for the second time.
2015-01-04 15:01:55 +01:00
Richard van Velzen 37c17d5541 Merge pull request #570 from rvanvelzen/fix-569
Fix #569
2015-01-04 14:02:08 +01:00
Richard van Velzen 120948fa48 Merge pull request #584 from clyfish/fix-base54
fix base54
2015-01-04 14:00:23 +01:00
Richard van Velzen 66e6f0c3cb Merge pull request #592 from micschro/patch-1
Fix max_line_len not working for JSON files
2015-01-04 13:53:31 +01:00
Richard van Velzen f7447efa8c Merge pull request #600 from KenPowers/master
Use yargs instead of optimist.
2015-01-04 13:52:02 +01:00
Richard van Velzen f4d36a58c2 Fix #569
When no arguments are given to `new Function()`, it should be treated as
a regular anonymous function (http://es5.github.io/#x15.3.2.1)
2015-01-04 13:37:59 +01:00
Kenneth Powers 6d1c3e1aec Use yargs instead of optimist. 2015-01-01 01:04:54 -05:00
Mihai Bazon 73cc0505f5 Merge pull request #599 from rvanvelzen/fix-597
Fix #597
2014-12-31 14:18:31 +02:00
Richard van Velzen c75f5a1fd8 Fix #597
NaN and Infinity were replaced in the output generation, instead of
during compression. This could lead to results where `1/0` was inserted
without parens leading to invalid output.

The nodes are replaced in the compression step now, and the output
generation returns their regular names. This should not be a problem,
since they're already only constructed from the original name.
2014-12-31 12:23:00 +01:00
micschro 39d8880f2c Fix max_line_len not working for JSON files
As `maybe_newline()` is only called when `might_need_semicolon` is `true`, the `max_line_len` option has no effect for files without (or with very few) semicolons (like JSON files). A simple for this problem is to use `maybe_newline()` instead of `noop` as the `newline()` function in non-beautify mode.
2014-12-17 16:31:03 +01:00
Mihai Bazon 5538ec7bd8 v2.4.16 v2.4.16 2014-12-09 15:21:44 +02:00
Mihai Bazon f101d6429b Merge pull request #546 from jacobk/patch-1
Use uglify source map token names if missing
2014-12-04 14:07:08 +02:00
Cheng Liangyu fe06fc85d3 fix base54 2014-12-01 13:16:44 +08:00
Mihai Bazon f36a1eaa8b Add option to allow return outside of functions.
Close #288
2014-10-20 18:12:13 +03:00
Mihai Bazon a64bdda9ae Document keep_fargs. Close #557 2014-09-28 12:36:36 +03:00
Mihai Bazon 01d19b4b52 Referencing a global is assumed to have side effects.
Close #550
2014-09-28 11:18:25 +03:00
Mihai Bazon f0c1a01bc2 Merge pull request #549 from Arnavion/unreferenced-catch-symbol
Don't warn for an unreferenced exception symbol in a catch block.
2014-09-13 09:29:34 +03:00
Arnavion 7be680d3f8 Don't warn for an unreferenced exception symbol in a catch block. 2014-09-12 21:01:19 -07:00
Mihai Bazon 57dab1e1db Merge pull request #541 from TalAter/conditional-improvements
Conditional assignment of equivalent constants compressed  ( x=y?1:1 --> x=1 )
2014-09-09 18:45:12 +03:00
Jacob Kristhammar 21b3c890a1 Use uglify source map token names if missing 2014-09-09 13:02:50 +02:00
Tal Ater fb0ec720a4 Compress conditions that have side effects using sequences 2014-09-04 02:57:49 +03:00
Tal Ater 7971ed33d1 Added a test for else if 2014-09-03 01:35:30 +03:00
Tal Ater 885835a655 Compress conditional assignments where all possible outcomes are equivalant and condition has no side effects 2014-09-02 23:30:25 +03:00
Mihai Bazon 4c64554808 Turn foo.new into foo["new"] when not --screw-ie8. Fix #534 2014-08-26 10:11:01 +03:00
Mihai Bazon 548beeb6b1 Prevent error for Function(""). Close #538 2014-08-20 09:16:34 +03:00
Mihai Bazon e3066f9577 Merge pull request #529 from RReverser/master
Added example for usage with SpiderMonkey AST
2014-08-04 23:05:29 +03:00
Ingvar Stepanyan e391367488 Added example for usage with SpiderMonkey AST. 2014-08-04 20:48:14 +03:00
Mihai Bazon 18ddf2f7b5 Merge branch 'master' of https://github.com/RReverser/UglifyJS2 2014-08-04 09:01:19 +03:00
Ingvar Stepanyan f8ee5a0785 Install newest NPM on oldest Node.js. 2014-08-03 21:44:59 +03:00
Ingvar Stepanyan b467a3c877 Added generative testing for AST conversions. 2014-08-03 20:48:59 +03:00
Mihai Bazon f2d48e9019 Merge branch 'patch-1' of https://github.com/gdw2/UglifyJS2 2014-08-03 11:08:39 +03:00
Ingvar Stepanyan 5e314bf3e9 SpiderMonkey Identifier nodes should contain mangled names. 2014-08-03 01:28:58 +03:00
Ingvar Stepanyan 05ba26c7c8 Small fixes for AST conversion. 2014-08-02 13:18:27 +03:00
Ingvar Stepanyan 87b72364a4 Fixes and improvements for UglifyJS->SM AST conversion.
* Explicitly forbidden multiple catch clauses as SM-specific feature.
* Simplified describing of UglifyJS->Mozilla AST conversion rules.
* Moved alias rules to single place.
* Removed usage of dynamic type bindings in generated code (speed-up).
2014-08-01 23:45:37 +03:00
Ingvar Stepanyan 0e3ff1f970 Improved UglifyJS<->SpiderMonkey AST conversions.
* Added directives recognition in SM AST.
* Moved semi-standard SM `Property` type to separate handler.
* Added `const` recognition from SM AST.
* Removed redundant `this`-as-identifier recognition.
* Removed redundant rules for abstract SM types.
* Described `CatchClause` using string syntax.
* Added support for semi-standard `range` tuple as location source.
* Added back-conversion support (to be improved).
2014-08-01 23:42:34 +03:00
gdw2 ec3e74d7f4 Added license 2014-07-28 13:49:44 -07:00
Mihai Bazon 62bda71c85 Fix parens for AST_Undefined
Do the same as for AST_Unary, since we output undefined as `void 0`.

Reported at https://github.com/mishoo/UglifyJS2/issues/338#issuecomment-48858341
2014-07-18 11:31:41 +03:00
Mihai Bazon 83e0939088 v2.4.15 v2.4.15 2014-07-09 18:01:40 +03:00
Mihai Bazon 9798d96e37 Lock source-map to 0.1.34 2014-07-09 18:01:23 +03:00
Artemy Tregubenko 6006dd933d added newline at the end of the file 2014-07-08 11:16:35 +02:00
Mihai Bazon ac2caf1088 Check for the case an AST_For's init is an EmptyStatement
(lame fix for #503)
2014-07-01 23:10:44 +03:00
Dan Wolff 8511e80f48 Evaluate "foo".length ==> 3 2014-07-01 11:06:51 +03:00
Mihai Bazon 91bc3f1f92 Merge pull request #499 from shinnn/master
Update .travis.yml to pass the test on Travis CI
2014-06-26 09:30:25 +03:00
Shinnosuke Watanabe 8463b48f90 Do not run a test for Node v0.4
Travis CI doesn’t support Node v0.4.

http://docs.travis-ci.com/user/languages/javascript-with-nodejs/#Provide
d-Node.js-Versions
2014-06-26 13:17:59 +09:00
Mihai Bazon e3342a3cf6 v2.4.14 v2.4.14 2014-06-12 17:24:33 +03:00
Artemy Tregubenko 524a8a42a4 added @ngInject support for inline functions 2014-05-11 14:01:08 +02:00