esbuild
0.28.2 · 8 Aug 2026MIT439.7M / weekRepositoryHomepagenpmAtom feed
0.28.2 is the newest release of 0.14.x.
In short
1 new1 fixed
Security
1 advisory affects 0.14.16
- Moderateesbuild enables any website to send any requests to the development server and read the responseGHSA-67mh-4wv8-2f99 · 10 Feb 2025No fix yet
Release note
Support property name mangling with some TypeScript syntax features
The newly-released
--mangle-props=feature previously only affected JavaScript syntax features. This release adds support for using mangle props with certain TypeScript syntax features:TypeScript parameter properties
Parameter properties are a TypeScript-only shorthand way of initializing a class field directly from the constructor argument list. Previously parameter properties were not treated as properties to be mangled. They should now be handled correctly:
// Original code class Foo { constructor(public foo_) {} } new Foo().foo_; // Old output (with --minify --mangle-props=_) class Foo{constructor(c){this.foo_=c}}new Foo().o; // New output (with --minify --mangle-props=_) class Foo{constructor(o){this.c=o}}new Foo().c;TypeScript namespaces
Namespaces are a TypeScript-only way to add properties to an object. Previously exported namespace members were not treated as properties to be mangled. They should now be handled correctly:
// Original code namespace ns { export let foo_ = 1; export function bar_(x) {} } ns.bar_(ns.foo_); // Old output (with --minify --mangle-props=_) var ns;(e=>{e.foo_=1;function t(a){}e.bar_=t})(ns||={}),ns.e(ns.o); // New output (with --minify --mangle-props=_) var ns;(e=>{e.e=1;function o(p){}e.t=o})(ns||={}),ns.t(ns.e);
Fix property name mangling for lowered class fields
This release fixes a compiler crash with
--mangle-props=and class fields that need to be transformed to older versions of JavaScript. The problem was that doing this is an unusual case where the mangled property name must be represented as a string instead of as a property name, which previously wasn't implemented. This case should now work correctly:// Original code class Foo { static foo_; } Foo.foo_ = 0; // New output (with --mangle-props=_ --target=es6) class Foo { } __publicField(Foo, "a"); Foo.a = 0;
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.