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
Passing minify() zero files will now throw a clean exception
minify() zero files will now throw a clean exception (#1450)drop_console supports passing in an array of console.* method names (#1445)Prevent creating very deeply nested ternaries from a long list of if..return
if..returnOne column per quarter.
Fix side effect detection of optional?.chains.
optional?.chains.fix performance hit from avoiding HTML comments in the output
Better avoid outputting and HTML comments.
</script> and HTML comments.async or staticAllow /*@__MANGLE_PROP__*/ annotation in object.property, in addition to property declarations.
/*@__MANGLE_PROP__*/ annotation in object.property, in addition to property declarations.Stop using recursion in hoisted defuns fix.
Fix major performance issue caused by hoisted defuns' scopes bugfix.
Add new /*@__MANGLE_PROP__*/ annotation, to mark properties that should be mangled.
/*@__MANGLE_PROP__*/ annotation, to mark properties that should be mangled.Add consistent sorting for v RegExp flag
v RegExp flaginert DOM attribute to dompropsFixes to mozilla AST input and output, for class properties, private properties and static blocks
configurable and enumerable, used in Object.defineProperty, added to domprops (#1393)Take into account the non-deferred bits of a class, such as static properties, while dropping unused code.
Fix crash when trying to negate a class (!class{})
!class{})yield/await and its argumentFix issue with trimming a static class property's contents accessing the class as this.
this.Be less conservative when detecting use-before-definition of var in hoisted functions.
var in hoisted functions.continue statementFix evaluating .length when the source array might've been mutated
.length when the source array might've been mutatedDrop vestigial = undefined default argument in IIFE calls
= undefined default argument in IIFE calls (#1366).length property when statically determinable@__KEY__ annotation to mangle string literals (#1365)Fix parentheses in output of optional chains (a?.b)
a?.b) (#1374)lhs_constants option, allowing to stop Terser from swapping comparison operands (#1361)Become even less conservative around function definitions for reduce_vars
reduce_varsimport.meta expressions such that method calls are allowedBecome less conservative with analyzing function definitions for reduce_vars
reduce_varsimport.meta as a real AST node and not an object.propertyCorrectly handle AST transform functions that mutate children arrays
Keep (defaultArg = undefined) => ..., because default args don't count for function length
(defaultArg = undefined) => ..., because default args don't count for function length?. optional chainscatch and finally aren't children of try in the AST\p{...}) to parse identifiers when availableEnsure function definitions, don't assume the values of variables defined after them.
Fix sourcemaps with non-ascii characters
let out of for initializers, as it can change scopingif (something) let x ("let" in braceless if body)asObject sourcemap option to typescript defs (#1321)Properly handle references in destructurings (const { [reference]: val } = ...)
const { [reference]: val } = ...).#privatefield in nested classescollapse_vars handle block scope correctlyDisallow private fields in object bodies
#privatefield in object (#1279)#privatefield in objectFixed missing parentheses around optional chains
let or const as the bodies of if statements (#1253)!== classes.Basic support for ES2022 class static initializer blocks.
AudioWorkletNode constructor options to domprops list (#1230)id(...expandedArgs)Security fix for RegExps that should not be evaluated (regexp DDOS)
keep_numbers option added to TypeScript defs
Switched to @jridgewell/source-map for sourcemap generation (#1190, #1181)
Removed self-assignments (varname=varname) (closes #1081)
varname=varname) (closes #1081)var destructuring (eg var { a, a } = x) (#1176)All calls to eval() were removed (#1171, #1184)
source-map was updated to 0.8.0-beta.0 (#1164)Fixed an issue with function definitions inside blocks
new in some situations (closes #1159)TERSER_DEBUG_DIR environment variable
TERSER_DEBUG_DIR environment variableUnicode code point escapes (\u{abcde}) are not emitted inside RegExp literals anymore
\u{abcde}) are not emitted inside RegExp literals anymore (#1147)Massive optimization to max_line_len
delete optional?.propertygetreturn someVariable = (async () => { ... })() (#1073)Collapsing switch cases with the same bodies (even if they're not next to each other) (#1070).
{ ...obj } (#1071)Fixed shadowing variables while moving code in some cases
Fixed issues with compressing functions defined in global_defs option
global_defs option (#1036)?? and ?. (#1045)package no longer require you to disable strict mode to be used as names.in operator in some for loops (it breaks parsing because of for..in loops)Avoided collapsing assignments together if it would place a chain assignment on the left hand side, which is invalid syntax (a?.b = c)
a?.b = c){ ...void 0 } -> {})Several compile-time evaluation and inlining fixes
reduce_funcs to be disabled again.spidermonkey options to parse and format (#974){get = "default val"} and {set = "default val"} in destructuring arguments.export default of an anonymous class with extendsMark assignments to the .prototype of a class as pure
.prototype of a class as pureawait on the left of ** (while accepting legacy non-parenthesised input)exports to domprops (#939)...thisBeautify option has been removed in #895
Nothing published for this version
Fixed object properties with unicode surrogates on safari.
Fixed crash when inlining uninitialized variable into template string.
Change let x = undefined to just let x
let x = undefined to just let xunsafe options. Reason: adding strings is not equivalent to template strings, due to valueOf differences.- Restore node 13 support
Hotfix release, fixes package.json "engines" syntax
Hotfix release, fixes package.json "engines" syntax
Fixed parentheses when outputting ?? mixed with || and &&
?? mixed with || and &&Avoid moving named functions into default exports.
Fixed a crash when hoisting (with hoist_vars) a destructuring variable declaration
hoist_vars) a destructuring variable declarationsource-map library has been updated, bringing memory usage and CPU time improvements when reading input source maps (the SourceMapConsumer is now WASM
source-map library has been updated, bringing memory usage and CPU time improvements when reading input source maps (the SourceMapConsumer is now WASM based).wrap_func_args option now also wraps arrow functions, as opposed to only function expressions.Prevented spread operations from being expanded when the expanded array/object contains getters, setters, or array holes.
+ operations.An issue with destructuring declarations when pure_getters is enabled has been fixed
pure_getters is enabled has been fixedFixed a crash when compressing object spreads in some cases
The parse step now doesn't accept an ecma option, so that all ES code is accepted.
ecma option, so that all ES code is accepted.foo?.default)Optional chaining syntax is now supported.
Typescript typings have been improved
import.meta is now supportedYour coding agent can read these notes before it upgrades. Set up the MCP server →