Commit Graph

2702 Commits

Author SHA1 Message Date
Richard van Velzen 464a942a95 Merge pull request #736 from AlbertoGP/master
fromString option, use index from argument array for filename instead of "?"
2015-08-07 14:12:41 +02:00
Richard van Velzen d7a4a4a462 Merge pull request #729 from DrewML/keep_fnames_docs
Add keep_fnames compressor option to README.md
2015-08-07 14:11:50 +02:00
Richard van Velzen 759b3f7d6d Fix mangling of property names which overwrite unmangleable properties
Fixes #747.
2015-08-05 21:18:39 +02:00
Richard van Velzen 958b6c2e57 Merge pull request #753 from Surgo/master
Support wrap and exportAll options for node.js tools.
2015-08-05 21:17:42 +02:00
Mihai Bazon ab15d676d7 Merge pull request #757 from rvanvelzen/semicolon-fix
Fix semicolon printing when restricting max line length
2015-07-30 17:25:13 +03:00
Richard van Velzen 66761d7ecf Fix semicolon printing when restricting max line length
Fixes #755
2015-07-30 16:13:32 +02:00
Richard van Velzen 3afad58a93 Revert "Fix semicolon printing when restricting max line length"
This reverts commit 170e8b519e.
2015-07-30 15:57:18 +02:00
Richard van Velzen 170e8b519e Fix semicolon printing when restricting max line length
Fixes #755
2015-07-29 17:57:18 +02:00
Richard van Velzen f8684f418a Replace util.puts in run-tests with console.log
See d2dda34b2a
2015-07-29 15:24:45 +02:00
XhmikosR 881bda7f59 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.
2015-07-29 15:21:01 +02:00
Chris Cowan 9854deb626 Re-use the caught exception's error message in the parse error call. 2015-07-29 15:06:52 +02:00
Chris Cowan d6814050dd Give a good error message if an invalid regular expression is found. 2015-07-29 15:05:59 +02:00
thorn0 252fc65558 Advanced way to specify if a function call might have side effects. #400 2015-07-29 14:36:42 +02:00
Kosei Kitahara 8108c7ffaf Support wrap and exportAll options. 2015-07-28 21:36:22 +09:00
Mihai Bazon ba9936a572 v2.4.24 v2.4.24 2015-07-22 16:58:09 +03:00
Mihai Bazon 905b601178 Don't attempt to negate non-boolean AST_Binary
Fix #751
2015-07-22 16:55:55 +03:00
Mihai Bazon 63fb2d5a44 Merge pull request #735 from kzc/master
optimizations for && and || where left side is constant expression
2015-07-20 09:58:01 +03:00
Mihai Bazon 85a5fc0aeb Don't drop parens in a * (b * c). Close #744 2015-06-30 10:10:29 +03:00
Alberto González Palomo 4fba3e0b80 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.
2015-06-15 18:03:06 +02:00
kzc 9d398d999c spacing 2015-06-14 17:45:19 -04:00
kzc f47b2b52a5 operator && and || optimization: add "else" before "if" as intended 2015-06-14 17:44:26 -04:00
kzc fedb6191a1 optimizations for && and || where left side is constant expression 2015-06-11 23:22:38 -04:00
Mihai Bazon 5bf617ebde Merge pull request #733 from jcxplorer/add-mangle-regex-option
Add --mangle-regex option
2015-06-09 16:33:21 +03:00
Joao Carlos 0b82e1cd5b Change --mangle-regex to accept a full regex 2015-06-09 15:14:41 +03:00
Joao Carlos 9aef34a816 Show descriptive error when --mangle-regex is invalid 2015-06-09 14:31:49 +03:00
Joao Carlos 0ac6918a41 Add --mangle-regex option 2015-06-09 14:16:50 +03:00
Andrew Levine 65ee5af78c Add keep_fnames compressor option to README.md 2015-06-02 15:32:10 -05:00
Mihai Bazon c6fa291571 v2.4.23 v2.4.23 2015-05-20 17:48:30 +03:00
Mihai Bazon bce4307e9e Treat \uFEFF as whitespace.
Fix #714
2015-05-20 16:17:46 +03:00
Mihai Bazon 96ad94ab41 v2.4.22 v2.4.22 2015-05-18 13:58:25 +03:00
Mihai Bazon a5b60217ce Fix compressing conditionals
Only transform foo() ? EXP(x) : EXP(y) into EXP(foo() ? x : y) if EXP has no
side effects.

Fix #710
2015-05-18 13:56:04 +03:00
Mihai Bazon 44fd6694eb fix again reserved props 2015-05-13 22:03:00 +03:00
Mihai Bazon e48db3a8b6 Make reserved names take priority over the name cache 2015-05-07 15:01:16 +03:00
Mihai Bazon e637bdaf4e Only drop the BOM when it's the first character.
Close #704
2015-05-05 10:11:38 +03:00
Mihai Bazon d558abbdb7 v2.4.21 v2.4.21 2015-05-04 19:14:42 +03:00
Mihai Bazon 4aed0830e5 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.
2015-05-04 17:55:42 +03:00
Mihai Bazon d2dda34b2a Remove deprecated calls to utils.print/utils.error
Close #542, #641, #647
2015-05-04 15:07:16 +03:00
Mihai Bazon c3a10c135e Avoid spurious brackets when dropping unused vars
Fix #702
2015-05-04 14:49:17 +03:00
Mihai Bazon 92e4340732 Fix parsing strings with literal DOS newlines
(should not set newline_before)

Fix #693
2015-04-23 12:08:19 +03:00
Mihai Bazon 7b22f2031f If name_cache is specified, do rename cached properties
(even if --mangle-props is not there)
2015-04-22 17:34:49 +03:00
Mihai Bazon 3b14582d6b Fix tests 2015-04-17 11:28:59 +03:00
Mihai Bazon 274e1b3dc7 Drop NaN -> 0/0 transformation.
Fix #687
2015-04-17 11:26:36 +03:00
Fábio Santos de58b0289d 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.
2015-04-14 20:26:47 +02:00
XhmikosR efea52a4f4 Normalize package.json.
* Specify the files to install in package.json
* Add missing properties
* Follow `npm init`'s scheme
2015-04-14 20:17:03 +02:00
Jordan Harband 763bd36b60 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.
2015-04-14 20:06:09 +02:00
Mihai Bazon 0552dbd93c v2.4.20 v2.4.20 2015-04-13 18:59:21 +03:00
Mihai Bazon 18c63ff3d8 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
2015-04-13 17:29:48 +03:00
Mihai Bazon e04ef56243 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)
2015-04-10 11:33:29 +03:00
Mihai Bazon 5d60484553 More fixes for the breaking changes in yargs
Close #670
2015-04-05 13:20:22 +03:00
Mihai Bazon 3c846e6f7b Merge pull request #669 from galvanix/documentation-inSourceMap
Document passing source maps directly to minify() using inSourceMap
2015-04-04 15:29:03 +03:00