Fábio Santos
59e1601fb8
importing names in the modules, not just default imports
2016-03-14 12:54:05 +01:00
Fábio Santos
d35a9e7839
Importing names from places
2016-03-14 12:54:05 +01:00
Fábio Santos
0465bd270d
Starting out the import statement
2016-03-14 12:54:05 +01:00
philippsimon
ee6c9fabb7
Fix: Uglified Number.prototype functions on big numbers
2016-03-14 12:41:06 +01:00
Fábio Santos
7a8cffd631
Move the idea of a symbol having a default value up the class chain.
2016-01-19 19:22:22 +01:00
Fábio Santos
5b553aafe2
Destructuring parameters with defaults. function x({ foo, bar } = {}) { }
2016-01-19 19:22:22 +01:00
Fábio Santos
084437bc6d
Non-destructuring default parameters
2016-01-19 19:22:22 +01:00
Anthony Van de Gejuchte
70e5b6f15b
Add some tests for comment-filters through api
...
Also never bother comment options to filter comment5/shebang comments
as they have their custom filter.
2016-01-19 19:14:19 +01:00
Richard van Velzen
7f3dbb6df7
Merge branch 'master' into harmony
2015-12-26 17:59:38 +01:00
Richard van Velzen
e4d73d8b7c
Merge pull request #870 from fabiosantoscode/feature/harmony-class
...
Harmony: classes
2015-12-07 18:59:07 +01:00
Fábio Santos
a800356ad0
Implement new.target
2015-11-21 14:48:23 +00:00
Fábio Santos
bb6b3a773a
Make AST_Class inherit AST_Scope instead of AST_Object
...
This is one of those days I'd love to use multiple inheritance.
An AST_Class has lots of common with AST_Object, but unfortunately
`instanceof AST_Scope` is used very, very much, and a class has its name
inside its own special pocket scope. This compels me to make AST_Class
inherit Scope instead.
It looks like, although there is much in common with AST_Object,
`instanceof AST_Object` seldom are made, perhaps because it is less
often necessary to traverse an object than a scope.
2015-11-20 19:34:10 +00:00
Mihai Bazon
08623aa6a7
Fix output for "use asm" code from SpiderMonkey AST
...
(will only work properly if the SM tree contains "raw" properties for
Literal number nodes)
2015-11-12 12:18:25 +02:00
Mihai Bazon
7691bebea5
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
2015-11-11 22:15:25 +02:00
Richard van Velzen
335e349314
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.
2015-10-28 20:50:01 +01:00
Richard van Velzen
392ac4ff31
Merge branch 'master' into harmony
2015-10-28 20:38:07 +01:00
Michael Ficarra
a887cde9f2
fixes #845 : \v escaping should be restricted to "screw_ie8" mode
2015-10-27 09:05:21 -07:00
Fábio Santos
9ffed2bea6
static properties
2015-10-27 12:24:37 +00:00
Fábio Santos
5f7cb6939c
Starting ES6 classes
2015-10-27 12:24:37 +00:00
Fábio Santos
0d8dea9538
start concise methods
2015-10-27 09:31:16 +01:00
Richard van Velzen
246ec416c0
Merge branch 'master' into harmony
2015-10-20 21:58:58 +02:00
Fábio Santos
b5623b19d4
Fix #836
2015-10-20 19:48:56 +01:00
Richard van Velzen
6be9c752d5
Merge branch 'master' into harmony
2015-10-20 20:12:10 +02:00
startswithaj
6b2861e086
Make_string was missing \v and wasnt reversing vertical tabs even though read_escaped_char coverts them
2015-10-15 17:42:16 +10:00
kzc
dff54a6552
Fix other operator output related to <!-- or -->
2015-10-13 01:17:10 -04:00
Fábio Santos
b31918bbf0
computed properties
2015-10-12 21:38:20 +01:00
Mihai Bazon
17eef5a3c2
Only encode <!-- and --> in strings when inline_script
2015-10-12 10:21:22 +03:00
kzc
9f1f21b810
Output -- > instead of --> in expressions. Escape <!-- and --> within string literals.
2015-10-12 10:19:17 +03:00
Richard van Velzen
b14496c742
Merge branch 'master' into harmony
...
Conflicts:
lib/compress.js
2015-10-12 08:54:44 +02:00
kzc
4d2f7d83af
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.
2015-10-07 13:10:53 -04:00
kzc
593677d2ff
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.
2015-10-07 10:00:28 +02:00
Anthony Van de Gejuchte
c69294c449
Implement shebang support
2015-10-06 22:35:45 +02:00
Fábio Santos
dde9e293df
parse, output the let statement
2015-09-13 14:15:53 +02:00
Fábio Santos
242c61be94
prefixed template strings, like "String.rawfoo\nbar".
2015-09-05 22:48:38 +01:00
Fábio Santos
e1cb1a0e3c
Parse and output ES6 template strings. Yikes!
2015-09-05 22:32:57 +01:00
Fábio Santos
adee5023c0
What about --mangle-props being on and --mangle being off?
2015-08-25 17:52:51 +01:00
Fábio Santos
7ee8f3512e
play nice with propmangle
2015-08-25 17:49:29 +01:00
Fábio Santos
dc5db9b6ca
Starting destructuring expressions
2015-08-25 17:49:27 +01:00
Richard van Velzen
8909e9e1cb
Merge pull request #763 from fabiosantoscode/feature/harmony-super
...
Feature/harmony super
2015-08-07 08:54:20 +02:00
Fábio Santos
e80ed38772
Super!
2015-08-07 02:44:53 +01:00
Fábio Santos
9863f0efa3
expand parameters
...
Conflicts:
test/compress/harmony.js
2015-08-05 21:15:23 +02:00
Richard van Velzen
e8664e63ef
Merge branch 'master' into harmony
2015-08-05 21:13:11 +02:00
Fábio Santos
fa5c4f2d03
Adding arrow functions
2015-08-04 00:57:53 +01:00
Richard van Velzen
66761d7ecf
Fix semicolon printing when restricting max line length
...
Fixes #755
2015-07-30 16:13:32 +02:00
Fábio Santos
9d7d365c2b
for...of
2015-07-29 15:10:54 +02:00
Fábio Santos
32f76f7ff8
Starting destructuring.
2015-07-29 14:54:45 +02: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
fbbaa42ee5
Add option to preserve/enforce string quote style
...
`-q 0` (default) use single or double quotes such as to minimize the number of
bytes (prefers double quotes when both will do); this is the previous
behavior.
`-q 1` -- always use single quotes
`-q 2` -- always use double quotes
`-q 3` or just `-q` -- always use the original quotes.
Related codegen option: `quote_style`.
Close #495
Close #460
Some `yargs` guru please tell me why `uglifyjs --help` doesn't display the
help string for `-q` / `--quotes`, and why it doesn't output the expected
argument types anymore, like good old `optimist` did.
2015-01-27 22:26:27 +02:00
Anthony Van de Gejuchte
099992ecae
Keep single line comments after nlb, after nlb
...
Fixes #583
2015-01-26 12:11:52 +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