Bryce Cronkite-Ratcliff
5c02d65ddb
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.
2015-01-24 00:33:02 -08:00
Mihai Bazon
d36067cd35
Merge pull request #615 from avdg/unicode
...
Give parser more unicode support
2015-01-20 13:00:31 +02:00
Anthony Van de Gejuchte
f1b2134dd1
Add test
2015-01-20 00:31:44 +01:00
Anthony Van de Gejuchte
74cda80d3b
Add unicode digit parsing support
2015-01-20 00:17:24 +01:00
Anthony Van de Gejuchte
9a3a848cc8
Update unicode letter
2015-01-20 00:17:03 +01:00
Tal Ater
a1a4c2ada7
Optimize conditionals where the consequent and alternative are both booleans and not equivalent
2015-01-13 18:27:21 +01:00
Mihai Bazon
189dbf02b6
Merge pull request #612 from rvanvelzen/issue-611
...
Replace the correct node when replacing in `void` sequences
2015-01-12 18:18:55 +02:00
Richard van Velzen
42ecd42ac0
Replace the correct node when replacing in void sequences
...
Close #611 .
2015-01-12 17:09:34 +01:00
Mihai Bazon
a10f6a96d7
Merge pull request #482 from arty-name/inline-ng-inject
...
added @ngInject support for inline functions
2015-01-11 12:10:42 +02:00
Mihai Bazon
0d232a1422
Merge pull request #606 from rvanvelzen/document-double-dash
...
Document `--` for usage in CLI class
2015-01-07 23:17:08 +02:00
Richard van Velzen
285bffd2c6
Document -- for usage in CLI class
...
Close #518
2015-01-07 19:04:10 +01:00
Mihai Bazon
61c233a08e
Fix make_node_from_constant for Regexp-s
...
Close #588
2015-01-07 11:20:04 +02:00
Mihai Bazon
d2d716483a
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
2015-01-06 14:01:35 +02:00
Ingvar Stepanyan
f16033aafd
Location fix for Mozilla AST start token.
2015-01-06 11:32:41 +01:00
Ingvar Stepanyan
ae5366a31d
Track ending lines/columns; fix end locations in Mozilla AST.
2015-01-06 11:32:41 +01:00
Mihai Bazon
6b23cbc852
AST_Do nodes: walk body before condition
2015-01-06 12:29:07 +02:00
Richard van Velzen
7f9bc9e863
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.
2015-01-05 19:10:32 +01:00
Mihai Bazon
13219cebcb
Fix handling \r\n
...
Close #437
2015-01-05 12:14:42 +02:00
Mihai Bazon
93a6e5780e
Declare boolean type for --keep-fnames
2015-01-05 11:20:00 +02:00
Mihai Bazon
fe55e0d93d
Merge branch 'keep-function-expression-names' of https://github.com/rvanvelzen/UglifyJS2
2015-01-05 11:11:38 +02:00
Mihai Bazon
e1f0747e4c
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.
2015-01-05 11:03:13 +02:00
Richard van Velzen
e37b67d013
Add an option to prevent function names from being mangled
...
See #552 . This is mostly useful for having the actual function names in traces.
2015-01-04 21:48:43 +01:00
Caridy Patino
ad18689d92
using the original sourcemap as the base
...
* Creates a new SourceMapGenerator based on a SourceMapConsumer:
https://github.com/mozilla/source-map#sourcemapgeneratorfromsourcemapsourcemapconsumer
2015-01-04 21:08:29 +01:00
truiken
0f80b1058d
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.
2015-01-04 21:01:11 +01:00
Richard van Velzen
0d48af3f36
Add a "keep_fnames" option to the compressor to retain function expression names
...
See #552 . This is useful for stack traces.
2015-01-04 20:14:38 +01:00
achingbrain
4613644cce
passes in references to process and Buffer to silence ReferenceErrors
2015-01-04 19:26:47 +01:00
Derek Wickern
718e475613
Fix backslashes in source-map paths on Windows
2015-01-04 19:08:19 +01:00
Austin Brown
aa5dd15352
Update README.md
...
otions => options
2015-01-04 16:01:53 +01:00
Peter Dave Hello
5bff65c132
Use svg instead of png to get better image quality
2015-01-04 15:58:00 +01:00
Richard van Velzen
24bc09b79b
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.
2015-01-04 15:01:55 +01:00
Richard van Velzen
37c17d5541
Merge pull request #570 from rvanvelzen/fix-569
...
Fix #569
2015-01-04 14:02:08 +01:00
Richard van Velzen
120948fa48
Merge pull request #584 from clyfish/fix-base54
...
fix base54
2015-01-04 14:00:23 +01:00
Richard van Velzen
66e6f0c3cb
Merge pull request #592 from micschro/patch-1
...
Fix max_line_len not working for JSON files
2015-01-04 13:53:31 +01:00
Richard van Velzen
f7447efa8c
Merge pull request #600 from KenPowers/master
...
Use yargs instead of optimist.
2015-01-04 13:52:02 +01:00
Richard van Velzen
f4d36a58c2
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 )
2015-01-04 13:37:59 +01:00
Kenneth Powers
6d1c3e1aec
Use yargs instead of optimist.
2015-01-01 01:04:54 -05:00
Mihai Bazon
73cc0505f5
Merge pull request #599 from rvanvelzen/fix-597
...
Fix #597
2014-12-31 14:18:31 +02:00
Richard van Velzen
c75f5a1fd8
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.
2014-12-31 12:23:00 +01:00
micschro
39d8880f2c
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.
2014-12-17 16:31:03 +01:00
Mihai Bazon
5538ec7bd8
v2.4.16
v2.4.16
2014-12-09 15:21:44 +02:00
Mihai Bazon
f101d6429b
Merge pull request #546 from jacobk/patch-1
...
Use uglify source map token names if missing
2014-12-04 14:07:08 +02:00
Cheng Liangyu
fe06fc85d3
fix base54
2014-12-01 13:16:44 +08:00
Mihai Bazon
f36a1eaa8b
Add option to allow return outside of functions.
...
Close #288
2014-10-20 18:12:13 +03:00
Mihai Bazon
a64bdda9ae
Document keep_fargs. Close #557
2014-09-28 12:36:36 +03:00
Mihai Bazon
01d19b4b52
Referencing a global is assumed to have side effects.
...
Close #550
2014-09-28 11:18:25 +03:00
Mihai Bazon
f0c1a01bc2
Merge pull request #549 from Arnavion/unreferenced-catch-symbol
...
Don't warn for an unreferenced exception symbol in a catch block.
2014-09-13 09:29:34 +03:00
Arnavion
7be680d3f8
Don't warn for an unreferenced exception symbol in a catch block.
2014-09-12 21:01:19 -07:00
Mihai Bazon
57dab1e1db
Merge pull request #541 from TalAter/conditional-improvements
...
Conditional assignment of equivalent constants compressed ( x=y?1:1 --> x=1 )
2014-09-09 18:45:12 +03:00
Jacob Kristhammar
21b3c890a1
Use uglify source map token names if missing
2014-09-09 13:02:50 +02:00
Tal Ater
fb0ec720a4
Compress conditions that have side effects using sequences
2014-09-04 02:57:49 +03:00