terser
5.51.2 · 27 Aug 2026BSD-2-Clause118.8M / weekRepositoryHomepagenpmAtom feed
Upgrading terser From 4.6.10 to 4.8.1
6 releases in betweenevery note read
- 0
- changes to make
- 1
- advisory fixed
- 1
- new
- 6
- fixes
Security
Fixes 1 advisory affecting 4.6.10
- 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
9 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
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.