terser
5.51.2 · 27 Aug 2026BSD-2-Clause118.8M / weekRepositoryHomepagenpmAtom feed
Upgrading terser From 3.7.4 to 4.8.1
79 releases in betweennotes for 48
Counted from 48 of 79 release notes. Advisories are counted from the advisory database, in full.
Before you upgrade
Tick each one off as you go- Breaking4.3.3
- Breaking4.0.0
- Breaking3.16.0
Security
Fixes 1 advisory affecting 3.7.4
- Terser insecure use of regular expressions leads to ReDoShigh · GHSA-4wf5-vphf-c2xc
- 4.8.1
Security fix for RegExps that should not be evaluated (regexp DDOS)
Release by release
- Security
Security fix for RegExps that should not be evaluated (regexp DDOS)
- Security
- New
Support for numeric separators (
million = 1_000_000) was added. - Fixed
Fixed bug where
yieldwasn't considered a valid property key in generators.
- New
- Fixed
Fixed erroneous
constdeclarations without value (which is invalid) in some corner cases when usingcollapse_vars.
- Fixed
- Fixed
Fixed issue where ES5 object properties were being turned into ES6 object properties due to more lax unicode rules.
- Fixed
Fixed parsing of BigInt with lowercase
ein them.
- Fixed
- Fixed
Fixed subtree comparison code, making it see that
[1,[2, 3]]is different from[1, 2, [3]]
- Fixed
- Fixed
Prevent inlining into block scopes when there are name collisions
- Fixed
- Fixed
Do not use reduce_vars when classes are present
- Fixed
4.6.8 – 4.6.92 releases, nothing new or fixed in the notes
93 other lines we could not sort, mostly version bumps
- 4.8.0
Assigning properties to a class is now assumed to be pure.
- 4.7.0
A bug was fixed where an arrow function would have the wrong size
- 4.7.0
argumentsobject is now considered safe to retrieve properties from (useful forlength, or0) even whenpure_gettersis not set. - 4.6.12
Printing of unicode identifiers has been improved
- 4.6.11
Read unused classes' properties and method keys, to figure out if they use other variables.
- 4.6.11
Functions are no longer inlined into parameter defaults, because they live in their own special scope.
- 4.6.11
When inlining identity functions, take into account the fact they may be used to drop
thisin function calls. - 4.6.11
Nullish coalescing operator (
x ?? y), plus basic optimization for it. - 4.6.11
Template literals in binary expressions such as
+have been further optimized - 4.6.9
Check if block scopes actually exist in blocks
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.