alexlamsl
0f2be1456c
Merge branch 'master' into harmony-v3.3.6
2018-01-13 13:53:31 +08:00
kzc
d4d7d99b70
add SymbolDef IDs to --output ast ( #2772 )
2018-01-12 15:41:09 +08:00
alexlamsl
7a8eff62ca
Merge branch 'master' into harmony-v3.3.5
2018-01-07 20:35:53 +08:00
Alex Lam S.L
9809567dfc
improve process.exit() workaround ( #2741 )
...
- use public API
- fix issue with Node.js 0.10 on WIndows
2018-01-07 17:53:50 +08:00
Alex Lam S.L
736c366d93
introduce --safari10 ( #2530 )
2017-11-29 03:34:47 +08:00
alexlamsl
4f08c2f504
Merge branch 'master' into harmony-v3.2.0
2017-11-26 04:23:57 +08:00
Alex Lam S.L
f1e3ef5262
separate keep_classnames & keep_fnames ( #2510 )
...
fixes #2418
2017-11-25 16:31:52 +08:00
Alex Lam S.L
30cfea2e7a
fix rename ( #2501 )
...
- suppress spurious `rename` from `commander`
- handle `AST_SymbolCatch` correctly
2017-11-24 03:05:43 +08:00
Alex Lam S.L
f4e2fb9864
expand symbol space to improve compression ( #2460 )
...
- give globally distinct names to distinct variables
- improve ability to compress cross-scoped
- introduce `options.rename` to `minify()`
- default `true` if both `compress` & `mangle`
2017-11-19 19:29:51 +08:00
alexlamsl
227b58812d
Merge branch 'master' into harmony-v3.1.10
2017-11-19 14:34:27 +08:00
Alex Lam S.L
ae28a24c7f
fix cross-scope inlining of AST_Functions ( #2486 )
...
fixes #2485
2017-11-16 10:04:30 +08:00
Tom MacWright
2848596280
docs: Fix spelling and style ( #2395 )
2017-10-24 04:53:56 +08:00
alexlamsl
3a2b737c42
Merge branch 'master' into harmony-v3.0.25
2017-07-16 11:15:07 +08:00
Alex Lam S.L
b35dfc2599
reject malformed CLI parameters ( #2239 )
...
fixes #2237
2017-07-15 23:50:27 +08:00
alexlamsl
ed3032e52a
Merge branch 'master' into harmony-v3.0.22
2017-06-30 11:24:07 +08:00
Alex Lam S.L
bdeadffbf5
improve usability of name cache under minify() ( #2176 )
...
fixes #2174
2017-06-29 12:48:34 +08:00
Alex Lam S.L
49f3de8397
toplevel shorthand for ecma ( #2157 )
2017-06-24 19:06:58 +08:00
Ziad El Khoury Hanna
82db9188ac
fix CLI parsing of --source-map content ( #2088 )
...
fixes #2082
2017-06-13 16:30:46 +08:00
Alex Lam S.L
f2af093402
fix CLI output corruption ( #2061 )
...
Using `console.error()` & `console.log()` result in inconsistent formatting across Node.js versions.
Avoid this issue by directly writing to `process.stderr` & `process.stdout` instead.
Miscellaneous
- prettify invalid option listing
2017-06-07 04:25:32 +08:00
Alex Lam S.L
e9645e017f
introduce unsafe_Func ( #2033 )
...
Separate flag for #203 functionality.
2017-05-31 03:38:00 +08:00
Alex Lam S.L
55b5f2a8aa
widen CLI parse error code fragment displayed ( #2032 )
...
fixes #2030
2017-05-31 01:56:52 +08:00
Alex Lam S.L
e62b879b48
display default values in --help options ( #2018 )
2017-05-28 22:57:20 +08:00
Alex Lam S.L
c6c9f4f5a8
implement --help options ( #2017 )
2017-05-28 18:21:44 +08:00
Alex Lam S.L
fec14379f6
improve CLI usability ( #2016 )
...
Report supported options upon invalid option syntax.
fixes #1883
2017-05-28 04:09:40 +08:00
Alex Lam S.L
793d61499b
report timing breakdown ( #2000 )
...
fix corner cases with `sourceMap`
fixes #1998
2017-05-25 07:15:55 +08:00
Alex Lam S.L
7d3b941e6e
reinstate describe_ast() on CLI ( #1996 )
...
fixes #1995
2017-05-24 02:30:09 +08:00
Alex Lam S.L
f6c805ae1d
print package name alongside version in CLI ( #1946 )
...
fixes #1945
2017-05-16 06:34:32 +08:00
Alex Lam S.L
a0f5f862df
gracefully handle non-Error being thrown ( #1893 )
2017-05-10 04:20:59 +08:00
Alex Lam S.L
c14e280585
print error stack in CLI ( #1890 )
2017-05-09 16:36:44 +08:00
Alex Lam S.L
a3b2eb75bd
return Error from minify() ( #1880 )
...
Have `minify()` return `Error` in `result.error` rather than throwing it.
2017-05-08 07:05:19 +08:00
Alex Lam S.L
da295de82b
support dumping AST ( #1879 )
...
Re-order `AST_Binary` properties to make dump more readable.
closes #769
2017-05-08 06:23:01 +08:00
Alex Lam S.L
4f8ca4626e
deprecate low level API ( #1877 )
...
fixes #1872
2017-05-08 03:24:42 +08:00
Alex Lam S.L
e54748365c
support minify() output as AST ( #1878 )
...
- `options.output.ast` (default `false`)
- `options.output.code` (default `true`)
2017-05-08 02:11:45 +08:00
Alex Lam S.L
69b5663653
restore report of supported options ( #1861 )
...
fixes #1859
2017-05-02 01:42:29 +08:00
Alex Lam S.L
b4b9305db0
fix parser bugs & CLI reporting ( #1827 )
...
fixes #1825
2017-04-19 04:27:13 +08:00
Alex Lam S.L
251ff1d1af
update README ( #1813 )
...
- mention major version bump
- remove reference to internal API
2017-04-16 04:04:28 +08:00
Alex Lam S.L
ec443e422c
unify CLI & API under minify() ( #1811 )
...
- rename `screw_ie8` to `ie8`
- rename `mangle.except` to `mangle.reserved`
- rename `mangle.properties.ignore_quoted` to `mangle.properties.keep_quoted`
- compact `sourceMap` options
- more stringent verification on input `options`
- toplevel shorthands
- `ie8`
- `keep_fnames`
- `toplevel`
- `warnings`
- support arrays and unquoted string values on CLI
- drop `fromString` from `minify()`
- `minify()` no longer handles any `fs` operations
- unify order of operations for `mangle_properties()` on CLI & API
- `bin/uglifyjs` used to `mangle_properties()` before even `Compressor`
- `minify()` used to `mangle_properties()` after `Compressor` but before `mangle_names()`
- both will now do `Compressor`, `mangle_names()` then `mangle_properties()`
- `options.parse` / `--parse` for parser options beyond `bare_returns`
- add `mangle.properties.builtins` to disable built-in reserved list
- disable with `--mangle-props builtins` on CLI
- `warnings` now off by default
- add `--warn` and `--verbose` on CLI
- drop `--enclose`
- drop `--export-all`
- drop `--reserved-file`
- use `--mangle reserved` instead
- drop `--reserve-domprops`
- enabled by default, disable with `--mangle-props domprops`
- drop `--prefix`
- use `--source-map base` instead
- drop `--lint`
- remove `bin/extract-props.js`
- limit exposure of internal APIs
- update documentations
closes #96
closes #102
closes #136
closes #166
closes #243
closes #254
closes #261
closes #311
closes #700
closes #748
closes #912
closes #1072
closes #1366
fixes #101
fixes #123
fixes #124
fixes #263
fixes #379
fixes #419
fixes #423
fixes #461
fixes #465
fixes #576
fixes #737
fixes #772
fixes #958
fixes #1036
fixes #1142
fixes #1175
fixes #1220
fixes #1223
fixes #1280
fixes #1359
fixes #1368
2017-04-15 23:50:50 +08:00
Alex Lam S.L
2244743545
convert AST_Seq from binary tree to array ( #1460 )
...
- rename `AST_Seq` to `AST_Sequence`
- raise default sequences_limit from 200 to 800
2017-04-12 21:56:27 +08:00
kzc
79334dda10
fix regression: CLI options with hyphens like -b ascii-only ( #1640 )
...
fixes #1637
2017-03-24 11:55:03 +08:00
Alex Lam S.L
1f0333e9f1
stay safe with constants in IE8- ( #1547 )
...
- `undefined` etc. can be redefined at top-level for IE8-, so disable related optimisations
- fixed `--support-ie8` catch mangle bug
2017-03-05 12:51:11 +08:00
Alex Lam S.L
ea9ab9fb0e
resolve issue with outdated version of async ( #1549 )
...
fixes #746
2017-03-05 01:54:20 +08:00
Alex Lam S.L
872270b149
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
2017-02-27 03:40:54 +08:00
Alex Lam S.L
cf0951f726
allow --in-source-map inline ( #1490 )
...
- limited to one input file (or `stdin`)
- only works with built-in parser
fixes #520
2017-02-25 04:11:21 +08:00
alexlamsl
8898b8a0fe
clean up max_line_len
...
- never exceed specified limit
- otherwise warning is shown
- enabled only for final output
closes #1496
2017-02-21 13:29:58 +08:00
Alex Lam S.L
1eaa211e09
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()
2017-01-26 12:18:28 +01:00
kzc
ec2e5fa3a2
Have minify() and tests use figure_out_scope() as uglifyjs CLI does
...
Clarify docs, help and tests for --support-ie8 and screw_ie8=false
2017-01-19 17:14:33 +01:00
Ashley (Scirra)
2a9989dd18
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
2016-11-29 20:25:39 +01: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
pengzhenqing
e51c6ba380
Add an option for writing inline source map
2016-10-23 21:21:39 +02:00
Richard van Velzen
e05510f3bc
Add an option to wrap IIFEs in parenthesis
...
For #1307 .
2016-10-06 14:11:32 +02:00