UglifyJS.git
7 years agominor improvement to string optimisation (#1514)
Alex Lam S.L [Thu, 2 Mar 2017 03:31:39 +0000 (11:31 +0800)]
minor improvement to string optimisation (#1514)

- "" + "a"     => "a"
- "" + a + "b" => a + "b"
- "a" + ""     => "a" (improving on #45)

7 years agov2.8.4
Alex Lam S.L [Wed, 1 Mar 2017 16:24:49 +0000 (00:24 +0800)]
v2.8.4

7 years agofix corner cases in `reduce_vars` (#1524)
Alex Lam S.L [Wed, 1 Mar 2017 16:20:53 +0000 (00:20 +0800)]
fix corner cases in `reduce_vars` (#1524)

Avoid variable substitution in the following cases:
- use of variable before declaration
- declaration within conditional code blocks
- declaration within loop body

fixes #1518
fixes #1525

7 years agov2.8.3
Alex Lam S.L [Wed, 1 Mar 2017 07:28:46 +0000 (15:28 +0800)]
v2.8.3

7 years agofix crash on missing `props` to `string_template()` (#1523)
Alex Lam S.L [Wed, 1 Mar 2017 07:25:26 +0000 (15:25 +0800)]
fix crash on missing `props` to `string_template()` (#1523)

Patched up `make_node()` without `orig`.

There may be other cases where `start` could be missing, so make it print "undefined" instead of crashing.

fixes #1518

7 years agov2.8.2
Alex Lam S.L [Tue, 28 Feb 2017 20:46:12 +0000 (04:46 +0800)]
v2.8.2

7 years agoinvert `reduce_vars` tracking flag (#1519)
Alex Lam S.L [Tue, 28 Feb 2017 20:12:10 +0000 (04:12 +0800)]
invert `reduce_vars` tracking flag (#1519)

Modules like webpack and grunt-contrib-uglify still uses `ast.transform(compressor)` before `Compressor.compress(ast)` was introduced.

Workaround this compatibility issue by deactivating `reduce_vars` in such case.

Also fix use case with omitted `options` when calling `Compressor()`.

fixes #1516

7 years agofix `evaluate` on object getter & setter (#1515)
Alex Lam S.L [Tue, 28 Feb 2017 18:03:47 +0000 (02:03 +0800)]
fix `evaluate` on object getter & setter (#1515)

7 years agov2.8.1
Alex Lam S.L [Tue, 28 Feb 2017 16:27:08 +0000 (00:27 +0800)]
v2.8.1

7 years agotemporarily disables `reduce_vars` (#1517)
Alex Lam S.L [Tue, 28 Feb 2017 16:25:43 +0000 (00:25 +0800)]
temporarily disables `reduce_vars` (#1517)

... as we investigate #1516

7 years agowarn & drop `#__PURE__` iff IIFE is dropped (#1511)
Alex Lam S.L [Mon, 27 Feb 2017 18:25:44 +0000 (02:25 +0800)]
warn & drop `#__PURE__` iff IIFE is dropped (#1511)

- consolidate `side-effects` optimisations
- improve string `+` optimisation
- enhance literal & `conditionals` optimisations

7 years agov2.8.0
Alex Lam S.L [Sun, 26 Feb 2017 19:47:54 +0000 (03:47 +0800)]
v2.8.0

7 years agoimprove error messages (#1506)
Alex Lam S.L [Sun, 26 Feb 2017 19:40:54 +0000 (03:40 +0800)]
improve error messages (#1506)

- better inheritance of `Error` sub-classes
- mark parse error against source in CLI

closes #235
closes #348
closes #524
closes #1356
closes #1405

7 years agoadd harmony branch details in README (#1507)
kzc [Sun, 26 Feb 2017 17:55:24 +0000 (12:55 -0500)]
add harmony branch details in README (#1507)

7 years agofaster tree transversal (#1462)
Alex Lam S.L [Sat, 25 Feb 2017 21:58:26 +0000 (05:58 +0800)]
faster tree transversal (#1462)

- convert `[].forEach()` to for-loops

7 years agoconsolidate `evaluate` & `reduce_vars` (#1505)
Alex Lam S.L [Sat, 25 Feb 2017 16:40:33 +0000 (00:40 +0800)]
consolidate `evaluate` & `reduce_vars` (#1505)

- improve marking efficiency
- apply smarter `const` replacement to `var`

fixes #1501

7 years agoupdate docs for `pure_funcs` & `drop_console` (#1503)
Alex Lam S.L [Fri, 24 Feb 2017 20:13:10 +0000 (04:13 +0800)]
update docs for `pure_funcs` & `drop_console` (#1503)

closes #1362
closes #1399

7 years agoallow --in-source-map inline (#1490)
Alex Lam S.L [Fri, 24 Feb 2017 20:11:21 +0000 (04:11 +0800)]
allow --in-source-map inline (#1490)

- limited to one input file (or `stdin`)
- only works with built-in parser

fixes #520

7 years agoAvoid using exports when undefined (#1471)
Ondřej Španěl [Fri, 24 Feb 2017 00:51:24 +0000 (01:51 +0100)]
Avoid using exports when undefined (#1471)

Makes direct usage within web browser easier, even if officially unsupported.

7 years agoMerge pull request #1485 from alexlamsl/merge-2.8.0
Alex Lam S.L [Thu, 23 Feb 2017 23:33:57 +0000 (07:33 +0800)]
Merge pull request #1485 from alexlamsl/merge-2.8.0

2.8.0 staging

7 years agoenable `collapse_vars` & `reduce_vars` by default
alexlamsl [Thu, 23 Feb 2017 17:46:57 +0000 (01:46 +0800)]
enable `collapse_vars` & `reduce_vars` by default
- fix corner cases in `const` optimisation
- deprecate `/*@const*/`

fixes #1497
closes #1498

7 years agoSupport marking a call as pure
kzc [Tue, 21 Feb 2017 06:24:18 +0000 (14:24 +0800)]
Support marking a call as pure

A function call or IIFE with an immediately preceding comment
containing `@__PURE__` or `#__PURE__` is deemed to be a
side-effect-free pure function call and can potentially be
dropped.

Depends on `side_effects` option.

`[#@]__PURE__` hint will be removed from comment when pure
call is dropped.

fixes #1261
closes #1448

7 years agoFix: AST_Accessor missing start / end tokens
Ondřej Španěl [Mon, 20 Feb 2017 09:14:53 +0000 (17:14 +0800)]
Fix: AST_Accessor missing start / end tokens

fixes #1492
closes #1493

7 years agofix `pure_funcs` & improve `side_effects`
alexlamsl [Sun, 19 Feb 2017 17:46:59 +0000 (01:46 +0800)]
fix `pure_funcs` & improve `side_effects`
- only drops side-effect-free arguments
- drop side-effect-free parts with discarded value from `AST_Seq` & `AST_SimpleStatement`

closes #1494

7 years agoclean up `max_line_len`
alexlamsl [Sat, 18 Feb 2017 14:44:53 +0000 (22:44 +0800)]
clean up `max_line_len`
- never exceed specified limit
- otherwise warning is shown
- enabled only for final output

closes #1496

7 years agointroduce `unsafe_proto`
alexlamsl [Sat, 18 Feb 2017 11:34:54 +0000 (19:34 +0800)]
introduce `unsafe_proto`
- `Array.prototype.slice` => `[].slice`

closes #1491

7 years agoremove extraneous spaces between ++/+/--/-
alexlamsl [Sat, 18 Feb 2017 11:33:53 +0000 (19:33 +0800)]
remove extraneous spaces between ++/+/--/-

fixes #1377
closes #1488

7 years agoAdd .gitattributes to checkout lf eol style
Anthony Van de Gejuchte [Sat, 18 Feb 2017 11:33:05 +0000 (19:33 +0800)]
Add .gitattributes to checkout lf eol style

closes #1487

7 years agoimprove `--beautify bracketize`
alexlamsl [Sat, 18 Feb 2017 11:30:33 +0000 (19:30 +0800)]
improve `--beautify bracketize`
reduce whitespaces from if-else statements

fixes #1482
closes #1483

7 years agoadd benchmark & JetStream tests
alexlamsl [Sat, 18 Feb 2017 11:28:25 +0000 (19:28 +0800)]
add benchmark & JetStream tests
- `test/benchmark.js` measures performance
- `test/jetstream.js` verifies correctness
- configurable mangle/compress/output options

closes #1479

7 years agoenhance `global_defs`
alexlamsl [Sat, 18 Feb 2017 11:27:31 +0000 (19:27 +0800)]
enhance `global_defs`
- support arrays, objects & AST_Node
- support `"a.b":1` on both cli & API
- emit warning if variable is modified
- override top-level variables

fixes #1416
closes #1198
closes #1469

7 years agoevaluate AST_SymbolRef as parameter
alexlamsl [Sat, 18 Feb 2017 11:22:24 +0000 (19:22 +0800)]
evaluate AST_SymbolRef as parameter
fix invalid boolean conversion now exposed in `make_node_from_constant()`

closes #1477

7 years agoimprove reduce_vars and fix a bug
alexlamsl [Sat, 18 Feb 2017 11:19:55 +0000 (19:19 +0800)]
improve reduce_vars and fix a bug
- update modified flag between compress() passes
- support IIFE arguments
- fix corner case with multiple definitions

closes #1473

7 years agoimprove keep_fargs & keep_fnames
alexlamsl [Sat, 18 Feb 2017 11:19:12 +0000 (19:19 +0800)]
improve keep_fargs & keep_fnames
- utilise in_use_ids instead of unreferenced()
- drop_unused now up-to-date for subsequent passes

closes #1476

7 years agofix duplicated test names
alexlamsl [Sat, 18 Feb 2017 11:15:09 +0000 (19:15 +0800)]
fix duplicated test names

previously test cases with the same name would be skipped except for the last one

`test/run-test.js` will now report duplicated names as errors

closes #1461

7 years agosmarter const replacement taking name length into account
kzc [Sat, 18 Feb 2017 11:12:57 +0000 (19:12 +0800)]
smarter const replacement taking name length into account

closes #1459

7 years agoclean up `negate_iife`
alexlamsl [Sat, 18 Feb 2017 11:11:57 +0000 (19:11 +0800)]
clean up `negate_iife`
- remove extra tree scanning phase for `negate_iife`
- `negate_iife` now only deals with the narrowest form, i.e. IIFE sitting directly under `AST_SimpleStatement`
- `booleans`, `conditionals` etc. will now take care the rest via more accurate accounting
- `a(); void b();` => `a(); b();`

fixes #1288
closes #1451

7 years agoimprove string concatenation
alexlamsl [Sat, 18 Feb 2017 11:07:52 +0000 (19:07 +0800)]
improve string concatenation
shuffle associative operations to minimise parentheses and aid other uglification efforts

closes #1454

7 years ago`-c sequences=N` suboptimal at N expression cutoff
alexlamsl [Sat, 18 Feb 2017 11:07:03 +0000 (19:07 +0800)]
`-c sequences=N` suboptimal at N expression cutoff

N = 2:
  a;
  b;
  c;
  d;
was:
  a, b;
  c;
  d;
now:
  a, b;
  c, d;

fixes #1455
closes #1457

7 years agotweak do-while loops
alexlamsl [Sat, 18 Feb 2017 11:05:54 +0000 (19:05 +0800)]
tweak do-while loops
- `do{...}while(false)` => `{...}`
- clean up `AST_While` logic

closes #1452

7 years agofixes & improvements to [].join()
alexlamsl [Sat, 18 Feb 2017 11:05:11 +0000 (19:05 +0800)]
fixes & improvements to [].join()

fixes
- [a].join() => "" + a
- ["a", , "b"].join() => "a,,b"
- ["a", null, "b"].join() => "a,,b"
- ["a", undefined, "b"].join() => "a,,b"

improvements
- ["a", "b"].join(null) => "anullb"
- ["a", "b"].join(undefined) => "a,b"
- [a + "b", c].join("") => a + "b" + c

closes #1453

7 years agodrop unused: toplevel, assign-only
alexlamsl [Sat, 18 Feb 2017 11:03:53 +0000 (19:03 +0800)]
drop unused: toplevel, assign-only
- assign statement does not count towards variable usage by default
- only works with assignments on the same scope level as declaration
- can be disabled with `unused` set to "keep_assign"
- `toplevel` to drop unused top-level variables and/or functions
- `top_retain` to whitelist top-level exceptions

closes #1450

7 years agofix stray else in compress with conditionals=false
kzc [Sat, 18 Feb 2017 11:02:59 +0000 (19:02 +0800)]
fix stray else in compress with conditionals=false

closes #1449

7 years agoenable typeof "undefined" for general use
alexlamsl [Sat, 18 Feb 2017 11:01:42 +0000 (19:01 +0800)]
enable typeof "undefined" for general use
move out of unsafe, guard corner case with screw_id8 instead

closes #1446

7 years agofix corner case in keep_fnames
alexlamsl [Sat, 18 Feb 2017 11:00:54 +0000 (19:00 +0800)]
fix corner case in keep_fnames
happens when inner function:
- just below top level
- not referenced
- `unused` is disabled

closes #1445

7 years agoremove unused AST_Scope.nesting & AST_SymbolRef.frame
alexlamsl [Sat, 18 Feb 2017 10:59:40 +0000 (18:59 +0800)]
remove unused AST_Scope.nesting & AST_SymbolRef.frame
they are computed but never used

closes #1444

7 years agofix crash in unsafe replacement of undefined
alexlamsl [Sat, 18 Feb 2017 10:58:23 +0000 (18:58 +0800)]
fix crash in unsafe replacement of undefined
remove extraneous call to AST_SymbolRef.reference()

closes #1443

7 years agoImprove optimizing `function() { if(c){return foo} bar();}`
Anthony Van de Gejuchte [Sat, 18 Feb 2017 10:56:18 +0000 (18:56 +0800)]
Improve optimizing `function() { if(c){return foo} bar();}`

closes #1437

7 years agoMerge pull request #1481 from anatdagan/propsmangle_only_identifiers
Mihai Bazon [Sun, 12 Feb 2017 08:59:43 +0000 (10:59 +0200)]
Merge pull request #1481 from anatdagan/propsmangle_only_identifiers

verify that property names after mangle are legal

7 years agoin mangle_names there is a check that the variable name is legal and that it is not...
Anat Dagan [Fri, 10 Feb 2017 12:13:47 +0000 (14:13 +0200)]
in mangle_names there is a check that the variable name is legal and that it is not a reserved word. This should apply to propsmangle as well.

7 years agoupdate test (#1441)
Alex Lam S.L [Thu, 26 Jan 2017 11:59:32 +0000 (19:59 +0800)]
update test (#1441)

improved reduce_vars & binary operands produce more optimal results

7 years agofix mangling collision with keep_fnames (#1431)
Alex Lam S.L [Thu, 26 Jan 2017 11:18:28 +0000 (19:18 +0800)]
fix mangling collision with keep_fnames (#1431)

* fix mangling collision with keep_fnames
fixes #1423

* pass mangle options to figure_out_scope()
bring command-line in line with minify()

7 years agooptimise binary operands with evaluate() (#1427)
Alex Lam S.L [Thu, 26 Jan 2017 11:16:50 +0000 (19:16 +0800)]
optimise binary operands with evaluate() (#1427)

- remove call to evaluate() in is_constant() and let nested optimize() does its job instead
- reject RegExp in is_constant() and remove special case logic under collapse_vars
- operands to conditionals optimisation are now always evaluate()-ed
- throw error in constant_value() instead of returning undefined to catch possible bugs, similar to make_node_from_constant()
- optimise binary boolean operators under `evaluate` instead of `conditionals`

7 years agoaugment evaluate to extract within objects (#1425)
Alex Lam S.L [Thu, 26 Jan 2017 11:14:18 +0000 (19:14 +0800)]
augment evaluate to extract within objects (#1425)

- gated by `unsafe`
- replaces previous optimisation specific to String.length
- "123"[0] => 1
- [1, 2, 3][0] => 1
- [1, 2, 3].length => 3
- does not apply to objects with overridden prototype functions

7 years agoadd missing LHS cases which global_defs should avoid
alexlamsl [Tue, 17 Jan 2017 09:33:40 +0000 (17:33 +0800)]
add missing LHS cases which global_defs should avoid

7 years agoHave minify() and tests use figure_out_scope() as uglifyjs CLI does
kzc [Wed, 21 Dec 2016 15:52:30 +0000 (10:52 -0500)]
Have minify() and tests use figure_out_scope() as uglifyjs CLI does

Clarify docs, help and tests for --support-ie8 and screw_ie8=false

7 years agoAdd preventive test involving non-ascii function identifiers
Anthony Van de Gejuchte [Wed, 30 Nov 2016 20:54:23 +0000 (21:54 +0100)]
Add preventive test involving non-ascii function identifiers

7 years agoAdd note about name mangling when using --mangle-props=unquoted (#1314)
Wiktor Kwapisiewicz [Wed, 30 Nov 2016 13:54:15 +0000 (14:54 +0100)]
Add note about name mangling when using --mangle-props=unquoted (#1314)

7 years agoremove npm-shrinkwrap.json to work around npm@4.0.2 bug (#1384)
kzc [Wed, 30 Nov 2016 06:18:52 +0000 (01:18 -0500)]
remove npm-shrinkwrap.json to work around npm@4.0.2 bug (#1384)

7 years agov2.7.5
Richard van Velzen [Tue, 29 Nov 2016 21:29:59 +0000 (22:29 +0100)]
v2.7.5

7 years agoGenerate source map data from normalized files
Martijn Swaagman [Fri, 4 Nov 2016 18:49:59 +0000 (19:49 +0100)]
Generate source map data from normalized files

If using `inSourceMap` this fix will ensure the copying of `sourcesContent` is based on potentially normalized `sources` values (https://github.com/mozilla/source-map/blob/master/lib/source-map-consumer.js#L304-L309).

For example `normalize` (https://github.com/mozilla/source-map/blob/master/lib/util.js#L80-L123) will rewrite `./dist/mySource.js` to `dist/mySource.js` in the target `_sources` of the `SourceMapConsumer`. As a result `orig_map.sourceContentFor(source, true);` would return `null` since the orginal `source` was no longer available in the consumer. By using the keys generating from the `SourceMapConsumer.constructor` consistency is ensured.

7 years agodocs: add doc for option.outFileName
1111hui [Sat, 29 Oct 2016 07:55:47 +0000 (15:55 +0800)]
docs: add doc for option.outFileName

7 years agofeat: add option.outFileName for JS API, if absense, sourceMap.file field will deduced
1111hui [Sat, 29 Oct 2016 07:21:28 +0000 (15:21 +0800)]
feat: add option.outFileName for JS API, if absense, sourceMap.file field will deduced

7 years agoAdd --mangle-props-debug and fix --mangle-props=unquoted collision
Ashley (Scirra) [Thu, 27 Oct 2016 15:23:04 +0000 (11:23 -0400)]
Add --mangle-props-debug and fix --mangle-props=unquoted collision

Patch by @AshleyScirra

Based on: PR #1316

Renamed the CLI debug option to --mangle-props-debug

Fixes: #1321 name collision in --mangle-props=unquoted

7 years agoDo not overwrite options.comments + cleanup
Anthony Van de Gejuchte [Wed, 26 Oct 2016 15:34:30 +0000 (17:34 +0200)]
Do not overwrite options.comments + cleanup

7 years agoPass mangle options to figure_out_scope before mangling in tests
Anthony Van de Gejuchte [Wed, 26 Oct 2016 10:34:38 +0000 (12:34 +0200)]
Pass mangle options to figure_out_scope before mangling in tests

7 years agov2.7.4
Richard van Velzen [Sun, 23 Oct 2016 19:46:22 +0000 (21:46 +0200)]
v2.7.4

7 years agoDon't filter shebangs when using the 'some' comment filter
Anthony Van de Gejuchte [Sun, 16 Oct 2016 18:57:28 +0000 (20:57 +0200)]
Don't filter shebangs when using the 'some' comment filter

Also clarify documentation a bit more about using regexp as filter

7 years agofix uses_arguments handling (broken since 6605d1578351)
Jann Horn [Fri, 14 Oct 2016 16:04:39 +0000 (18:04 +0200)]
fix uses_arguments handling (broken since 6605d1578351)

Using the symbol declaration tracking of UglifyJS doesn't make sense here
anyway, `arguments` always comes from something in the current scope.

fixes #1299

7 years agoAdd an option for writing inline source map
pengzhenqing [Sun, 9 Oct 2016 06:15:25 +0000 (14:15 +0800)]
Add an option for writing inline source map

7 years agoRemove console.log and add extra test case
Richard van Velzen [Thu, 6 Oct 2016 12:11:19 +0000 (14:11 +0200)]
Remove console.log and add extra test case

7 years agoAdd an option to wrap IIFEs in parenthesis
Richard van Velzen [Fri, 30 Sep 2016 10:27:45 +0000 (12:27 +0200)]
Add an option to wrap IIFEs in parenthesis

For #1307.

7 years agoFix (typeof side_effect()) in boolean context
kzc [Sun, 2 Oct 2016 14:46:09 +0000 (10:46 -0400)]
Fix (typeof side_effect()) in boolean context

Fixes #1289 with suggestion by @rvanvelzen

7 years agoOptimize unmodified variables
alexlamsl [Tue, 20 Sep 2016 14:23:27 +0000 (22:23 +0800)]
Optimize unmodified variables

8 years agoMake all comment options in cli available in js api
Anthony Van de Gejuchte [Sat, 3 Sep 2016 21:26:31 +0000 (23:26 +0200)]
Make all comment options in cli available in js api

Also removing more code within "loop" while at it.

8 years agoMerge pull request #1277 from kzc/fix-string-plus-opt
Mihai Bazon [Thu, 1 Sep 2016 13:32:22 +0000 (16:32 +0300)]
Merge pull request #1277 from kzc/fix-string-plus-opt

Account for side effects in `string + expr` optimization

8 years agoAccount for side effects in `string + expr` optimization
kzc [Thu, 1 Sep 2016 13:24:56 +0000 (09:24 -0400)]
Account for side effects in `string + expr` optimization

8 years agoimplement optimization: (x = 2 * x) ---> (x *= 2)
kzc [Fri, 26 Aug 2016 22:47:25 +0000 (18:47 -0400)]
implement optimization: (x = 2 * x) ---> (x *= 2)

8 years agov2.7.3
Richard van Velzen [Wed, 17 Aug 2016 18:34:27 +0000 (20:34 +0200)]
v2.7.3

8 years agoFix negate_iife transform to return a correct tree for nested IIFEs
Richard van Velzen [Wed, 17 Aug 2016 09:43:50 +0000 (11:43 +0200)]
Fix negate_iife transform to return a correct tree for nested IIFEs

Fix for #1256, partially reverts d854523783b4

8 years agov2.7.2
Richard van Velzen [Wed, 17 Aug 2016 06:51:23 +0000 (08:51 +0200)]
v2.7.2

8 years agoFix negate_iife regression #1254
kzc [Wed, 17 Aug 2016 01:54:54 +0000 (21:54 -0400)]
Fix negate_iife regression #1254

8 years agov2.7.1
Richard van Velzen [Sun, 14 Aug 2016 20:02:01 +0000 (22:02 +0200)]
v2.7.1

8 years agoAdd missing `{` in README
Timothy Gu [Fri, 12 Aug 2016 01:21:21 +0000 (18:21 -0700)]
Add missing `{` in README

Also fix a trivial style mistake.

8 years agoFix --mangle-props and --mangle-props=unquoted
kzc [Sun, 31 Jul 2016 06:35:14 +0000 (02:35 -0400)]
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.

8 years agoAdditional object literal property tests
kzc [Sat, 30 Jul 2016 17:21:23 +0000 (13:21 -0400)]
Additional object literal property tests

8 years agoAdd input file glob support to minify()
kzc [Sat, 30 Jul 2016 01:27:30 +0000 (21:27 -0400)]
Add input file glob support to minify()

8 years agoAdd simple file globbing to bin/uglifyjs for Windows
kzc [Fri, 29 Jul 2016 20:18:56 +0000 (16:18 -0400)]
Add simple file globbing to bin/uglifyjs for Windows

8 years agoMoved test input files to test/input.
Lucas Wiener [Thu, 28 Jul 2016 07:30:12 +0000 (09:30 +0200)]
Moved test input files to test/input.

8 years agoAdded test for #1236
Lucas Wiener [Wed, 27 Jul 2016 14:02:33 +0000 (16:02 +0200)]
Added test for #1236

8 years agoFixed sourceMapIncludeSources and inSourceMap = string combination of the UglifyJS...
Lucas Wiener [Tue, 26 Jul 2016 07:54:02 +0000 (09:54 +0200)]
Fixed sourceMapIncludeSources and inSourceMap = string combination of the UglifyJS.minify function.

8 years agoFix unneeded parens around unary args in new expression.
kzc [Sat, 23 Jul 2016 15:50:44 +0000 (11:50 -0400)]
Fix unneeded parens around unary args in new expression.

8 years agoTest reparsing test/compress/*.js output
kzc [Fri, 22 Jul 2016 14:44:29 +0000 (10:44 -0400)]
Test reparsing test/compress/*.js output

8 years agoLegacy octal integer strict mode fixes
Anthony Van de Gejuchte [Thu, 21 Jul 2016 01:19:24 +0000 (03:19 +0200)]
Legacy octal integer strict mode fixes

8 years agoBuild with AppVeyor on windows
Richard van Velzen [Sun, 17 Jul 2016 16:17:33 +0000 (18:17 +0200)]
Build with AppVeyor on windows

8 years agoFix the document of keep_fnames option
homuler [Sat, 16 Jul 2016 13:03:36 +0000 (22:03 +0900)]
Fix the document of keep_fnames option

8 years agoSource map URL override from programmatic API
Yotam Spenser [Wed, 6 Jul 2016 10:02:07 +0000 (13:02 +0300)]
Source map URL override from programmatic API

8 years agolib/sourcemap.js: Copy sourceContent from old souce-map to the new source-map. Should...
Lauri Pokka [Mon, 4 Jul 2016 17:06:14 +0000 (02:06 +0900)]
lib/sourcemap.js: Copy sourceContent from old souce-map to the new source-map. Should fix #882

8 years agoKeep const in own scope while compressing
Anthony Van de Gejuchte [Thu, 14 Jul 2016 16:43:50 +0000 (18:43 +0200)]
Keep const in own scope while compressing

- Fixes #1205
- Fix provided by @kzc

8 years agoFix mangle with option keep_fnames=true for Safari.
kzc [Wed, 13 Jul 2016 15:44:28 +0000 (11:44 -0400)]
Fix mangle with option keep_fnames=true for Safari.

Fixes: #1202