Packages

terser

5.51.2 · 27 Aug 2026BSD-2-Clause118.8M / weekRepositoryHomepagenpmAtom feed

Your version

4.0.0

major19 May 2019Where it was published

4.8.2 is the newest release of 4.x.

In short

1 breaking1 new2 fixed5 changed

  • Breaking

    The variables property of all scopes has become a standard JavaScript Map as opposed to the old bespoke Dictionary object.

Security

1 advisory affects 4.0.0; 4.8.1 fixes them

Release note

  • Breaking

    The variables property of all scopes has become a standard JavaScript Map as opposed to the old bespoke Dictionary object.

  • Typescript definitions were fixed

  • terser --help was fixed

  • The public interface was cleaned up

  • Fixed optimisation of Array and new Array

  • Added the keep_quoted=strict mode 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.