NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #529 most downloaded on npm
JavaScript parser, mangler/compressor and beautifier toolkit for ES6+
Last release 1 months ago
27 Aug 2026
Ships fairly regularly
a new release about every 5 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
8 years old
210 releases · first in 2018
in operator now taken into account during property mangle.
in operator now taken into account during property mangle.Nothing published for this version
Nothing published for this version
One column per quarter.
BREAKING: Internal AST is no longer exposed, so that it can be improved without releasing breaking changes.
minify() is now async and rejects a promise instead of returning an error.import and require() too.Security fix for RegExps that should not be evaluated (regexp DDOS)
Support for numeric separators (million = 1_000_000) was added.
million = 1_000_000) was added.yield wasn't considered a valid property key in generators.A bug was fixed where an arrow function would have the wrong size
arguments object is now considered safe to retrieve properties from (useful for length, or 0) even when pure_getters is not set.const declarations without value (which is invalid) in some corner cases when using collapse_vars.Fixed issue where ES5 object properties were being turned into ES6 object properties due to more lax unicode rules.
e in them.Fixed subtree comparison code, making it see that [1,[2, 3]] is different from [1, 2, [3]]
[1,[2, 3]] is different from [1, 2, [3]]Read unused classes' properties and method keys, to figure out if they use other variables.
this in function calls.x ?? y), plus basic optimization for it.+ have been further optimizedDo not use reduce_vars when classes are present
Check if block scopes actually exist in blocks
Take into account "executed bits" of classes like static properties or computed keys, when checking if a class evaluation might throw or have side eff
Some new performance gains through a AST_Node.size() method which measures a node's source code length without printing it to a string first.
AST_Node.size() method which measures a node's source code length without printing it to a string first.--comments to false in the CLI has been fixed.unsafe_symbols compress option was added, which turns Symbol("name") into just Symbol()AST_Node.equivalent_to(other) method (which was reverted in v4.6.6).Reverted code to 4.6.4 to allow for more time to investigate an issue.
(hotfix release)
Improved compress performance through using a new method to see if two nodes are equivalent, instead of printing them to a string.
The "some" value in the comments output option now preserves @lic and other important comments when using //
"some" value in the comments output option now preserves @lic and other important comments when using //</script> is now better escaped in regex, and in comments, when using the inline_script output optionnew RegExp into /.../ when slashes are included in the sourceAST_Node.prototype.constructor now exists, allowing for easier debugging of crashesAnnotations such as /*#__NOINLINE__*/ and /*#__PURE__*/ may now be preserved using the preserve_annotations output option
/*#__NOINLINE__*/ and /*#__PURE__*/ may now be preserved using the preserve_annotations output optionkeep_quoted output option.A bug where functions were inlined into other functions with scope conflicts has been fixed.
/*#__NOINLINE__*/ annotation fixed for more use cases where inlining happens.Fixed an issue where a class is duplicated by reduce_vars when there's a recursive reference to the class.
Fixed issues with recursive class references.
Fixed issue where () => ({})[something] was not parenthesised correctly.
(hotfix release)
() => ({})[something] was not parenthesised correctly.An issue where keep_fnames combined with functions declared through variables was causing name shadowing has been fixed
keep_numbers has been added, which prevents Terser from turning 1000 into 1e3 and suchNumber and BigInt parsing has been fixed
/*#__INLINE__*/ annotation fixed for arrow functions with non-block bodies.Fixed a problem with inlining identity functions
*note:* This introduced a feature, therefore it should have been a minor release.
note: This introduced a feature, therefore it should have been a minor release.
unsafe was enabled.let statements might be collapsed out of their scope.Added /*#__INLINE__*/ and /*#__NOINLINE__*/ annotations for calls. If a call has one of these, it either forces or forbids inlining.
/*#__INLINE__*/ and /*#__NOINLINE__*/ annotations for calls. If a call has one of these, it either forces or forbids inlining.Fixed a problem where window was considered safe to access, even though there are situations where it isn't (Node.js, workers...)
window was considered safe to access, even though there are situations where it isn't (Node.js, workers...)++ and -- were considered side-effect freeNumber(x) now needs both unsafe and and unsafe_math to be compressed into +x because x might be a BigIntkeep_fnames now correctly supports regexes when the function is in a variable declarationFixed syntax error when repeated semicolons were encountered in classes
Fixed issue with mangle's keep_fnames option, introduced when adding code to keep variable names of anonymous functions
keep_fnames option, introduced when adding code to keep variable names of anonymous functions- Typescript typings fix
Parsing of regex options in the CLI (which broke in v4.3.5) was fixed.
(crash hotfix)
(crash hotfix)
Fixed an issue with DOS line endings strings separated by \ and a new line.
\ and a new line.const x = () => { ... } or var func = function () {...}) are now preserved when keep_fnames is true.Fixed a regression where the output size was increased when unused classes were referred to in the extends clause of a class.
@preserve, @license, @cc_on as well as comments starting with /*! and /**! are now preserved by default.This ensures Terser is able to process new, unknown RegExp flags and features. This is a breaking change in the AST node AST_RegExp.
async in destructuring arguments with default value.extends clauses.Ensure that functions can't be inlined, by reduce_vars, into places where they're accessing variables with the same name, but from somewhere else.
Fixed an issue from 4.3.0 where any block scope within a for loop erroneously had its parent set to the function scopee
Do not drop computed object keys with side effects
try and switchFixed a bug similar to #369 in collapse_vars
When the source map URL is inline, don't write it to a file.
inline, don't write it to a file.mangle.properties.undeclared option was added. This enables the property mangler to mangle properties of variables which can be found in the name cache, but whose properties are not known to this Terser run.RegExp("\\\n") includes an actual newline is now fixed.Fixed a crash when inlining a function into somewhere else when it has interdependent, non-removable variables.
Several issues with the reduce_vars option were fixed.
reduce_vars option were fixed.- The hotfix was hotfixed
Fixed a bug where toplevel scopes were being mixed up with lambda scopes
Internal functions were replaced by Object.assign, Array.prototype.some, Array.prototype.find and Array.prototype.every.
Object.assign, Array.prototype.some, Array.prototype.find and Array.prototype.every.(Hotfix release. Reverts unmapped segments PR #342, which will be put back on Terser when the upstream issue is resolved)
(Hotfix release. Reverts unmapped segments PR #342, which will be put back on Terser when the upstream issue is resolved)
Collisions between the arguments of inlined functions and names in the outer scope are now being avoided while inlining
collapse_vars when functions are created with the same name as a variable which already existsMutationObserverInit (Object with options for initialising a mutation observer) properties to the DOM property listError subclasses are now internally used instead of old-school Error inheritance hacks.breaking change: The variables property of all scopes has become a standard JavaScript Map as opposed to the old bespoke Dictionary object.
variables property of all scopes has become a standard JavaScript Map as opposed to the old bespoke Dictionary object.terser --help was fixedArray and new Arraykeep_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.More DOM properties added to --mangle-properties's DOM property list
hasOwnProperty.callnew Array(<number>) with an array literalSet and the includes method for strings and arraysFixed issue where Terser being imported with import would cause it not to work due to the __esModule property. (PR #254 was submitted, which was nice,
import would cause it not to work due to the __esModule property. (PR #254 was submitted, which was nice, but since it wasn't a pure commonJS approach I decided to go with my own solution)No longer leaves names like Array or Object or window as a SimpleStatement (statement which is just a single expression).
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →