e637bda | Mihai Bazon | 05 May 2015, 07:11:38 UTC | Only drop the BOM when it's the first character. Close #704 | 05 May 2015, 07:11:38 UTC |
d558abb | Mihai Bazon | 04 May 2015, 16:14:42 UTC | v2.4.21 | 04 May 2015, 16:14:42 UTC |
4aed083 | Mihai Bazon | 04 May 2015, 14:55:42 UTC | Fix blank lines in the output. The issue was more obvious when max_line_len has a small value, rather than the default 32K characters. A blank line showed up after most statements. | 04 May 2015, 14:55:42 UTC |
d2dda34 | Mihai Bazon | 04 May 2015, 12:07:16 UTC | Remove deprecated calls to utils.print/utils.error Close #542, #641, #647 | 04 May 2015, 12:07:16 UTC |
c3a10c1 | Mihai Bazon | 04 May 2015, 11:49:17 UTC | Avoid spurious brackets when dropping unused vars Fix #702 | 04 May 2015, 11:49:17 UTC |
92e4340 | Mihai Bazon | 23 April 2015, 09:08:19 UTC | Fix parsing strings with literal DOS newlines (should not set newline_before) Fix #693 | 23 April 2015, 09:08:19 UTC |
7b22f20 | Mihai Bazon | 22 April 2015, 14:34:49 UTC | If name_cache is specified, do rename cached properties (even if --mangle-props is not there) | 22 April 2015, 14:34:49 UTC |
3b14582 | Mihai Bazon | 17 April 2015, 08:28:59 UTC | Fix tests | 17 April 2015, 08:28:59 UTC |
274e1b3 | Mihai Bazon | 17 April 2015, 08:25:19 UTC | Drop NaN -> 0/0 transformation. Fix #687 | 17 April 2015, 08:26:36 UTC |
de58b02 | Fábio Santos | 12 April 2015, 13:51:26 UTC | Added expect_exact for testing the OutputStream This works almost exactly like `expect`, except that you pass a literal string of which the result is compared with the generated output. | 14 April 2015, 18:26:47 UTC |
efea52a | XhmikosR | 14 April 2015, 15:29:14 UTC | Normalize package.json. * Specify the files to install in package.json * Add missing properties * Follow `npm init`'s scheme | 14 April 2015, 18:17:03 UTC |
763bd36 | Jordan Harband | 11 April 2015, 22:35:18 UTC | Test on latest `node` and `io.js` Per https://github.com/mishoo/UglifyJS2/commit/0262b4244c13b3ef148bf096874847aea84b93e5 - if you're going to stop testing on 0.8, you should be testing on 0.12. Also allow failures on unstable nodes and "older than two latest" `io.js` versions, and enable "sudo: false" which makes tests run faster. | 14 April 2015, 18:06:09 UTC |
0552dbd | Mihai Bazon | 13 April 2015, 15:59:21 UTC | v2.4.20 | 13 April 2015, 15:59:21 UTC |
18c63ff | Mihai Bazon | 13 April 2015, 14:29:48 UTC | Fix compression of conditionals Don't move the condition on the right side of an assignment when the left side may have side effects. Fix #677 | 13 April 2015, 14:29:48 UTC |
e04ef56 | Mihai Bazon | 10 April 2015, 08:33:29 UTC | Use the `before` visitor in mangle props (works around a bug in our tree walker which, while cloning nodes, breaks references between labeled statements and break/continue labels) | 10 April 2015, 08:33:29 UTC |
5d60484 | Mihai Bazon | 05 April 2015, 10:19:46 UTC | More fixes for the breaking changes in yargs Close #670 | 05 April 2015, 10:20:22 UTC |
3c846e6 | Mihai Bazon | 04 April 2015, 12:29:03 UTC | Merge pull request #669 from galvanix/documentation-inSourceMap Document passing source maps directly to minify() using inSourceMap | 04 April 2015, 12:29:03 UTC |
2850dc6 | David Caldwell | 04 April 2015, 00:27:28 UTC | Document passing source maps directly to minify() using inSourceMap | 04 April 2015, 00:27:28 UTC |
94205c3 | Mihai Bazon | 29 March 2015, 11:02:37 UTC | v2.4.19 | 29 March 2015, 11:02:37 UTC |
2ada34b | Mihai Bazon | 29 March 2015, 11:01:21 UTC | Merge pull request #660 from ntkme/fix-long-options Fix long options | 29 March 2015, 11:01:21 UTC |
db396da | なつき | 29 March 2015, 10:50:00 UTC | Fix long options | 29 March 2015, 11:00:42 UTC |
0262b42 | Mihai Bazon | 29 March 2015, 10:19:07 UTC | Disable testing with Node 0.8 | 29 March 2015, 10:19:07 UTC |
73ca767 | Mihai Bazon | 29 March 2015, 10:15:27 UTC | v2.4.18 | 29 March 2015, 10:15:27 UTC |
3ec11c7 | Mihai Bazon | 29 March 2015, 10:13:40 UTC | Update README | 29 March 2015, 10:13:40 UTC |
a79ff06 | Mihai Bazon | 29 March 2015, 09:50:43 UTC | Merge branch 'propmangle' | 29 March 2015, 09:50:43 UTC |
43991f8 | Mihai Bazon | 29 March 2015, 09:38:06 UTC | Add tool to extract property names | 29 March 2015, 09:38:06 UTC |
6b82069 | Mihai Bazon | 24 March 2015, 11:59:57 UTC | Merge in more DOM properties. | 24 March 2015, 11:59:57 UTC |
276b9a3 | Mihai Bazon | 23 March 2015, 21:27:00 UTC | Fix compressing `![foo()];` as a statement need to check whether the literal has any side effects before replacing that with `false`. | 23 March 2015, 21:27:00 UTC |
5801fa3 | Mihai Bazon | 22 March 2015, 11:01:42 UTC | [sequencesize] Actually even better: do create the sequence even if the stat list is bigger than 2000 statements, but limit the sequence itself to 2000 expressions. Ref #414 | 22 March 2015, 11:02:45 UTC |
f0ab1b0 | Mihai Bazon | 22 March 2015, 10:51:15 UTC | Avoid sequencesize for more than 2000 statements. It hardly saves any bytes for a sequence so long, and it risks blowing the stack with the recursive Seq functions. Ref #414 | 22 March 2015, 10:51:15 UTC |
36c28e0 | Mihai Bazon | 22 March 2015, 10:50:36 UTC | Add start/end nodes for NaN/Infinity transformations | 22 March 2015, 10:50:36 UTC |
e1c3861 | Mihai Bazon | 22 March 2015, 09:04:28 UTC | Export readDefaultReservedFile | 22 March 2015, 09:04:28 UTC |
ecfd881 | Mihai Bazon | 20 March 2015, 08:28:51 UTC | Keep unused function arguments by default Discarding unused function arguments affects function.length, which can lead to some hard to debug issues. This optimization is now done only in "unsafe mode". Fix #121 | 20 March 2015, 08:28:51 UTC |
81b7335 | Mihai Bazon | 19 March 2015, 10:54:43 UTC | Don't use Object.create | 19 March 2015, 10:54:43 UTC |
bb010c2 | Mihai Bazon | 19 March 2015, 08:10:01 UTC | tools/props.html: output complete JSON | 19 March 2015, 08:10:01 UTC |
03b6121 | Mihai Bazon | 18 March 2015, 10:09:09 UTC | Add --reserve-domprops along with a default exclusion list in tools/domprops.json | 18 March 2015, 10:10:21 UTC |
3ef0923 | Mihai Bazon | 18 March 2015, 09:53:17 UTC | Support multiple --reserved-file args | 18 March 2015, 09:53:17 UTC |
540c197 | Mihai Bazon | 18 March 2015, 09:51:09 UTC | Bump yargs version (for .array arguments) | 18 March 2015, 09:51:09 UTC |
80d1c82 | Mihai Bazon | 18 March 2015, 08:09:30 UTC | Fix parsing for U+2028 / U+2029 (they should be treated as whitespace) | 18 March 2015, 08:11:37 UTC |
d36faff | Mihai Bazon | 18 March 2015, 08:09:30 UTC | Fix parsing for U+2028 / U+2029 (they should be treated as whitespace) | 18 March 2015, 08:09:30 UTC |
7c8c9b9 | Mihai Bazon | 17 March 2015, 12:31:22 UTC | tools/props.html: use try/catch in a few more places | 17 March 2015, 12:31:22 UTC |
f5eeed7 | Mihai Bazon | 17 March 2015, 09:46:04 UTC | Add tool to list DOM properties/methods | 17 March 2015, 09:46:04 UTC |
80cfd06 | Mihai Bazon | 17 March 2015, 08:05:49 UTC | Export readNameCache / writeNameCache | 17 March 2015, 08:05:49 UTC |
aa45f65 | Mihai Bazon | 16 March 2015, 11:16:30 UTC | rename --prop-cache to --name-cache ... and support storing there variable names as well, to help with multiple invocations when mangling toplevel. | 16 March 2015, 11:16:30 UTC |
0c80d21 | Mihai Bazon | 16 March 2015, 08:53:31 UTC | Fix prop mangling Even if not “defined”, do mangle if name exists in the cache. | 16 March 2015, 08:53:31 UTC |
375c882 | Mihai Bazon | 14 March 2015, 09:36:58 UTC | Fix --reserved-file | 14 March 2015, 09:36:58 UTC |
ea34301 | Mihai Bazon | 14 March 2015, 09:22:28 UTC | Add property name mangler We only touch properties that are present in an object literal, or which are assigned to. Example: x = { foo: 1 }; x.bar = 2; x["baz"] = 3; x[cond ? "qwe" : "asd"] = 4; console.log(x.stuff); The names "foo", "bar", "baz", "qwe" and "asd" will be mangled, and the resulting mangled names will be used for the same properties throughout the code. The "stuff" will not be, since it's just referenced but never assigned to. This *will* break most of the code out there, but could work on carefully written code: do not use eval, do not define methods or properties by walking an array of names, etc. Also, a comprehensive list of exclusions needs to be passed, to avoid mangling properties that are standard in JavaScript, DOM, used in external libraries etc. | 14 March 2015, 09:22:28 UTC |
9de7199 | Mihai Bazon | 10 March 2015, 22:03:12 UTC | v2.4.17 | 10 March 2015, 22:04:26 UTC |
ae07714 | Edward Casbon | 11 August 2014, 11:40:01 UTC | Add filename to the JS_Parse_Error exception. It would be nice to have access to the filename of the file that includes the code that causes a JavaScript error. This is especially handy if uglifying multiple files at once. Only a small change is needed for this to happen as it's already available in the function that throws the error. | 11 February 2015, 22:21:22 UTC |
0e41a3f | Rob Loach | 27 January 2015, 20:55:05 UTC | Add .npmignore | 11 February 2015, 22:19:21 UTC |
61e850c | Richard van Velzen | 11 February 2015, 20:27:21 UTC | Clean up unit test breakage In 992b6b9fcce47ca67ecb14675f10b172ce7a99b5 unit test broke (which I missed). This was due to undeclared variables not being side-effects free. However, since they're really not side-effect free, just declare them in the test cases. | 11 February 2015, 20:27:21 UTC |
992b6b9 | Richard van Velzen | 11 February 2015, 20:05:49 UTC | Fix invalid removal of left side in && and || compression See #637. This does not produce the optimal result, but it does prevent the removal of non-side-effect-free code. | 11 February 2015, 20:08:41 UTC |
7b71344 | Anthony Van de Gejuchte | 10 February 2015, 15:57:17 UTC | Parse regexes properly | 11 February 2015, 17:29:15 UTC |
605362f | Richard van Velzen | 31 January 2015, 12:22:07 UTC | Drop all `console` statements properly Because the base reference can be an member expression as well, we have to dig a bit deeper to find the leftmost base reference. Fixes #451 | 31 January 2015, 12:24:44 UTC |
fbbaa42 | Mihai Bazon | 27 January 2015, 20:26:27 UTC | Add option to preserve/enforce string quote style `-q 0` (default) use single or double quotes such as to minimize the number of bytes (prefers double quotes when both will do); this is the previous behavior. `-q 1` -- always use single quotes `-q 2` -- always use double quotes `-q 3` or just `-q` -- always use the original quotes. Related codegen option: `quote_style`. Close #495 Close #460 Some `yargs` guru please tell me why `uglifyjs --help` doesn't display the help string for `-q` / `--quotes`, and why it doesn't output the expected argument types anymore, like good old `optimist` did. | 27 January 2015, 20:26:27 UTC |
099992e | Anthony Van de Gejuchte | 09 January 2015, 15:46:40 UTC | Keep single line comments after nlb, after nlb Fixes #583 | 26 January 2015, 11:11:52 UTC |
d78ae20 | Richard van Velzen | 26 January 2015, 11:07:44 UTC | Make empty source map values more reasonable in .minify() `"null"` isn't a very usable value. `JSON.parse(null)` also gives `null`, which makes this fully backwards compatible. Closes #616 | 26 January 2015, 11:07:44 UTC |
5c02d65 | Bryce Cronkite-Ratcliff | 24 January 2015, 08:24:08 UTC | fixes issue #621 SourceMap toString JSON format The correct format of a sourcemap is acquired from a mozilla source map generator by calling toJSON on this object. This patch alters the toString function on mozilla generators to print the format that is to spec instead of the generator's internal representation of itself. | 24 January 2015, 08:33:02 UTC |
d36067c | Mihai Bazon | 20 January 2015, 11:00:31 UTC | Merge pull request #615 from avdg/unicode Give parser more unicode support | 20 January 2015, 11:00:31 UTC |
f1b2134 | Anthony Van de Gejuchte | 19 January 2015, 23:31:44 UTC | Add test | 19 January 2015, 23:31:44 UTC |
74cda80 | Anthony Van de Gejuchte | 19 January 2015, 20:35:53 UTC | Add unicode digit parsing support | 19 January 2015, 23:17:24 UTC |
9a3a848 | Anthony Van de Gejuchte | 18 January 2015, 23:59:29 UTC | Update unicode letter | 19 January 2015, 23:17:03 UTC |
a1a4c2a | Tal Ater | 13 September 2014, 15:59:19 UTC | Optimize conditionals where the consequent and alternative are both booleans and not equivalent | 13 January 2015, 17:27:21 UTC |
189dbf0 | Mihai Bazon | 12 January 2015, 16:18:55 UTC | Merge pull request #612 from rvanvelzen/issue-611 Replace the correct node when replacing in `void` sequences | 12 January 2015, 16:18:55 UTC |
42ecd42 | Richard van Velzen | 12 January 2015, 16:09:34 UTC | Replace the correct node when replacing in `void` sequences Close #611. | 12 January 2015, 16:09:34 UTC |
a10f6a9 | Mihai Bazon | 11 January 2015, 10:10:42 UTC | Merge pull request #482 from arty-name/inline-ng-inject added @ngInject support for inline functions | 11 January 2015, 10:10:42 UTC |
0d232a1 | Mihai Bazon | 07 January 2015, 21:17:08 UTC | Merge pull request #606 from rvanvelzen/document-double-dash Document `--` for usage in CLI class | 07 January 2015, 21:17:08 UTC |
285bffd | Richard van Velzen | 07 January 2015, 18:04:10 UTC | Document `--` for usage in CLI class Close #518 | 07 January 2015, 18:04:10 UTC |
61c233a | Mihai Bazon | 07 January 2015, 09:20:04 UTC | Fix make_node_from_constant for Regexp-s Close #588 | 07 January 2015, 09:20:04 UTC |
d2d7164 | Mihai Bazon | 06 January 2015, 11:57:18 UTC | aborts(AST_If) returns the `if` node Previously it returned the abort node from the alternative branch. This is not much use as it can be different from the one in the body branch (i.e. return vs. throw) and can trick us into issues like #591. Fix #591 | 06 January 2015, 12:01:35 UTC |
f16033a | Ingvar Stepanyan | 08 August 2014, 11:54:34 UTC | Location fix for Mozilla AST start token. | 06 January 2015, 10:32:41 UTC |
ae5366a | Ingvar Stepanyan | 08 August 2014, 11:15:43 UTC | Track ending lines/columns; fix end locations in Mozilla AST. | 06 January 2015, 10:32:41 UTC |
6b23cbc | Mihai Bazon | 06 January 2015, 10:27:23 UTC | AST_Do nodes: walk body before condition | 06 January 2015, 10:29:07 UTC |
7f9bc9e | Richard van Velzen | 05 January 2015, 18:10:32 UTC | Pass mangle options to `figure_out_scope` and `compute_char_frequence` Fix #219. Because the options were not set and `toplevel` is `false` by default, some toplevel names would sometimes not be mangled correctly. | 05 January 2015, 18:10:32 UTC |
13219ce | Mihai Bazon | 05 January 2015, 10:14:42 UTC | Fix handling \r\n Close #437 | 05 January 2015, 10:14:42 UTC |
93a6e57 | Mihai Bazon | 05 January 2015, 09:20:00 UTC | Declare boolean type for --keep-fnames | 05 January 2015, 09:20:00 UTC |
fe55e0d | Mihai Bazon | 05 January 2015, 09:11:38 UTC | Merge branch 'keep-function-expression-names' of https://github.com/rvanvelzen/UglifyJS2 | 05 January 2015, 09:11:38 UTC |
e1f0747 | Mihai Bazon | 05 January 2015, 09:03:13 UTC | Support keep_fnames in compressor, and --keep-fnames. #552 Passing `--keep-fnames` will enable it both for compressor/mangler, so that function names will not be dropped (when unused) nor mangled. | 05 January 2015, 09:03:13 UTC |
e37b67d | Richard van Velzen | 04 January 2015, 19:53:19 UTC | Add an option to prevent function names from being mangled See #552. This is mostly useful for having the actual function names in traces. | 04 January 2015, 20:48:43 UTC |
ad18689 | Caridy Patino | 11 November 2014, 19:38:01 UTC | using the original sourcemap as the base * Creates a new SourceMapGenerator based on a SourceMapConsumer: https://github.com/mozilla/source-map#sourcemapgeneratorfromsourcemapsourcemapconsumer | 04 January 2015, 20:08:29 UTC |
0f80b10 | truiken | 29 August 2014, 18:41:13 UTC | Resolve the relative path to lib files last This allows usage of UglifyJS on build systems which have a flat (or non-matching relative) directory structure for source files. | 04 January 2015, 20:01:11 UTC |
0d48af3 | Richard van Velzen | 04 January 2015, 19:14:38 UTC | Add a "keep_fnames" option to the compressor to retain function expression names See #552. This is useful for stack traces. | 04 January 2015, 19:14:38 UTC |
4613644 | achingbrain | 28 November 2013, 08:32:39 UTC | passes in references to process and Buffer to silence ReferenceErrors | 04 January 2015, 18:26:47 UTC |
718e475 | Derek Wickern | 23 October 2014, 23:27:53 UTC | Fix backslashes in source-map paths on Windows | 04 January 2015, 18:08:19 UTC |
aa5dd15 | Austin Brown | 27 March 2014, 06:15:44 UTC | Update README.md otions => options | 04 January 2015, 15:01:53 UTC |
5bff65c | Peter Dave Hello | 25 December 2014, 14:41:33 UTC | Use svg instead of png to get better image quality | 04 January 2015, 14:58:00 UTC |
24bc09b | Richard van Velzen | 23 October 2014, 14:16:19 UTC | 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. | 04 January 2015, 14:01:55 UTC |
37c17d5 | Richard van Velzen | 04 January 2015, 13:02:08 UTC | Merge pull request #570 from rvanvelzen/fix-569 Fix #569 | 04 January 2015, 13:02:08 UTC |
120948f | Richard van Velzen | 04 January 2015, 13:00:23 UTC | Merge pull request #584 from clyfish/fix-base54 fix base54 | 04 January 2015, 13:00:23 UTC |
66e6f0c | Richard van Velzen | 04 January 2015, 12:53:31 UTC | Merge pull request #592 from micschro/patch-1 Fix max_line_len not working for JSON files | 04 January 2015, 12:53:31 UTC |
f7447ef | Richard van Velzen | 04 January 2015, 12:52:02 UTC | Merge pull request #600 from KenPowers/master Use yargs instead of optimist. | 04 January 2015, 12:52:02 UTC |
f4d36a5 | Richard van Velzen | 23 October 2014, 13:57:12 UTC | 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) | 04 January 2015, 12:37:59 UTC |
6d1c3e1 | Kenneth Powers | 01 January 2015, 06:04:54 UTC | Use yargs instead of optimist. | 01 January 2015, 06:04:54 UTC |
73cc050 | Mihai Bazon | 31 December 2014, 12:18:31 UTC | Merge pull request #599 from rvanvelzen/fix-597 Fix #597 | 31 December 2014, 12:18:31 UTC |
c75f5a1 | Richard van Velzen | 31 December 2014, 11:23:00 UTC | 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. | 31 December 2014, 11:23:00 UTC |
39d8880 | micschro | 17 December 2014, 15:31:03 UTC | 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. | 17 December 2014, 15:31:03 UTC |
5538ec7 | Mihai Bazon | 09 December 2014, 13:21:44 UTC | v2.4.16 | 09 December 2014, 13:21:44 UTC |
f101d64 | Mihai Bazon | 04 December 2014, 12:07:08 UTC | Merge pull request #546 from jacobk/patch-1 Use uglify source map token names if missing | 04 December 2014, 12:07:08 UTC |
fe06fc8 | Cheng Liangyu | 01 December 2014, 05:16:44 UTC | fix base54 | 01 December 2014, 05:16:44 UTC |
f36a1ea | Mihai Bazon | 20 October 2014, 15:12:13 UTC | Add option to allow return outside of functions. Close #288 | 20 October 2014, 15:12:13 UTC |