Richard van Velzen [Sat, 26 Dec 2015 13:26:22 +0000 (14:26 +0100)]
Merge pull request #896 from avdg/do-while-semicolon
Semicolon after do...while statement is optional
Anthony Van de Gejuchte [Fri, 18 Dec 2015 14:25:24 +0000 (15:25 +0100)]
Disable loop optimization for parse-only tests
Anthony Van de Gejuchte [Fri, 18 Dec 2015 13:39:48 +0000 (14:39 +0100)]
Add tests
Anthony Van de Gejuchte [Thu, 17 Dec 2015 22:02:35 +0000 (23:02 +0100)]
Semicolon after do...while statement is optional
Richard van Velzen [Mon, 7 Dec 2015 18:04:56 +0000 (19:04 +0100)]
Merge pull request #879 from ReadmeCritic/master
Update README URLs based on HTTP redirects
ReadmeCritic [Fri, 27 Nov 2015 16:46:55 +0000 (08:46 -0800)]
Update README URLs based on HTTP redirects
Mihai Bazon [Mon, 16 Nov 2015 10:10:47 +0000 (12:10 +0200)]
v2.6.1
Mihai Bazon [Mon, 16 Nov 2015 10:07:15 +0000 (12:07 +0200)]
Fix endless loop
Close #866
Mihai Bazon [Mon, 16 Nov 2015 10:06:12 +0000 (12:06 +0200)]
Limit max iterations for tighten_body
Ref #866
Richard van Velzen [Sat, 14 Nov 2015 11:04:49 +0000 (12:04 +0100)]
Merge pull request #864 from plievone/patch-1
Fix docs for keep_fargs
plievone [Sat, 14 Nov 2015 09:38:00 +0000 (11:38 +0200)]
Fix docs for keep_fargs
Compression options `keep_fargs` and `unsafe` were decoupled in v.2.5.0 (commit
5fd1245), so document actual keep_fargs default.
Mihai Bazon [Thu, 12 Nov 2015 10:46:28 +0000 (12:46 +0200)]
v2.6.0
Mihai Bazon [Thu, 12 Nov 2015 10:18:25 +0000 (12:18 +0200)]
Fix output for "use asm" code from SpiderMonkey AST
(will only work properly if the SM tree contains "raw" properties for
Literal number nodes)
Mihai Bazon [Thu, 12 Nov 2015 09:48:06 +0000 (11:48 +0200)]
Build label def/refs info when figuring out scope
Fix #862
Mihai Bazon [Thu, 12 Nov 2015 09:47:37 +0000 (11:47 +0200)]
Replace util.error with console.log
Mihai Bazon [Wed, 11 Nov 2015 20:15:25 +0000 (22:15 +0200)]
Rework has_directive
It's now available during tree walking, i.e. walker.has_directive("use
asm"), rather than as part of the scope. It's thus no longer necessary
to call `figure_out_scope` before codegen. Added special bits in the
code generator to overcome the fact that it doesn't inherit from
TreeWalker.
Fix #861
Mihai Bazon [Tue, 10 Nov 2015 08:12:30 +0000 (10:12 +0200)]
Merge pull request #854 from kzc/moz-regexp-2
Have mozilla AST RegExpLiteral parser use regex.pattern and regex.flags
Mihai Bazon [Mon, 9 Nov 2015 11:15:20 +0000 (13:15 +0200)]
Fix parsing invalid input
i.e. `x = 1.xe` — because parseFloat("1.xe") returns 1, this parsed as
`x = 1`.
Ref #857
Richard van Velzen [Mon, 9 Nov 2015 10:28:27 +0000 (11:28 +0100)]
Prevent ReDoS by not using a regexp to verify floating point numbers
`parseFloat` will return `NaN` for invalid numbers anyway, which is the check used to throw the parse error.
Fixes #857
kzc [Mon, 2 Nov 2015 18:10:37 +0000 (13:10 -0500)]
simplify mozilla AST RegExpLiteral token parse and handle corner cases of regex.pattern better
kzc [Mon, 2 Nov 2015 17:24:09 +0000 (12:24 -0500)]
Have mozilla AST RegExpLiteral parser use regex.pattern and regex.flags rather than non-standard `raw` property.
kzc [Sun, 1 Nov 2015 15:20:42 +0000 (10:20 -0500)]
rename To_Moz_Literal to To_Moz_RegExp
kzc [Sun, 1 Nov 2015 05:02:52 +0000 (01:02 -0400)]
Fixed RegExp literal in mozilla AST generation/output and added a --dump-spidermonkey-ast flag
kzc [Wed, 28 Oct 2015 21:51:46 +0000 (17:51 -0400)]
`return undefined` optimization no longer uses `return_void_0` option
kzc [Wed, 28 Oct 2015 17:41:41 +0000 (13:41 -0400)]
more tests for `return undefined` optimization
kzc [Wed, 28 Oct 2015 17:25:27 +0000 (13:25 -0400)]
optimize `return undefined` and `return void 0`
Richard van Velzen [Wed, 28 Oct 2015 19:50:01 +0000 (20:50 +0100)]
Allow specification beautify options in tests
Caught an error in #847 as well - `output` wasn't passed anywhere which led to an exception. `options` was available though.
Richard van Velzen [Wed, 28 Oct 2015 19:36:03 +0000 (20:36 +0100)]
Stop building for io.js
Michael Ficarra [Tue, 27 Oct 2015 16:05:21 +0000 (09:05 -0700)]
fixes #845: \v escaping should be restricted to "screw_ie8" mode
Fábio Santos [Tue, 20 Oct 2015 18:48:56 +0000 (19:48 +0100)]
Fix #836
startswithaj [Thu, 15 Oct 2015 06:50:53 +0000 (16:50 +1000)]
Make_string was missing \v and wasnt reversing vertical tabs even though read_escaped_char coverts them
Damian Krzeminski [Wed, 14 Oct 2015 01:05:37 +0000 (21:05 -0400)]
add `--pure-funcs` option
it has the same effect as specifying `pure_funcs` in `--compressor`
option, however it's much easier to use
instead of:
--compressor 'pure_func=["Math.floor","debug","console.logTime"]'
it's now possible:
--compressor --pure-funcs Math.floor debug console.logTime
fixes #684
Damian Krzeminski [Wed, 14 Oct 2015 01:01:36 +0000 (21:01 -0400)]
upgrade yargs 3.5.4 -> 3.10.0
we need a version with better support for 'array' params
see: https://github.com/bcoe/yargs/pull/164
Mihai Bazon [Tue, 13 Oct 2015 06:59:40 +0000 (09:59 +0300)]
Merge pull request #829 from kzc/html_comment_ops
Fix other operator output producing <!-- or -->
kzc [Tue, 13 Oct 2015 05:17:10 +0000 (01:17 -0400)]
Fix other operator output related to <!-- or -->
Mihai Bazon [Mon, 12 Oct 2015 07:27:00 +0000 (10:27 +0300)]
Fix tests
Mihai Bazon [Mon, 12 Oct 2015 07:21:22 +0000 (10:21 +0300)]
Only encode <!-- and --> in strings when inline_script
kzc [Mon, 12 Oct 2015 04:20:42 +0000 (00:20 -0400)]
Output `-- >` instead of `-->` in expressions. Escape `<!--` and `-->` within string literals.
Mihai Bazon [Sun, 11 Oct 2015 15:24:38 +0000 (18:24 +0300)]
v2.5.0
kzc [Wed, 7 Oct 2015 20:31:57 +0000 (16:31 -0400)]
have minify() call figure_out_scope() if needed to produce well formed "use asm" code
kzc [Wed, 7 Oct 2015 19:33:24 +0000 (15:33 -0400)]
get rid of SCOPE_IS_NEEDED as it was always true
kzc [Wed, 7 Oct 2015 17:10:53 +0000 (13:10 -0400)]
Fix handling of "use asm" when no command line flags are passed to uglifyjs. SCOPE_IS_NEEDED is unconditionally true now. Refactored floating point literal parsing to be more in keeping with the AST class design.
SpainTrain [Thu, 24 Sep 2015 20:24:50 +0000 (16:24 -0400)]
Pin dependencies with npm shrinkwrap
* Use `npm run shrinkwrap` to create a shrinkwrap file with all dependencies pinned
* Update dependency `source-map` to latest (Closes #738)
kzc [Tue, 6 Oct 2015 21:05:36 +0000 (17:05 -0400)]
add asm.js test
kzc [Mon, 5 Oct 2015 23:51:09 +0000 (19:51 -0400)]
Add proper support for "use asm"; blocks. Disable -c optimization within "use asm"; sections and preserve floating point literals in their original form. Non-asm.js sections are optimized as before. Asm.js sections can still be mangled and minified of whitespace. No special command line flags are required.
Anthony Van de Gejuchte [Fri, 20 Feb 2015 15:08:01 +0000 (16:08 +0100)]
Implement shebang support
Mihai Bazon [Thu, 24 Sep 2015 16:27:54 +0000 (19:27 +0300)]
Merge pull request #808 from avdg/travis
Add node 4.x in Travis
Anthony Van de Gejuchte [Thu, 24 Sep 2015 15:41:52 +0000 (17:41 +0200)]
Add node 4.x in Travis
Mihai Bazon [Thu, 24 Sep 2015 15:26:23 +0000 (18:26 +0300)]
Disable node 0.8 in Travis
Mihai Bazon [Thu, 24 Sep 2015 15:12:06 +0000 (18:12 +0300)]
Fix mozilla-ast after module loading changes
Need to explicitly qualify stuff now, since it's not evaluated in some
global scope.
Ref #636
Mihai Bazon [Thu, 24 Sep 2015 14:57:47 +0000 (17:57 +0300)]
No longer use `vm` to load code.
Improves performance 2x on node > 0.10.
Ref #636
Mihai Bazon [Thu, 24 Sep 2015 14:55:37 +0000 (17:55 +0300)]
Fix wrap_commonjs to include code first
(code could have directives, i.e. "use strict")
Kyle Mitchell [Mon, 4 May 2015 23:33:09 +0000 (23:33 +0000)]
use a valid SPDX license identifier
Ville Lautanala [Fri, 22 May 2015 22:46:08 +0000 (01:46 +0300)]
Control keeping function arguments with a single option
Richard van Velzen [Sun, 6 Sep 2015 15:06:14 +0000 (17:06 +0200)]
Merge pull request #786 from istr/anonymous-source-map
Allow for anonymous map generation using string type check
Ingo Struck [Thu, 27 Aug 2015 17:38:33 +0000 (19:38 +0200)]
allow for anonymous map generation using string type check
Richard van Velzen [Thu, 6 Aug 2015 19:27:46 +0000 (21:27 +0200)]
Fix bad parsing of `new new x()()` constructs
Fixes #739
Richard van Velzen [Tue, 25 Aug 2015 08:53:35 +0000 (10:53 +0200)]
Don't change sequences that influence lexical binding in calls
Fixes #782
Richard van Velzen [Mon, 10 Aug 2015 18:29:37 +0000 (20:29 +0200)]
Merge pull request #767 from vjeux/208
[Fix] --define replaces SymbolRefs in LHS of assignments
Christopher Chedeau [Mon, 10 Aug 2015 18:22:36 +0000 (11:22 -0700)]
[Fix] --define replaces SymbolRefs in LHS of assignments
See #208 for context
Richard van Velzen [Fri, 7 Aug 2015 12:12:41 +0000 (14:12 +0200)]
Merge pull request #736 from AlbertoGP/master
fromString option, use index from argument array for filename instead of "?"
Richard van Velzen [Fri, 7 Aug 2015 12:11:50 +0000 (14:11 +0200)]
Merge pull request #729 from DrewML/keep_fnames_docs
Add keep_fnames compressor option to README.md
Richard van Velzen [Fri, 31 Jul 2015 13:56:33 +0000 (15:56 +0200)]
Fix mangling of property names which overwrite unmangleable properties
Fixes #747.
Richard van Velzen [Wed, 5 Aug 2015 19:17:42 +0000 (21:17 +0200)]
Merge pull request #753 from Surgo/master
Support wrap and exportAll options for node.js tools.
Mihai Bazon [Thu, 30 Jul 2015 14:25:13 +0000 (17:25 +0300)]
Merge pull request #757 from rvanvelzen/semicolon-fix
Fix semicolon printing when restricting max line length
Richard van Velzen [Wed, 29 Jul 2015 15:57:18 +0000 (17:57 +0200)]
Fix semicolon printing when restricting max line length
Fixes #755
Richard van Velzen [Thu, 30 Jul 2015 13:57:18 +0000 (15:57 +0200)]
Revert "Fix semicolon printing when restricting max line length"
This reverts commit
170e8b519e64463a39d293480e52f97b64d8ab89.
Richard van Velzen [Wed, 29 Jul 2015 15:57:18 +0000 (17:57 +0200)]
Fix semicolon printing when restricting max line length
Fixes #755
Richard van Velzen [Wed, 29 Jul 2015 13:24:45 +0000 (15:24 +0200)]
Replace util.puts in run-tests with console.log
See
d2dda34b2a8de310f26a26e58ed28275ba5ecc7f
XhmikosR [Tue, 14 Apr 2015 20:17:41 +0000 (23:17 +0300)]
Make node.js 0.8 the minimum supported version.
Node.js 0.4 and 0.6 are ancient; things don't work there.
Update Travis CI configuration accordingly.
Note, that the npm update in Travis is needed for 0.8 only at the moment.
Chris Cowan [Thu, 14 May 2015 19:27:56 +0000 (12:27 -0700)]
Re-use the caught exception's error message in the parse error call.
Chris Cowan [Thu, 14 May 2015 19:03:54 +0000 (12:03 -0700)]
Give a good error message if an invalid regular expression is found.
thorn0 [Sat, 18 Jan 2014 13:16:43 +0000 (15:16 +0200)]
Advanced way to specify if a function call might have side effects. #400
Kosei Kitahara [Tue, 28 Jul 2015 12:36:22 +0000 (21:36 +0900)]
Support wrap and exportAll options.
Mihai Bazon [Wed, 22 Jul 2015 13:58:09 +0000 (16:58 +0300)]
v2.4.24
Mihai Bazon [Wed, 22 Jul 2015 13:53:25 +0000 (16:53 +0300)]
Don't attempt to negate non-boolean AST_Binary
Fix #751
Mihai Bazon [Mon, 20 Jul 2015 06:58:01 +0000 (09:58 +0300)]
Merge pull request #735 from kzc/master
optimizations for && and || where left side is constant expression
Mihai Bazon [Tue, 30 Jun 2015 07:07:13 +0000 (10:07 +0300)]
Don't drop parens in a * (b * c). Close #744
Alberto González Palomo [Mon, 15 Jun 2015 16:03:06 +0000 (18:03 +0200)]
fromString option, use index from argument array for filename instead of "?"
The index allows the caller to map things like parse errors back to the
code chunk where they appeared.
kzc [Sun, 14 Jun 2015 21:45:19 +0000 (17:45 -0400)]
spacing
kzc [Sun, 14 Jun 2015 21:44:26 +0000 (17:44 -0400)]
operator && and || optimization: add "else" before "if" as intended
kzc [Fri, 12 Jun 2015 03:22:38 +0000 (23:22 -0400)]
optimizations for && and || where left side is constant expression
Mihai Bazon [Tue, 9 Jun 2015 13:33:21 +0000 (16:33 +0300)]
Merge pull request #733 from jcxplorer/add-mangle-regex-option
Add --mangle-regex option
Joao Carlos [Tue, 9 Jun 2015 12:14:41 +0000 (15:14 +0300)]
Change --mangle-regex to accept a full regex
Joao Carlos [Tue, 9 Jun 2015 11:31:49 +0000 (14:31 +0300)]
Show descriptive error when --mangle-regex is invalid
Joao Carlos [Tue, 9 Jun 2015 10:21:22 +0000 (13:21 +0300)]
Add --mangle-regex option
Andrew Levine [Tue, 2 Jun 2015 20:32:10 +0000 (15:32 -0500)]
Add keep_fnames compressor option to README.md
Mihai Bazon [Wed, 20 May 2015 14:48:30 +0000 (17:48 +0300)]
v2.4.23
Mihai Bazon [Wed, 20 May 2015 13:17:46 +0000 (16:17 +0300)]
Treat \uFEFF as whitespace.
Fix #714
Mihai Bazon [Mon, 18 May 2015 10:58:25 +0000 (13:58 +0300)]
v2.4.22
Mihai Bazon [Mon, 18 May 2015 10:56:04 +0000 (13:56 +0300)]
Fix compressing conditionals
Only transform foo() ? EXP(x) : EXP(y) into EXP(foo() ? x : y) if EXP has no
side effects.
Fix #710
Mihai Bazon [Wed, 13 May 2015 19:03:00 +0000 (22:03 +0300)]
fix again reserved props
Mihai Bazon [Thu, 7 May 2015 12:01:16 +0000 (15:01 +0300)]
Make reserved names take priority over the name cache
Mihai Bazon [Tue, 5 May 2015 07:11:38 +0000 (10:11 +0300)]
Only drop the BOM when it's the first character.
Close #704
Mihai Bazon [Mon, 4 May 2015 16:14:42 +0000 (19:14 +0300)]
v2.4.21
Mihai Bazon [Mon, 4 May 2015 14:55:42 +0000 (17:55 +0300)]
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.
Mihai Bazon [Mon, 4 May 2015 12:07:16 +0000 (15:07 +0300)]
Remove deprecated calls to utils.print/utils.error
Close #542, #641, #647
Mihai Bazon [Mon, 4 May 2015 11:49:17 +0000 (14:49 +0300)]
Avoid spurious brackets when dropping unused vars
Fix #702
Mihai Bazon [Thu, 23 Apr 2015 09:08:19 +0000 (12:08 +0300)]
Fix parsing strings with literal DOS newlines
(should not set newline_before)
Fix #693
Mihai Bazon [Wed, 22 Apr 2015 14:34:49 +0000 (17:34 +0300)]
If name_cache is specified, do rename cached properties
(even if --mangle-props is not there)