terser
5.51.2 · 27 Aug 2026BSD-2-Clause118.8M / weekRepositoryHomepagenpmAtom feed
4.8.2 is the newest release of 4.x.
In short
1 breaking1 new1 fixed2 changed
- Breaking
Stopped using raw RegExp objects, since the spec is going to continue to evolve. This ensures Terser is able to process new, unknown RegExp flags and features. This is a breaking change in the AST node AST_RegExp.
Security
1 advisory affects 4.3.3; 4.8.1 fixes them
- HighTerser insecure use of regular expressions leads to ReDoSGHSA-4wf5-vphf-c2xc · 16 Jul 2022Fixed in 4.8.1
Release note
Fixed a problem where parsing template strings would mix up octal notation and a slash followed by a zero representing a null character.
Started accepting the name
asyncin destructuring arguments with default value.Now Terser takes into account side effects inside class
extendsclauses.Added parens whenever there's a comment between a return statement and the returned value, to prevent issues with ASI.
- Breaking
Stopped using raw RegExp objects, since the spec is going to continue to evolve. This ensures Terser is able to process new, unknown RegExp flags and features. This is a breaking change in the AST node AST_RegExp.
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.