https://github.com/mishoo/UglifyJS

sort by:
Revision Author Date Message Commit Date
cf45e2f fixup for #1585 (#1589) As patched on `harmony`, `statement()` is the only user of `embed_tokens()` with a missing error branch. Updated test case and match up with `harmony` to facilitate future merging. 10 March 2017, 02:49:41 UTC
8354758 v2.8.11 09 March 2017, 20:17:21 UTC
9e6b128 fix catch variable reference in IE8 (#1587) `AST_Scope.def_variable()` will overwrite `AST_Symbol.thedef`, so save a copy before calling. fixes #1586 09 March 2017, 19:15:21 UTC
93cdb19 Correctly raise a parse exception with a missing loop body (#1585) 09 March 2017, 19:08:43 UTC
b633706 fix & improve function argument compression (#1584) - one-use function call => IIFE should take `eval()` & `arguments` into account - if unused parameter cannot be eliminated, replace it with `0` fixes #1583 09 March 2017, 11:11:05 UTC
e9920f7 v2.8.10 08 March 2017, 21:48:06 UTC
7e465d4 scan RHS of dropped assignments (#1581) - similar case as #1578 but against #1450 instead - fix `this` binding in #1450 as well closes #1580 08 March 2017, 21:22:27 UTC
aa80ee3 remove checkboxes from Issues template 08 March 2017, 11:19:54 UTC
80e8176 explain how to make a proper bug report (#1579) fixes #1574 08 March 2017, 10:56:01 UTC
711f88d scan assignment value in drop_unused() (#1578) those were not optimised for `unused` before, which made it necessary for `reduce_vars` to have separate steps for `keep_fnames` docs update by @kzc closes #1577 08 March 2017, 10:37:32 UTC
344d11d v2.8.9 08 March 2017, 04:41:22 UTC
c7cdcf0 fix function name eliminiation (#1576) Function expression can be assigned to a variable and be given a name. Ensure function name is the reduced variable before clearing it out. fixes #1573 fixes #1575 08 March 2017, 04:39:57 UTC
3ee5574 only run benchmark & jetstream on CI (#1571) 07 March 2017, 22:00:51 UTC
dedbeef plan B for IE8 do-while semi-colon fix (#1572) - omitting trailing semi-colon in do-while breaks non-browser parser, e.g. uglify-js 1.x - trailing semi-colon only breaks IE8 if followed by `else` or `while` - always use braces in do-while body to workaround 2nd case with no size loss in compression fixes #1568 07 March 2017, 21:07:05 UTC
bd6dee5 fix return from recursive IIFE (#1570) `side-effects` did not account for IIFEs being able to reference itself thus making its return value potentially significant 07 March 2017, 19:31:51 UTC
144052c v2.8.8 07 March 2017, 11:58:41 UTC
65c848c include benchmark.js in test suite (#1564) - report file sizes and overall run time - exit with non-zero code upon error 07 March 2017, 11:25:12 UTC
8a8a94a fix deep cloning of labels (#1565) `AST_Label.references` get `.initialize()` to `[]` every time after `.clone()` So walk down the tree to pick up the cloned `AST_LoopControl` pieces and put it back together. 07 March 2017, 10:38:27 UTC
8153b7b transform function calls to IIFEs (#1560) - expose function body to call sites for potential optimisations - suppress substitution of variable used within `AST_Defun` 07 March 2017, 07:37:52 UTC
d787d70 avoid substitution of global variables (#1557) - unless `toplevel` is enabled - global `const` works as before 06 March 2017, 19:11:03 UTC
3ac2421 collapse_vars: do not replace a constant in loop condition or init (#1562) 06 March 2017, 17:42:33 UTC
a9fc9dd suppress semicolons after do/while (#1556) - unless both `beautify` & `screw-ie8` are enabled - deprecate workaround for if-do-while-else fixes #186 06 March 2017, 09:31:35 UTC
a5d62a3 v2.8.7 05 March 2017, 09:17:08 UTC
067e5a5 fixup for #1553 (#1555) - `++a` is the one that is foldable - transform `a++` into `++a` for better optimisation 05 March 2017, 09:15:37 UTC
33b5f31 v2.8.6 05 March 2017, 07:48:28 UTC
35a849d collapse assignment with adjacent subsequent usage (#1553) - consolidate `cascade` optimisations - support ++/-- postfixes - remove redundant optimisation identified in #1460 fixes #368 05 March 2017, 06:56:14 UTC
b70591b handle variable declaration within catch blocks (#1546) accounts for IE8- scoping 05 March 2017, 05:13:44 UTC
b33e7f8 improve `unsafe` on undefined (#1548) `unsafe` turns undefined keyword into a variable of the same name if found, but that interferes with other related optimisations. Keep track of such transformations to ensure zero information loss in the process. 05 March 2017, 05:09:27 UTC
1f0333e stay safe with constants in IE8- (#1547) - `undefined` etc. can be redefined at top-level for IE8-, so disable related optimisations - fixed `--support-ie8` catch mangle bug 05 March 2017, 04:51:11 UTC
eb98a7f fix handling of shebang and preamble (#1545) fixes #1332 05 March 2017, 04:16:02 UTC
78d1bb9 fix a corner case in #1530 (#1552) 05 March 2017, 04:12:59 UTC
ea9ab9f resolve issue with outdated version of async (#1549) fixes #746 04 March 2017, 17:54:20 UTC
ce54c9c disallow collapse_vars constant replacement in for-in statements (#1543) 03 March 2017, 18:39:54 UTC
07accd2 process code with implicit return statement (#1522) Bookmarklet for instance implicitedly assumes a "completion value" without using `return`. The `expression` option now supports such use cases. Optimisations on IIFEs also enhanced. fixes #354 fixes #543 fixes #625 fixes #628 fixes #640 closes #1293 03 March 2017, 10:13:07 UTC
18059cc compress numerical expressions (#1513) safe operations - `a === b` => `a == b` - `a + -b` => `a - b` - `-a + b` => `b - a` - `a+ +b` => `+b+a` associative operations (bit-wise operations are safe, otherwise `unsafe_math`) - `a + (b + c)` => `(a + b) + c` - `(n + 2) + 3` => `5 + n` - `(2 * n) * 3` => `6 * n` - `(a | 1) | (2 | d)` => `(3 | a) | b` fixes #412 03 March 2017, 10:04:32 UTC
b5e0e8c facilitate fix for #1531 (#1542) 02 March 2017, 23:12:24 UTC
e5cb927 v2.8.5 02 March 2017, 21:14:21 UTC
17b8135 fix chained assignment with `unused` (#1540) When #1450 optimises `a=b=42`, it stops after the first variable even if both are unused. fixes #1539 02 March 2017, 20:45:20 UTC
4d63d4f collapse_vars should not replace constant in for-in init section (#1538) fixes #1537 02 March 2017, 19:51:15 UTC
70d72ad properly cover all cases of for-in loop variables (#1536) 02 March 2017, 18:39:57 UTC
fe9227a fix reference marking in for-in loops (#1535) fixes #1533 02 March 2017, 16:56:06 UTC
b49e142 disable do{...}while(false) optimisation (#1534) - fails to handle `break` in body fixes #1532 02 March 2017, 16:54:41 UTC
ee3b39b optimize trivial IIFEs returning constants (#1530) 02 March 2017, 07:11:40 UTC
9699ffb trim unused invocation parameters (#1526) 02 March 2017, 03:33:59 UTC
fdc9b94 minor improvement to string optimisation (#1514) - "" + "a" => "a" - "" + a + "b" => a + "b" - "a" + "" => "a" (improving on #45) 02 March 2017, 03:31:39 UTC
40ceddb v2.8.4 01 March 2017, 16:24:49 UTC
7aa6911 fix corner cases in `reduce_vars` (#1524) Avoid variable substitution in the following cases: - use of variable before declaration - declaration within conditional code blocks - declaration within loop body fixes #1518 fixes #1525 01 March 2017, 16:20:53 UTC
bff7ad6 v2.8.3 01 March 2017, 07:28:46 UTC
c2334ba fix crash on missing `props` to `string_template()` (#1523) Patched up `make_node()` without `orig`. There may be other cases where `start` could be missing, so make it print "undefined" instead of crashing. fixes #1518 01 March 2017, 07:25:26 UTC
fb2b6c7 v2.8.2 28 February 2017, 20:46:12 UTC
f5cbe19 invert `reduce_vars` tracking flag (#1519) Modules like webpack and grunt-contrib-uglify still uses `ast.transform(compressor)` before `Compressor.compress(ast)` was introduced. Workaround this compatibility issue by deactivating `reduce_vars` in such case. Also fix use case with omitted `options` when calling `Compressor()`. fixes #1516 28 February 2017, 20:12:10 UTC
b34fa11 fix `evaluate` on object getter & setter (#1515) 28 February 2017, 18:03:47 UTC
320984c v2.8.1 28 February 2017, 16:27:08 UTC
4365a51 temporarily disables `reduce_vars` (#1517) ... as we investigate #1516 28 February 2017, 16:25:43 UTC
858e6c7 warn & drop `#__PURE__` iff IIFE is dropped (#1511) - consolidate `side-effects` optimisations - improve string `+` optimisation - enhance literal & `conditionals` optimisations 27 February 2017, 18:25:44 UTC
0b0296e v2.8.0 26 February 2017, 19:47:54 UTC
872270b improve error messages (#1506) - better inheritance of `Error` sub-classes - mark parse error against source in CLI closes #235 closes #348 closes #524 closes #1356 closes #1405 26 February 2017, 19:40:54 UTC
b1c593a add harmony branch details in README (#1507) 26 February 2017, 17:55:24 UTC
13be50a faster tree transversal (#1462) - convert `[].forEach()` to for-loops 25 February 2017, 21:58:26 UTC
16cd5d5 consolidate `evaluate` & `reduce_vars` (#1505) - improve marking efficiency - apply smarter `const` replacement to `var` fixes #1501 25 February 2017, 16:40:33 UTC
834f9f3 update docs for `pure_funcs` & `drop_console` (#1503) closes #1362 closes #1399 24 February 2017, 20:13:10 UTC
cf0951f allow --in-source-map inline (#1490) - limited to one input file (or `stdin`) - only works with built-in parser fixes #520 24 February 2017, 20:11:21 UTC
852f784 Avoid using exports when undefined (#1471) Makes direct usage within web browser easier, even if officially unsupported. 24 February 2017, 00:51:24 UTC
229e42c Merge pull request #1485 from alexlamsl/merge-2.8.0 2.8.0 staging 23 February 2017, 23:33:57 UTC
4e49302 enable `collapse_vars` & `reduce_vars` by default - fix corner cases in `const` optimisation - deprecate `/*@const*/` fixes #1497 closes #1498 23 February 2017, 17:46:57 UTC
1e51586 Support marking a call as pure A function call or IIFE with an immediately preceding comment containing `@__PURE__` or `#__PURE__` is deemed to be a side-effect-free pure function call and can potentially be dropped. Depends on `side_effects` option. `[#@]__PURE__` hint will be removed from comment when pure call is dropped. fixes #1261 closes #1448 21 February 2017, 06:24:18 UTC
d48a308 Fix: AST_Accessor missing start / end tokens fixes #1492 closes #1493 21 February 2017, 05:32:16 UTC
26fbeec fix `pure_funcs` & improve `side_effects` - only drops side-effect-free arguments - drop side-effect-free parts with discarded value from `AST_Seq` & `AST_SimpleStatement` closes #1494 21 February 2017, 05:31:59 UTC
8898b8a clean up `max_line_len` - never exceed specified limit - otherwise warning is shown - enabled only for final output closes #1496 21 February 2017, 05:29:58 UTC
ec64acd introduce `unsafe_proto` - `Array.prototype.slice` => `[].slice` closes #1491 21 February 2017, 05:29:58 UTC
ac0b61e remove extraneous spaces between ++/+/--/- fixes #1377 closes #1488 21 February 2017, 05:29:58 UTC
c06a50f Add .gitattributes to checkout lf eol style closes #1487 21 February 2017, 05:29:58 UTC
09f9ae2 improve `--beautify bracketize` reduce whitespaces from if-else statements fixes #1482 closes #1483 21 February 2017, 05:29:58 UTC
7e6331b add benchmark & JetStream tests - `test/benchmark.js` measures performance - `test/jetstream.js` verifies correctness - configurable mangle/compress/output options closes #1479 21 February 2017, 05:29:58 UTC
e275148 enhance `global_defs` - support arrays, objects & AST_Node - support `"a.b":1` on both cli & API - emit warning if variable is modified - override top-level variables fixes #1416 closes #1198 closes #1469 21 February 2017, 05:29:58 UTC
974247c evaluate AST_SymbolRef as parameter fix invalid boolean conversion now exposed in `make_node_from_constant()` closes #1477 21 February 2017, 05:29:58 UTC
a0f4fd3 improve reduce_vars and fix a bug - update modified flag between compress() passes - support IIFE arguments - fix corner case with multiple definitions closes #1473 21 February 2017, 05:29:58 UTC
b8b133d improve keep_fargs & keep_fnames - utilise in_use_ids instead of unreferenced() - drop_unused now up-to-date for subsequent passes closes #1476 21 February 2017, 05:29:58 UTC
c525a2b fix duplicated test names previously test cases with the same name would be skipped except for the last one `test/run-test.js` will now report duplicated names as errors closes #1461 21 February 2017, 05:29:58 UTC
6ffbecb smarter const replacement taking name length into account closes #1459 21 February 2017, 05:29:58 UTC
f0ff618 clean up `negate_iife` - remove extra tree scanning phase for `negate_iife` - `negate_iife` now only deals with the narrowest form, i.e. IIFE sitting directly under `AST_SimpleStatement` - `booleans`, `conditionals` etc. will now take care the rest via more accurate accounting - `a(); void b();` => `a(); b();` fixes #1288 closes #1451 21 February 2017, 05:29:58 UTC
6b3c49e improve string concatenation shuffle associative operations to minimise parentheses and aid other uglification efforts closes #1454 21 February 2017, 05:29:57 UTC
f584ca8 `-c sequences=N` suboptimal at N expression cutoff N = 2: a; b; c; d; was: a, b; c; d; now: a, b; c, d; fixes #1455 closes #1457 21 February 2017, 05:29:57 UTC
ae4db00 tweak do-while loops - `do{...}while(false)` => `{...}` - clean up `AST_While` logic closes #1452 21 February 2017, 05:29:57 UTC
100307a fixes & improvements to [].join() fixes - [a].join() => "" + a - ["a", , "b"].join() => "a,,b" - ["a", null, "b"].join() => "a,,b" - ["a", undefined, "b"].join() => "a,,b" improvements - ["a", "b"].join(null) => "anullb" - ["a", "b"].join(undefined) => "a,b" - [a + "b", c].join("") => a + "b" + c closes #1453 21 February 2017, 05:29:57 UTC
148047f drop unused: toplevel, assign-only - assign statement does not count towards variable usage by default - only works with assignments on the same scope level as declaration - can be disabled with `unused` set to "keep_assign" - `toplevel` to drop unused top-level variables and/or functions - `top_retain` to whitelist top-level exceptions closes #1450 21 February 2017, 05:29:57 UTC
d11dca3 fix stray else in compress with conditionals=false closes #1449 21 February 2017, 05:29:57 UTC
e5badb9 enable typeof "undefined" for general use move out of unsafe, guard corner case with screw_id8 instead closes #1446 18 February 2017, 11:01:42 UTC
fa668a2 fix corner case in keep_fnames happens when inner function: - just below top level - not referenced - `unused` is disabled closes #1445 18 February 2017, 11:00:54 UTC
686a496 remove unused AST_Scope.nesting & AST_SymbolRef.frame they are computed but never used closes #1444 18 February 2017, 10:59:40 UTC
11676f9 fix crash in unsafe replacement of undefined remove extraneous call to AST_SymbolRef.reference() closes #1443 18 February 2017, 10:58:23 UTC
dd31d12 Improve optimizing `function() { if(c){return foo} bar();}` closes #1437 18 February 2017, 10:56:18 UTC
eb55d8a Merge pull request #1481 from anatdagan/propsmangle_only_identifiers verify that property names after mangle are legal 12 February 2017, 08:59:43 UTC
81f1df1 in mangle_names there is a check that the variable name is legal and that it is not a reserved word. This should apply to propsmangle as well. 10 February 2017, 12:13:47 UTC
7f8d72d update test (#1441) improved reduce_vars & binary operands produce more optimal results 26 January 2017, 11:59:32 UTC
1eaa211 fix mangling collision with keep_fnames (#1431) * fix mangling collision with keep_fnames fixes #1423 * pass mangle options to figure_out_scope() bring command-line in line with minify() 26 January 2017, 11:18:28 UTC
0610c02 optimise binary operands with evaluate() (#1427) - remove call to evaluate() in is_constant() and let nested optimize() does its job instead - reject RegExp in is_constant() and remove special case logic under collapse_vars - operands to conditionals optimisation are now always evaluate()-ed - throw error in constant_value() instead of returning undefined to catch possible bugs, similar to make_node_from_constant() - optimise binary boolean operators under `evaluate` instead of `conditionals` 26 January 2017, 11:16:50 UTC
0d7d491 augment evaluate to extract within objects (#1425) - gated by `unsafe` - replaces previous optimisation specific to String.length - "123"[0] => 1 - [1, 2, 3][0] => 1 - [1, 2, 3].length => 3 - does not apply to objects with overridden prototype functions 26 January 2017, 11:14:18 UTC
4828484 add missing LHS cases which global_defs should avoid 19 January 2017, 20:06:28 UTC
ec2e5fa Have minify() and tests use figure_out_scope() as uglifyjs CLI does Clarify docs, help and tests for --support-ie8 and screw_ie8=false 19 January 2017, 16:14:33 UTC
back to top