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
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
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
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
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
kzc
dcdcfe4d39
Add input file glob support to minify()
2016-08-14 21:46:38 +02:00
kzc
72306b9885
Add simple file globbing to bin/uglifyjs for Windows
2016-08-14 21:46:38 +02:00
kzc
d224d71b8d
[ES6] Fix handling of semicolons in export parse.
2016-08-14 21:43:24 +02:00
Lucas Wiener
38756b1f26
Moved test input files to test/input.
2016-08-14 21:40:14 +02:00
Lucas Wiener
85a09fc3b6
Added test for #1236
2016-08-14 21:40:14 +02:00
Lucas Wiener
307b88d6cc
Fixed sourceMapIncludeSources and inSourceMap = string combination of the UglifyJS.minify function.
2016-08-14 21:40:14 +02:00
kzc
fb049d3a81
Fix unneeded parens around unary args in new expression.
2016-08-14 21:38:38 +02:00
Anthony Van de Gejuchte
27d3669800
Don't allow escaped surrogated identifiers + introduce ascii_identifiers
...
Don't use 2 characters for surrogates in identifiers because there is
support for the \u{} syntax when escaped identifiers were introduced.
Also catch eof errors while reading identifier names
Introduce ascii_identifiers:
By setting ascii_identifiers to undefined (default value),
ascii_identifiers will print identifiers using the same setting as
ascii_only within the limits of the ecmascript 6 grammar.
ascii_identifiers accept true and false, allowing identifiers to be
printed under different settings than strings with the ascii_only setting.
2016-08-14 21:36:06 +02:00
kzc
67cca43358
Test reparsing test/compress/*.js output
2016-08-14 21:27:23 +02:00
Anthony Van de Gejuchte
110a1ac885
Make distinction between * method and * operator
...
Also add quotes to properties when necessary,
this might be the case if the name isn't a valid
identifier
2016-07-29 21:31:08 +02:00
Anthony Van de Gejuchte
3f8fc3a316
Fix computed getters + cleanup AST
2016-07-21 18:21:46 +02:00
Anthony Van de Gejuchte
88384cf351
Add more globals, whereof most defined after es5.1
...
Also do not pollute env with mocks replacing standard globals
2016-07-21 16:52:04 +02:00
Anthony Van de Gejuchte
72a9d799b6
Various property fixes
...
* Implement getter/setter with computed value
* Fix parsing getter/setter after static or generator token
* Allow storing expressions for computed expression in AST_SymbolMethod
* Allow get and set in shorthand properties in object literals
Fixes #1094 , #1146 and #1221
2016-07-21 16:50:32 +02:00
Anthony Van de Gejuchte
642273c290
Legacy octal integer strict mode fixes
2016-07-21 14:42:16 +02:00
Anthony Van de Gejuchte
766fafda8b
Don't remove empty generators passed as parameter
2016-07-19 18:13:07 +02:00
Richard van Velzen
e8b23c7798
Build with AppVeyor on windows
2016-07-17 20:00:41 +02:00
kzc
842ac27efb
[ES6] Get compress and global_defs working for AST_Class
2016-07-17 19:56:02 +02:00
homuler
9edbe93df5
Fix the document of keep_fnames option
2016-07-17 19:50:48 +02:00
Yotam Spenser
af37ecafe1
Source map URL override from programmatic API
2016-07-17 19:39:08 +02:00
Lauri Pokka
41a9329409
lib/sourcemap.js: Copy sourceContent from old souce-map to the new source-map. Should fix #882
2016-07-17 19:36:15 +02:00