terser
5.51.2 · 27 Aug 2026BSD-2-Clause118.8M / weekRepositoryHomepagenpmAtom feed
Upgrading terser From 3.17.0 to 4.0.0
1 release in betweenevery note read
- 1
- change to make
- 0
- advisories fixed
- 1
- new
- 2
- fixes
Before you upgrade
Tick each one off as you go- Breaking4.0.0
Security
1 advisory still affects 4.0.0
- Terser insecure use of regular expressions leads to ReDoShigh · GHSA-4wf5-vphf-c2xc
Upgrading to 4.8.1 clears it.
Release by release
- Breaking
The
variablesproperty of all scopes has become a standard JavaScriptMapas opposed to the old bespokeDictionaryobject. - New
Added 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
Fixed optimisation of
Arrayandnew Array - Fixed
Fixed parent functions' parameters being shadowed in some cases
- Breaking
5 other lines we could not sort, mostly version bumps
- 4.0.0
Typescript definitions were fixed
- 4.0.0
terser --helpwas fixed - 4.0.0
The public interface was cleaned up
- 4.0.0
Allowed Terser to run in a situation where there are custom functions attached to Object.prototype
- 4.0.0
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.