Ecosyste.ms: OpenCollective
An open API service for software projects hosted on Open Collective.
github.com/terser/terser
🗜 JavaScript parser, mangler and compressor toolkit for ES6+
https://github.com/terser/terser
- one-use function call => IIFE should take `eval()` & `arguments` into account
- if unused par...
Merging from master for 2.8.10
5d5c7934a5defaed5ad0e6e4d73f659ba9f50694 authored almost 8 years ago8f4b45f4f814c04918382949b4bcaf7a8d910281 authored almost 8 years ago
e9920f7ca162ce062cc481b876be293d7324a714 authored almost 8 years ago
- similar case as #1578 but against #1450 instead
- fix `this` binding in #1450 as well
clos...
7e465d4a01f2cbcae24e1c60ee96969c14130287 authored almost 8 years agoaa80ee349d7c534a950ce6cba00c59ca0f7b5629 authored almost 8 years ago
fixes #1574
80e81765cf073be2f62010cc9d63bf6c3106a714 authored almost 8 years agothose were not optimised for `unused` before, which made it necessary for `reduce_vars` to have ...
711f88dcb49bc0daf0548f3ec240f680e05dfc27 authored almost 8 years ago344d11d591ca18416ce6fe7444e451609ee14689 authored almost 8 years ago
Function expression can be assigned to a variable and be given a name. Ensure function name is t...
c7cdcf06a65b70b557894c1680fc099d3c7aca6a authored almost 8 years ago3ee55748d466f36aff54383b53fb3deca144de97 authored almost 8 years ago
- omitting trailing semi-colon in do-while breaks non-browser parser, e.g. uglify-js 1.x
- trai...
`side-effects` did not account for IIFEs being able to reference itself thus making its return v...
bd6dee52abd607244d89f606a729e811a9b0b478 authored almost 8 years agoMerging from master for 2.8.8
952e2656eb6dd539f32eba3e72574c002bb3b247 authored almost 8 years ago240383a314ee5167d47044b749bd53f3a5adf693 authored almost 8 years ago
250b782b1e2461cb3e6cf0593c16e911c7a1cd91 authored almost 8 years ago
144052ca491144c65adc9d081b17ce100e3de59d authored almost 8 years ago
- report file sizes and overall run time
- exit with non-zero code upon error
`AST_Label.references` get `.initialize()` to `[]` every time after `.clone()`
So walk down t...
8a8a94a596f57981e2cc65ac37921b154a9992b7 authored almost 8 years ago
- expose function body to call sites for potential optimisations
- suppress substitution of var...
- unless `toplevel` is enabled
- global `const` works as before
3ac24219322384539caae803482ea257e7971cf2 authored almost 8 years ago
- unless both `beautify` & `screw-ie8` are enabled
- deprecate workaround for if-do-while-else
...
Merging from master for 2.8.7
3c2b3aeddb58848b076aacc05acc026b258e0110 authored almost 8 years agoaa605495f828e0c5acb86aa2f3e0ef91bacde87b authored almost 8 years ago
fixes #1537
33a26d456be26341ada729056c2f02882eb9ae4c authored almost 8 years agoa5d62a3fc6dcb334a2172bfbfdc4e25efe4367da authored almost 8 years ago
- `++a` is the one that is foldable
- transform `a++` into `++a` for better optimisation
49d9ac1c43b6c70ef98506949b76c2fe9d25b5b1 authored almost 8 years ago
33b5f3198469f53641172c0702a7f40566325fb0 authored almost 8 years ago
- consolidate `cascade` optimisations
- support ++/-- postfixes
- remove redundant optimisatio...
accounts for IE8- scoping
b70591be1a603d3c1728e6563691c3a192023d3f authored almost 8 years ago`unsafe` turns undefined keyword into a variable of the same name if found, but that interferes ...
b33e7f88e60f886ee3403c82ac2e3fb40caa698f authored almost 8 years ago
- `undefined` etc. can be redefined at top-level for IE8-, so disable related optimisations
- f...
fixes #1332
eb98a7f2f38f5de16b50560199ee7ec719a1e945 authored almost 8 years ago78d1bb92d4560b73099afddd3bd2a85641bf3002 authored almost 8 years ago
fixes #746
ea9ab9fb0e48b4bf011da67f86652f148ae6ed1a authored almost 8 years agoce54c9cceef68b78be7cc429988df26add904d9b authored almost 8 years ago
Bookmarklet for instance implicitedly assumes a "completion value" without using `return`.
The ...
safe operations
- `a === b` => `a == b`
- `a + -b` => `a - b`
- `-a + b` => `b - a`
- `a+ ...
Merging from master for 2.8.5
c8e61448cb1ea621d2fdab4567c42e9c3dcd852f authored almost 8 years agofixes #1531
f704e9b65c981191409e19297bb26bcca0802981 authored almost 8 years ago0b77d861a8f8c43fc4ced9d779cb4f9e7140048f authored almost 8 years ago
b5e0e8c2038c7c0ea13771891eb84f6e6f7bcbc3 authored almost 8 years ago
e5cb9275df257751b7322f34bca5e76cc519b974 authored almost 8 years ago
When #1450 optimises `a=b=42`, it stops after the first variable even if both are unused.
fix...
17b81350d46e369588523b421d4528212f0f3207 authored almost 8 years agofixes #1537
4d63d4f5b30d2b46f3b6ed4cfced277f4f8e428f authored almost 8 years ago70d72ad8065421908ff9a8658539359789c4f460 authored almost 8 years ago
fixes #1533
fe9227a41bd13a8e58be1e17636a96d09e0fd956 authored almost 8 years ago- fails to handle `break` in body
fixes #1532
b49e142a26094ccb0a6e9f597e7363ba02280eb4 authored almost 8 years agoee3b39b909c279a0115c7562cab2c9b37fb37c21 authored almost 8 years ago
9699ffb1afc8bead9fbc3643c6b90b14169ef02c authored almost 8 years ago
- "" + "a" => "a"
- "" + a + "b" => a + "b"
- "a" + "" => "a" (improving on #45)
Merging from master for 2.8.4
e27dab7e7c2bb752d93ac4152c55a611ab43ae68 authored almost 8 years ago80f3ad3ce0124881ac561dcf774c2ea139a385f1 authored almost 8 years ago
40ceddb48a6ea8d6864667574fa9db37ccc9a6bf authored almost 8 years ago
Avoid variable substitution in the following cases:
- use of variable before declaration
- dec...
bff7ad67bbab6ce0792292fba66d3a6cf8d1836f authored almost 8 years ago
Patched up `make_node()` without `orig`.
There may be other cases where `start` could be miss...
c2334baa4813bdde21d5a652de0c9da3733d06b6 authored almost 8 years agoMerging from master for 2.8.2
22f7af205da347459e67f272cb34068762883702 authored almost 8 years ago8a7a4749c717792111d1700985e359560cbcb65c authored almost 8 years ago
fb2b6c7c6f8ddc616d43201eec6e01dfa52a7c6a authored almost 8 years ago
Modules like webpack and grunt-contrib-uglify still uses `ast.transform(compressor)` before `Com...
f5cbe19b753bf84f8b11f96e2c91a8ca49525dba authored almost 8 years agob34fa11a13221b7ad26ea48f18fcf2f5903c94c1 authored almost 8 years ago
320984c5f59128e2973243b1ac80ae57179fd84d authored almost 8 years ago
... as we investigate #1516
4365a51237a61f512277ed0549b6042f3394a2ca authored almost 8 years agoMerging from master for 2.8.0
514fc68f4f58f83be1c9cbc6fc5b88f483f30813 authored almost 8 years agonot sure if `start.pos` is correct, but oh well
478aaab46904216e95af72ae9dfec4c6d6cb36f0 authored almost 8 years agoab217539e9bfa2f23cfec6697a9b4c4618dc7952 authored almost 8 years ago
update exception messages
a942dc07c40105ae92236d0cb0aa80d7ee554d96 authored almost 8 years agofixes #1510
a0eaff750dd5bc0655456091bdb7c539f3f33928 authored almost 8 years ago57777b6cfa8ba3de936864224f5d434399ccb3bf authored almost 8 years ago
- consolidate `side-effects` optimisations
- improve string `+` optimisation
- enhance literal...
8d205f7f398904c1ac61905a2dd43e713f1e98c9 authored almost 8 years ago
bc9bfd15a2f23043f685c47d53f9c06705d7521c authored almost 8 years ago
top-level block-variables not within blocks are global variables
9fc1c4b3b5804fa77a3d739126520d8fc7a0956f authored almost 8 years agoproperly compute for top-level block-variables
c59bf5e8d890f493bd78c8c632b79881536273d1 authored almost 8 years agofor `AST_Export` in `AST_Toplevel.figure_out_scope()`
d2d3a6e065a23867023f9970be707478786336f0 authored almost 8 years agocommit 32f76f7ff does not take into account `AST_SymbolFunarg` is also `AST_SymbolVar`, so don't ...
77557337160056ff789fd1a217e8169b11ac1665 authored almost 8 years agob3a987b0dff8fef5475de19ffaf1029ac049e345 authored almost 8 years ago
88a338f29e264959f3286a8bc34fc28c8f0e77a2 authored almost 8 years ago
0b0296eb2aebbb6f3df72d4e4ef22d447fe396ec authored almost 8 years ago
- better inheritance of `Error` sub-classes
- mark parse error against source in CLI
closes ...
872270b14986b2f24df406425eda5a3bf7a3b56a authored almost 8 years agob1c593a0419bf5ef0c6849262cb23bb34c97ea80 authored almost 8 years ago
- convert `[].forEach()` to for-loops
13be50a4a9e34d65fef834625f44545e849fed02 authored almost 8 years ago
- improve marking efficiency
- apply smarter `const` replacement to `var`
fixes #1501
16cd5d57a5cf7f5750104df0e5af246708fd493f authored almost 8 years ago
closes #1362
closes #1399
- limited to one input file (or `stdin`)
- only works with built-in parser
fixes #520
cf0951f72635f898ef9dc98ced3c73a1c488cc17 authored almost 8 years agoMakes direct usage within web browser easier, even if officially unsupported.
852f78491a212ba20841847436dab93abb0a8181 authored almost 8 years ago
- Use AST_Destructuring for lhf assignment patterns
- Use AST_DefaultAssign for default assignm...
[ES6] Remove duplicated code
85c1cba7609cd0c18290dee39d51f0d07845c80b authored almost 8 years ago2.8.0 staging
229e42cdee14c384b7a48bd0882bb27d98db040a authored almost 8 years ago- fix corner cases in `const` optimisation
- deprecate `/*@const*/`
fixes #1497
closes #1498
A function call or IIFE with an immediately preceding comment
containing `@__PURE__` or `#__PURE...
fixes #1492
closes #1493
- only drops side-effect-free arguments
- drop side-effect-free parts with discarded value from `...
- update modified flag between compress() passes
- support IIFE arguments
- fix corner case with ...
- utilise in_use_ids instead of unreferenced()
- drop_unused now up-to-date for subsequent passes...
closes #1459
6ffbecb72b515d6e9e6dee1f76d8f27e4b014854 authored almost 8 years ago- remove extra tree scanning phase for `negate_iife`
- `negate_iife` now only deals with the narr...