terser
5.51.2 · 27 Aug 2026BSD-2-Clause118.8M / weekRepositoryHomepagenpmAtom feed
4.8.2 is the newest release of 4.x.
In short
1 new1 fixed8 changed
Security
1 advisory affects 4.0.1; 4.8.1 fixes them
- HighTerser insecure use of regular expressions leads to ReDoSGHSA-4wf5-vphf-c2xc · 16 Jul 2022Fixed in 4.8.1
Release note
Collisions between the arguments of inlined functions and names in the outer scope are now being avoided while inlining
Unmapped segments are now preserved when compressing a file which has source maps
Default values of functions are now correctly converted from Mozilla AST to Terser AST
JSON ⊂ ECMAScript spec (if you don't know what this is you don't need to)
Export AST_* classes to library users
Fixed issue with
collapse_varswhen functions are created with the same name as a variable which already existsAdded
MutationObserverInit(Object with options for initialising a mutation observer) properties to the DOM property listCustom
Errorsubclasses are now internally used instead of old-school Error inheritance hacks.Documentation fixes
Performance optimizations
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.