Ashley (Scirra)
3d8caffb33
Merge 1e19cd08fa into c2112d5886
2016-11-29 19:19:36 +00:00
Anthony Van de Gejuchte
c2112d5886
Fix case where a lonely var is used as computed property
2016-11-29 20:19:01 +01:00
Anthony Van de Gejuchte
5f6825f9ec
Introduce is_block_scope to AST_Node to determine block scope.
...
Will return false if AST_Node is instance of AST_Scope for now.
2016-10-24 21:28:32 +02:00
Anthony Van de Gejuchte
7e80a979a7
Remove AST_ObjectComputedKeyVal
2016-10-23 22:12:30 +02:00
Richard van Velzen
b7bb706150
Merge branch 'master' into harmony
2016-10-23 22:11:27 +02:00
Richard van Velzen
557b3e412f
v2.7.4
2016-10-23 21:46:22 +02:00
Anthony Van de Gejuchte
8d74f34373
Don't filter shebangs when using the 'some' comment filter
...
Also clarify documentation a bit more about using regexp as filter
2016-10-23 21:31:03 +02:00
Jann Horn
266ddd9639
fix uses_arguments handling (broken since 6605d15783)
...
Using the symbol declaration tracking of UglifyJS doesn't make sense here
anyway, `arguments` always comes from something in the current scope.
fixes #1299
2016-10-23 21:29:18 +02:00
pengzhenqing
e51c6ba380
Add an option for writing inline source map
2016-10-23 21:21:39 +02:00
Anthony Van de Gejuchte
32c2cc33bb
Improve binding patterns for arrow functions
2016-10-23 21:13:12 +02:00
Anthony Van de Gejuchte
947b8750e8
Make classes implicitly strict mode
2016-10-17 20:24:38 +02:00
Ashley (Scirra)
1e19cd08fa
Treat debug: true debug: ""
...
Supports passing `true` for `debug` in `mangle_properties`. Added test
case to verify this behavior.
2016-10-07 16:11:58 +01:00
Ashley (Scirra)
65922fcbb2
Address style nits
...
Also rename `debug_cache_name` to the more accurate `debug_name_suffix`.
2016-10-07 12:38:48 +01:00
Ashley (Scirra)
3f3ab65e8a
Add extra test case for issue #1321
...
Verifies behavior with `ignore_quoted: false`.
2016-10-06 18:09:23 +01:00
Ashley (Scirra)
10cee1144b
Fix issue #1321
...
Fixes name collision issue, which is not directly related to this patch
but has an additional case in debug mode. Added regression test.
2016-10-06 17:41:11 +01:00
Ashley (Scirra)
7de8ffe77b
Make debug option take a string suffix
...
Debug option (and CLI) now take a string to enable, and the string is
used as the (possibly empty) suffix. Instead of generating a random
number, the caller can do that if they wish. Updated tests accordingly
(no need for regex now).
2016-10-06 16:42:23 +01:00
Richard van Velzen
6389e52305
Remove console.log and add extra test case
2016-10-06 14:11:32 +02:00
Richard van Velzen
e05510f3bc
Add an option to wrap IIFEs in parenthesis
...
For #1307 .
2016-10-06 14:11:32 +02:00
kzc
fc9804b909
Fix (typeof side_effect()) in boolean context
...
Fixes #1289 with suggestion by @rvanvelzen
2016-10-06 13:50:11 +02:00
Ashley (Scirra)
b28d2d3cf2
Refactoring considering feedback
...
- the CLI option is now --mangle-debug
- the implementation is now a bit more elegant, always using a random
number and relying on the existing cache mechanism
- takes in to account can_mangle
- updated readme & test
2016-10-06 11:33:42 +01:00
Ashley (Scirra)
31763799ae
Remove temp file
...
Oops
2016-10-05 18:03:15 +01:00
Ashley (Scirra)
2dbf8bfaad
CLI, readme and code style updates
...
Add support for --debug-mangling CLI option, describe it in the readme,
and update code changes to use consistent style.
2016-10-05 18:02:13 +01:00
Ashley (Scirra)
252a48f04f
Replace tabs with spaces + replace let with var
...
Because I haven't made enough of a mess already, the last commit switched back to let... so this one uses var and has spaces :P
2016-10-05 13:52:16 +01:00
Ashley (Scirra)
57c9b97ec4
Replace tabs with spaces
...
Use consistent whitespace with the rest of the project.
2016-10-05 13:48:36 +01:00
Ashley (Scirra)
52cd38d268
Remove use of 'let'
...
'let' appeared to break one of the builds so changed it to 'var'.
2016-10-05 13:44:16 +01:00
Ashley (Scirra)
abb6aa544f
Add 'debug' option to mangle_properties
...
Add a 'debug' option to mangle_properties and add a test that verifies
it works as expected both with and without a cache passed as well.
2016-10-05 13:39:33 +01:00
alexlamsl
4761d07e0b
Optimize unmodified variables
2016-10-01 11:36:11 +02:00
kzc
88f6ff38d1
[ES6] fix template string escaping of \${...}
2016-10-01 11:32:36 +02:00
kzc
4198095a9c
[ES6] fix parsing spread arguments that are expressions
2016-09-29 13:34:22 -04:00
Anthony Van de Gejuchte
0111497fc9
Make all comment options in cli available in js api
...
Also removing more code within "loop" while at it.
2016-09-06 17:54:45 +02:00
Anthony Van de Gejuchte
13ed445607
Improve support for binding pattern
...
Including improvements for parameters, variable assignment and
catch parameter.
2016-09-05 17:48:48 +02:00
Richard van Velzen
1db50c3b16
Don't parenthesize arrow functions in parameter lists
2016-09-02 09:35:31 +02:00
Mihai Bazon
7d8dea3b26
Merge pull request #1277 from kzc/fix-string-plus-opt
...
Account for side effects in `string + expr` optimization
2016-09-01 16:32:22 +03:00
kzc
25fc02743a
Account for side effects in string + expr optimization
2016-09-01 09:24:56 -04:00
Richard van Velzen
7f6b5d662b
Merge branch 'master' into harmony
2016-08-30 15:16:23 +02:00
kzc
0bd8053524
implement optimization: (x = 2 * x) ---> (x *= 2)
2016-08-30 08:43:02 -04:00
Anthony Van de Gejuchte
1c15d0db45
Fix quoting of properties
...
- Make AST_ConciseMethod child of AST_ObjectProperty.
- Fix some typos.
2016-08-26 15:06:24 +02:00
Richard van Velzen
67461666dc
Merge branch 'master' into harmony
2016-08-17 21:30:35 +02:00
Richard van Velzen
1a78bbcd23
v2.7.3
2016-08-17 20:34:27 +02:00
Richard van Velzen
45d81f881b
Merge branch 'master' into harmony
2016-08-17 20:21:38 +02:00
Richard van Velzen
8430123e9d
Fix negate_iife transform to return a correct tree for nested IIFEs
...
Fix for #1256 , partially reverts d854523783
2016-08-17 11:55:59 +02:00
Richard van Velzen
614db97cca
v2.7.2
2016-08-17 08:51:23 +02:00
Richard van Velzen
8c7d23dfb1
Merge branch 'master' into harmony
2016-08-17 08:50:31 +02:00
kzc
d854523783
Fix negate_iife regression #1254
2016-08-17 01:29:34 -04:00
Richard van Velzen
7fa0dbdeb9
Ignore default reserved properties in compress test
2016-08-15 09:54:15 +02:00
Richard van Velzen
c644c1292d
Merge branch 'master' into harmony
2016-08-15 09:09:04 +02:00
Richard van Velzen
781f26eda1
v2.7.1
2016-08-14 22:02:01 +02:00
Timothy Gu
37f4395cc0
Add missing { in README
...
Also fix a trivial style mistake.
2016-08-14 21:52:39 +02:00
kzc
de619ae5a6
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.
2016-08-14 21:51:25 +02:00
kzc
86859f6d7e
Additional object literal property tests
2016-08-14 21:49:43 +02:00