Alex Lam S.L
9db0695b10
fix cascade on multi-branch evaluations ( #2067 )
...
Partially reverts #2059 as this has better coverage and performance.
fixes #2062
2017-06-07 19:52:01 +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
b9ad53d1ab
fix inline handling of AST_Call.args ( #2059 )
2017-06-06 22:55:25 +08:00
Alex Lam S.L
b0eab71470
implement test/jetstream.js --debug ( #2058 )
2017-06-06 19:28:12 +08:00
Alex Lam S.L
3493a182b2
implement function inlining ( #2053 )
...
- empty body
- single `AST_Return`
- single `AST_SimpleStatement`
- avoid `/*#__PURE__*/`
Miscellaneous
- enhance single-use function substitution
fixes #281
2017-06-06 05:49:53 +08:00
Alex Lam S.L
27c5284d3d
workaround webkit parsing error ( #2056 )
...
apply `webkit` to jetstream tests
2017-06-06 04:06:42 +08:00
Alex Lam S.L
540220b91b
fix AST_Function scope invariance ( #2052 )
...
improve function name hack in `run_code()`
2017-06-04 19:27:43 +08:00
Alex Lam S.L
84634da4b5
add tests for AST_SymbolAccessor ( #2049 )
2017-06-03 16:08:10 +08:00
Alex Lam S.L
1743621889
clean up lib/parse.js ( #2047 )
...
- remove unused definitions
- replace `array_to_hash()`
2017-06-03 14:00:59 +08:00
kzc
f330ab743a
better document behavior of unsafe_Func ( #2043 )
2017-06-02 12:07:17 +08:00
Alex Lam S.L
4377e932ca
v3.0.15
v3.0.15
2017-06-01 18:12:38 +08:00
Alex Lam S.L
bac14ba881
fix non-identifier getter/setter name ( #2041 )
...
fixes #2040
2017-06-01 18:11:16 +08:00
Alex Lam S.L
ec095ed647
whitelist unsafe evaluate candidates ( #2039 )
...
- all arguments may accept constant values
- return constant value
- free of side effects
- available & identical across locales and runtime environments
2017-06-01 04:33:05 +08:00
Alex Lam S.L
17e73121fa
enhance unsafe evaluate ( #2037 )
2017-06-01 00:56:28 +08:00
kzc
f71e8fd948
reformat mangle options section of README ( #2036 )
2017-05-31 21:52:43 +08:00
Alex Lam S.L
3e62faa64f
v3.0.14
v3.0.14
2017-05-31 11:34:51 +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
4e0a22e5c8
v3.0.13
v3.0.13
2017-05-29 10:52:13 +08:00
Alex Lam S.L
1aa38051fb
better fix for #512 & #2010 ( #2019 )
...
- remove duplicated functionalities
- fix similar issue with `else`
2017-05-29 10:51:41 +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
79131cd647
extend node_version range on applicable tests ( #2015 )
2017-05-27 22:18:28 +08:00
Alex Lam S.L
c3f14a1481
v3.0.12
v3.0.12
2017-05-27 18:08:09 +08:00
Alex Lam S.L
7b13159cda
fix hoist_funs on block-scoped function under "use strict" ( #2013 )
...
Technically not part of ES5, but commonly used code exists in the wild.
2017-05-27 17:44:59 +08:00
Alex Lam S.L
95094b9c22
fix if_return on AST_Defun ( #2010 )
...
Previous fiix for #1052 perturbs declaration order of functions which leads to incorrect behaviour under "use strict".
2017-05-27 13:41:49 +08:00
kzc
1ff8e9dd38
clarify what --mangle-props does ( #2012 )
2017-05-27 13:17:30 +08:00
kzc
78309a293d
better document mangle properties options ( #2009 )
2017-05-27 02:28:43 +08:00
kzc
695e182d59
fix and expand --mangle-props documentation ( #2008 )
...
fixes #2007
2017-05-27 01:25:51 +08:00
Alex Lam S.L
dc33facfcb
fix dead_code on block-scoped function under "use strict" ( #2006 )
...
Technically not part of ES5, but commonly used code exists in the wild.
2017-05-26 16:08:51 +08:00
Alex Lam S.L
c70fb60384
clean up lib/scope.js ( #2003 )
...
fixes #2004
2017-05-26 03:58:35 +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
a277fe168d
ensure new line after describe_ast() ( #1999 )
2017-05-25 02:32:36 +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
e95052a423
v3.0.11
v3.0.11
2017-05-23 22:26:59 +08:00
Alex Lam S.L
e667f0acb8
fix source map offset ( #1993 )
...
Account for whitespace insertions.
fixes #505
fixes #890
2017-05-23 20:25:48 +08:00
kzc
69ac794bc8
add another minify() options example ( #1988 )
2017-05-22 12:19:07 +08:00
Alex Lam S.L
efdb65913b
improve usability of global_defs in minify() ( #1987 )
...
Use `@key` to `parse()` string value as `AST_Node`.
fixes #1986
2017-05-22 01:38:43 +08:00
kzc
a1dedeb3ce
more refinement of minify() documentation ( #1983 )
2017-05-21 04:55:03 +08:00
Alex Lam S.L
d3c4a8e9e7
v3.0.10
v3.0.10
2017-05-21 01:30:17 +08:00
kzc
7e164aba8f
add "es5" to package.json keywords ( #1980 )
2017-05-20 22:09:50 +08:00
kzc
22aedef849
document minify() option toplevel ( #1979 )
2017-05-20 22:09:21 +08:00
Alex Lam S.L
58fae7dc07
enhance if_return to handle return void... ( #1977 )
...
fixes #512
2017-05-20 15:58:46 +08:00
kzc
5bf8d7e949
document 3.x minify() does not throw errors ( #1975 )
2017-05-20 10:49:35 +08:00
kzc
1df9d06f4a
document minify warnings and add an error example ( #1973 )
2017-05-19 17:20:21 +08:00
Alex Lam S.L
3408fc9d32
v3.0.9
v3.0.9
2017-05-19 09:35:26 +08:00
Alex Lam S.L
eae26756f1
introduce unsafe_regexp ( #1970 )
...
fixes #1964
2017-05-19 09:06:29 +08:00
Alex Lam S.L
43add9416b
v3.0.8
v3.0.8
2017-05-18 14:49:40 +08:00
Alex Lam S.L
efcf167e5e
make expect_stdout node version specific ( #1963 )
...
... via semver string on `node_version` label.
2017-05-18 11:28:35 +08:00