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 breaking1 new2 fixed5 changed
- Breaking
The
variablesproperty of all scopes has become a standard JavaScriptMapas opposed to the old bespokeDictionaryobject.
Security
1 advisory affects 4.0.0; 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
- Breaking
The
variablesproperty of all scopes has become a standard JavaScriptMapas opposed to the old bespokeDictionaryobject. Typescript definitions were fixed
terser --helpwas fixedThe public interface was cleaned up
Fixed optimisation of
Arrayandnew ArrayAdded the
keep_quoted=strictmode to mangle_props, which behaves more like Google Closure Compiler by mangling all unquoted property names, instead of reserving quoted property names automatically.Fixed parent functions' parameters being shadowed in some cases
Allowed Terser to run in a situation where there are custom functions attached to Object.prototype
And more bug fixes, optimisations and internal changes
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.