https://github.com/mishoo/UglifyJS

sort by:
Revision Author Date Message Commit Date
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
da17766 Add preventive test involving non-ascii function identifiers 19 January 2017, 16:13:33 UTC
0913db8 Add note about name mangling when using --mangle-props=unquoted (#1314) 19 January 2017, 15:47:10 UTC
5c7705f remove npm-shrinkwrap.json to work around npm@4.0.2 bug (#1384) 30 November 2016, 17:09:52 UTC
f637248 v2.7.5 29 November 2016, 21:29:59 UTC
98f3306 Generate source map data from normalized files If using `inSourceMap` this fix will ensure the copying of `sourcesContent` is based on potentially normalized `sources` values (https://github.com/mozilla/source-map/blob/master/lib/source-map-consumer.js#L304-L309). For example `normalize` (https://github.com/mozilla/source-map/blob/master/lib/util.js#L80-L123) will rewrite `./dist/mySource.js` to `dist/mySource.js` in the target `_sources` of the `SourceMapConsumer`. As a result `orig_map.sourceContentFor(source, true);` would return `null` since the orginal `source` was no longer available in the consumer. By using the keys generating from the `SourceMapConsumer.constructor` consistency is ensured. 29 November 2016, 19:42:56 UTC
a7b3b0d docs: add doc for option.outFileName 29 November 2016, 19:29:12 UTC
0a35acb feat: add option.outFileName for JS API, if absense, sourceMap.file field will deduced 29 November 2016, 19:29:12 UTC
2a9989d Add --mangle-props-debug and fix --mangle-props=unquoted collision Patch by @AshleyScirra Based on: PR #1316 Renamed the CLI debug option to --mangle-props-debug Fixes: #1321 name collision in --mangle-props=unquoted 29 November 2016, 19:25:39 UTC
79b98a9 Do not overwrite options.comments + cleanup 29 November 2016, 19:24:08 UTC
057de57 Pass mangle options to figure_out_scope before mangling in tests 27 October 2016, 20:55:49 UTC
557b3e4 v2.7.4 23 October 2016, 19:46:22 UTC
8d74f34 Don't filter shebangs when using the 'some' comment filter Also clarify documentation a bit more about using regexp as filter 23 October 2016, 19:31:03 UTC
266ddd9 fix uses_arguments handling (broken since 6605d1578351) Using the symbol declaration tracking of UglifyJS doesn't make sense here anyway, `arguments` always comes from something in the current scope. fixes #1299 23 October 2016, 19:29:18 UTC
e51c6ba Add an option for writing inline source map 23 October 2016, 19:21:39 UTC
6389e52 Remove console.log and add extra test case 06 October 2016, 12:11:32 UTC
e05510f Add an option to wrap IIFEs in parenthesis For #1307. 06 October 2016, 12:11:32 UTC
fc9804b Fix (typeof side_effect()) in boolean context Fixes #1289 with suggestion by @rvanvelzen 06 October 2016, 11:50:11 UTC
4761d07 Optimize unmodified variables 01 October 2016, 09:36:11 UTC
0111497 Make all comment options in cli available in js api Also removing more code within "loop" while at it. 06 September 2016, 15:54:45 UTC
7d8dea3 Merge pull request #1277 from kzc/fix-string-plus-opt Account for side effects in `string + expr` optimization 01 September 2016, 13:32:22 UTC
25fc027 Account for side effects in `string + expr` optimization 01 September 2016, 13:24:56 UTC
0bd8053 implement optimization: (x = 2 * x) ---> (x *= 2) 30 August 2016, 12:43:02 UTC
1a78bbc v2.7.3 17 August 2016, 18:34:27 UTC
8430123 Fix negate_iife transform to return a correct tree for nested IIFEs Fix for #1256, partially reverts d854523783b4 17 August 2016, 09:55:59 UTC
614db97 v2.7.2 17 August 2016, 06:51:23 UTC
d854523 Fix negate_iife regression #1254 17 August 2016, 05:29:34 UTC
781f26e v2.7.1 14 August 2016, 20:02:01 UTC
37f4395 Add missing `{` in README Also fix a trivial style mistake. 14 August 2016, 19:52:39 UTC
de619ae Fix --mangle-props and --mangle-props=unquoted Fixes: #1247 Fix --mangle-props and --name-cache inconsistency. AST_Dot and AST_Sub properties are now mangled by --mangle-props without regard to being used in an assignment statement. Note: if --mangle-props is used then *all* javascript files used must be uglified with the same mangle options. Fix the ignore_quoted=true mangle option, also known as `--mangle-props=unquoted`. If a given property is quoted anywhere it will not be mangled in any quoted or non-quoted context. 14 August 2016, 19:51:25 UTC
86859f6 Additional object literal property tests 14 August 2016, 19:49:43 UTC
dcdcfe4 Add input file glob support to minify() 14 August 2016, 19:46:38 UTC
72306b9 Add simple file globbing to bin/uglifyjs for Windows 14 August 2016, 19:46:38 UTC
38756b1 Moved test input files to test/input. 14 August 2016, 19:40:14 UTC
85a09fc Added test for #1236 14 August 2016, 19:40:14 UTC
307b88d Fixed sourceMapIncludeSources and inSourceMap = string combination of the UglifyJS.minify function. 14 August 2016, 19:40:14 UTC
fb049d3 Fix unneeded parens around unary args in new expression. 14 August 2016, 19:38:38 UTC
67cca43 Test reparsing test/compress/*.js output 14 August 2016, 19:27:23 UTC
642273c Legacy octal integer strict mode fixes 21 July 2016, 12:42:16 UTC
e8b23c7 Build with AppVeyor on windows 17 July 2016, 18:00:41 UTC
9edbe93 Fix the document of keep_fnames option 17 July 2016, 17:50:48 UTC
af37eca Source map URL override from programmatic API 17 July 2016, 17:39:08 UTC
41a9329 lib/sourcemap.js: Copy sourceContent from old souce-map to the new source-map. Should fix #882 17 July 2016, 17:36:15 UTC
7eb52d2 Keep const in own scope while compressing - Fixes #1205 - Fix provided by @kzc 15 July 2016, 11:20:52 UTC
eb63fec Fix mangle with option keep_fnames=true for Safari. Fixes: #1202 15 July 2016, 11:18:14 UTC
2d8af89 Fix error style for regex errors 15 July 2016, 11:14:30 UTC
2650182 Backport mocha with test from harmony 03 July 2016, 22:51:09 UTC
572b97b v2.7.0 03 July 2016, 19:46:14 UTC
698705a Don't convert all strings to directives from moz-ast 03 July 2016, 10:36:57 UTC
debc525 Introduce a test that tests the --self build 01 July 2016, 07:46:05 UTC
5576e27 Document that the smallest sequences optimization length is 2 and a sequences value of 1 is considered to be `true` - which will be set to the default value of 200. 01 July 2016, 07:41:31 UTC
b40d5de Change the default sequences limit to 200 to speed up compress. Has little or no impact on minification size in the majority of cases but can speed up rollup builds significantly. This sequences change also has the beneficial side effect of avoiding "stack size exceeded" errors on very large input files. The user is free to alter the sequences limit if they are so inclined. The previous sequences limit was 2000. 20 is often sufficient. 01 July 2016, 07:41:31 UTC
b7ef784 Allow sequences maximum length to be user configurable. 01 July 2016, 07:41:31 UTC
85924bb Allow input files to be map (url->filename) 30 June 2016, 20:23:59 UTC
a97690f Various LineTerminator changes * Escaped newlines should also produce SyntaxError * Fix multiline comment parsing and add tests * Adapt makePredicate to handle \u2028 and \u2029 * Move up nlb check in regex so it's checked before any escape handling * Change error messages to conform ecma standard * Find_eol not recornizing \u2028 and \u2029 as line terminator * Remove \u180e as it is removed in unicode 6.3.0 from the category zs 30 June 2016, 20:12:50 UTC
02c6382 Enable --screw-ie8 by default. catch identifier is mangled correctly for ES5 standards-compliant JS engines by default. Unconditionally use the ie8 if/do-while workaround whether or not --screw-ie8 is enabled. To support non-standard ie8 javascript use: uglifyjs --support-ie8 30 June 2016, 19:49:48 UTC
back to top