Packages

@esbuild/freebsd-x64

0.28.2 · 8 Aug 2026MIT11.9M / weekRepositoryHomepagenpmAtom feed

Your version

113 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.

  1. 0.28.x · latest line
  2. 0.28.2

    8 Aug 2026
    • Fix tree shaking bug due to TypeScript import alias

      This release fixes a bug that could cause esbuild to incorrectly tree-shake imports that are used in a TypeScript type alias under certain circumstances. Affected code uses a TypeScript-specific import assignment and looks something like this:

      import Base from './dep.js';
      import Alias = Base.SomeType;
    • Fix CSS minification bug involving &

      This release fixes a bug where esbuild's CSS minifier incorrectly removed a & when it was unsafe to do so. Here is an example:

      /* Original code */
      .a .b {
        & .b:not(& .c) {
          color: red;
        }
      }
      
      /* Old output (with --minify) */
      .a .b{.b:not(& .c){color:red}}
      
      /* New output (with --minify) */
      .a .b{& .b:not(& .c){color:red}}

      This should match <span class="a"><span class="b"><span class="b">yes</span></span></span> but not <span class="a"><span class="b">no</span></span>. The old output incorrectly matched both.

    • Avoid overwriting input files without --allow-overwrite

      For example: esbuild input.js --outfile=input.js tells esbuild to overwrite input.js with the output of running esbuild on it. This was supposed to already be prevented by default, but it accidentally regressed in version 0.17.0 and apparently didn't have any test coverage. The error message was being printed but the input file was still being overwritten. Oops.

      This release puts the original behavior back. With this release, esbuild should now actually avoid overwriting input files unless --allow-overwrite is explicitly present. This is done by not writing out any files when a build error is encountered.

  3. 0.28.1

    11 Jun 2026
    • Security

      Disallow \ in local development server HTTP requests (GHSA-g7r4-m6w7-qqqr)

      This release fixes a security issue where HTTP requests to esbuild's local development server could traverse outside of the serve directory on Windows using a \ backslash character. It happened due to the use of Go's path.Clean() function, which only handles Unix-style / characters. HTTP requests with paths containing \ are no longer allowed.

    • Security

      Add integrity checks to the Deno API (GHSA-gv7w-rqvm-qjhr)

      The previous release of esbuild added integrity checks to esbuild's npm install script. This release also adds integrity checks to esbuild's Deno install script. Now esbuild's Deno API will also fail with an error if the downloaded esbuild binary contains something other than the expected content.

      Note that esbuild's Deno API installs from registry.npmjs.org by default, but allows the NPM_CONFIG_REGISTRY environment variable to override this with a custom package registry. This change means that the esbuild executable served by NPM_CONFIG_REGISTRY must now match the expected content.

    • Avoid inlining using and await using declarations

      Previously esbuild's minifier sometimes incorrectly inlined using and await using declarations into subsequent uses of that declaration, which then fails to dispose of the resource correctly. This bug happened because inlining was done for let and const declarations by avoiding doing it for var declarations, which no longer worked when more declaration types were added. Here's an example:

      // Original code
      {
        using x = new Resource()
        x.activate()
      }
      
      // Old output (with --minify)
      new Resource().activate();
      
      // New output (with --minify)
      {using e=new Resource;e.activate()}
  4. 0.28.0

    2 Apr 2026
    • Add support for with { type: 'text' } imports

      The import text proposal has reached stage 3 in the TC39 process, which means that it's recommended for implementation. It has also already been implemented by Deno and Bun. So with this release, esbuild also adds support for it. This behaves exactly the same as esbuild's existing text loader. Here's an example:

      import string from './example.txt' with { type: 'text' }
      console.log(string)
    • Add integrity checks to fallback download path

      Installing esbuild via npm is somewhat complicated with several different edge cases (see esbuild's documentation for details). If the regular installation of esbuild's platform-specific package fails, esbuild's install script attempts to download the platform-specific package itself (first with the npm command, and then with a HTTP request to registry.npmjs.org as a last resort).

      This last resort path previously didn't have any integrity checks. With this release, esbuild will now verify that the hash of the downloaded binary matches the expected hash for the current release. This means the hashes for all of esbuild's platform-specific binary packages will now be embedded in the top-level esbuild package. Hopefully this should work without any problems. But just in case, this change is being done as a breaking change release.

    • Update the Go compiler from 1.25.7 to 1.26.1

      This upgrade should not affect anything. However, there have been some significant internal changes to the Go compiler, so esbuild could potentially behave differently in certain edge cases:

      You can read the Go 1.26 release notes for more information.

  5. 0.27.x
  6. 0.27.7

    2 Apr 2026
    • Fix lowering of define semantics for TypeScript parameter properties

      The previous release incorrectly generated class fields for TypeScript parameter properties even when the configured target environment does not support class fields. With this release, the generated class fields will now be correctly lowered in this case:

      // Original code
      class Foo {
        constructor(public x = 1) {}
        y = 2
      }
      
      // Old output (with --loader=ts --target=es2021)
      class Foo {
        constructor(x = 1) {
          this.x = x;
          __publicField(this, "y", 2);
        }
        x;
      }
      
      // New output (with --loader=ts --target=es2021)
      class Foo {
        constructor(x = 1) {
          __publicField(this, "x", x);
          __publicField(this, "y", 2);
        }
      }
  7. 0.27.6

    2 Apr 2026
  8. 0.27.5

    2 Apr 2026
    • Fix for an async generator edge case (#4401, #4417)

      Support for transforming async generators into the equivalent state machine was added in version 0.19.0. However, the generated state machine didn't work correctly when polling async generators concurrently, such as in the following code:

      async function* inner() { yield 1; yield 2 }
      async function* outer() { yield* inner() }
      let gen = outer()
      for await (let x of [gen.next(), gen.next()]) console.log(x)

      Previously esbuild's output of the above code behaved incorrectly when async generators were transformed (such as with --supported:async-generator=false). The transformation should be fixed starting with this release.

      This fix was contributed

    • Fix a regression when metafile is enabled (#4420, #4418)

      This release fixes a regression introduced by the previous release. When metafile: true was enabled in esbuild's JavaScript API, builds with build errors were incorrectly throwing an error about an empty JSON string instead of an object containing the build errors.

    • Use define semantics for TypeScript parameter properties

      Parameter properties are a TypeScript-specific code generation feature that converts constructor parameters into class fields when they are prefixed by certain keywords. When "useDefineForClassFields": true is present in tsconfig.json, the TypeScript compiler automatically generates class field declarations for parameter properties. Previously esbuild didn't do this, but esbuild will now do this starting with this release:

      // Original code
      class Foo {
        constructor(public x: number) {}
      }
      
      // Old output (with --loader=ts)
      class Foo {
        constructor(x) {
          this.x = x;
        }
      }
      
      // New output (with --loader=ts)
      class Foo {
        constructor(x) {
          this.x = x;
        }
        x;
      }
  9. 0.27.4

    12 Mar 2026
    • Fix a regression with CSS media queries (#4395, #4405, #4406)

      Version 0.25.11 of esbuild introduced support for parsing media queries. This unintentionally introduced a regression with printing media queries that use the <media-type> and <media-condition-without-or> grammar. Specifically, esbuild was failing to wrap an or clause with parentheses when inside <media-condition-without-or>. This release fixes the regression.

      Here is an example:

      /* Original code */
      @media only screen and ((min-width: 10px) or (min-height: 10px)) {
        a { color: red }
      }
      
      /* Old output (incorrect) */
      @media only screen and (min-width: 10px) or (min-height: 10px) {
        a {
          color: red;
        }
      }
      
      /* New output (correct) */
      @media only screen and ((min-width: 10px) or (min-height: 10px)) {
        a {
          color: red;
        }
      }
    • Fix an edge case with the inject feature

      This release fixes an edge case where esbuild's inject feature could not be used with arbitrary module namespace names exported using an export {} from statement with bundling disabled and a target environment where arbitrary module namespace names is unsupported.

      With the fix, the following inject file:

      import jquery from 'jquery';
      export { jquery as 'window.jQuery' };

      Can now always be rewritten as this without esbuild sometimes incorrectly generating an error:

      export { default as 'window.jQuery' } from 'jquery';
    • Attempt to improve API handling of huge metafiles (#4329, #4415)

      This release contains a few changes that attempt to improve the behavior of esbuild's JavaScript API with huge metafiles (esbuild's name for the build metadata, formatted as a JSON object). The JavaScript API is designed to return the metafile JSON as a JavaScript object in memory, which makes it easy to access from within a JavaScript-based plugin. Multiple people have encountered issues where this API breaks down with a pathologically-large metafile.

      The primary issue is that V8 has an implementation-specific maximum string length, so using the JSON.parse API with large enough strings is impossible. This release will now attempt to use a fallback JavaScript-based JSON parser that operates directly on the UTF8-encoded JSON bytes instead of using JSON.parse when the JSON metafile is too big to fit in a JavaScript string. The new fallback path has not yet been heavily-tested. The metafile will also now be generated with whitespace removed if the bundle is significantly large, which will reduce the size of the metafile JSON slightly.

      However, hitting this case is potentially a sign that something else is wrong. Ideally you wouldn't be building something so enormous that the build metadata can't even fit inside a JavaScript string. You may want to consider optimizing your project, or breaking up your project into multiple parts that are built independently. Another option could potentially be to use esbuild's command-line API instead of its JavaScript API, which is more efficient (although of course then you can't use JavaScript plugins, so it may not be an option).

  10. 0.27.3

    5 Feb 2026
    • Preserve URL fragments in data URLs

      Consider the following HTML, CSS, and SVG:

      The CSS uses a URL fragment (the #x) to reference the clipPath element in the SVG file. Previously esbuild's CSS bundler didn't preserve the URL fragment when bundling the SVG using the dataurl loader, which broke the bundled CSS. With this release, esbuild will now preserve the URL fragment in the bundled CSS:

      /* icons.css */
      .triangle {
        width: 10px;
        height: 10px;
        background: currentColor;
        clip-path: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"><defs><clipPath id="x"><path d="M0 0H10V10Z"/></clipPath></defs></svg>#x');
      }
    • Parse and print CSS @scope rules

      This release includes dedicated support for parsing @scope rules in CSS. These rules include optional "start" and "end" selector lists. One important consequence of this is that the local/global status of names in selector lists is now respected, which improves the correctness of esbuild's support for CSS modules. Minification of selectors inside @scope rules has also improved slightly.

      Here's an example:

      /* Original code */
      @scope (:global(.foo)) to (:local(.bar)) {
        .bar {
          color: red;
        }
      }
      
      /* Old output (with --loader=local-css --minify) */
      @scope (:global(.foo)) to (:local(.bar)){.o{color:red}}
      
      /* New output (with --loader=local-css --minify) */
      @scope(.foo)to (.o){.o{color:red}}
    • Fix a minification bug with lowering of for await (#4378, #4385)

      This release fixes a bug where the minifier would incorrectly strip the variable in the automatically-generated catch clause of lowered for await loops. The code that generated the loop previously failed to mark the internal variable references as used.

  11. 0.27.2

    17 Dec 2025
    • Allow import path specifiers starting with #/

      Previously the specification for package.json disallowed import path specifiers starting with #/, but this restriction has recently been relaxed and support for it is being added across the JavaScript ecosystem. One use case is using it for a wildcard pattern such as mapping #/* to ./src/* (previously you had to use another character such as #_* instead, which was more confusing). There is some more context in nodejs/node#49182.

      This change was contributed

    • Automatically add the -webkit-mask prefix (#4357, #4358)

      This release automatically adds the -webkit- vendor prefix for the mask CSS shorthand property:

      /* Original code */
      main {
        mask: url(x.png) center/5rem no-repeat
      }
      
      /* Old output (with --target=chrome110) */
      main {
        mask: url(x.png) center/5rem no-repeat;
      }
      
      /* New output (with --target=chrome110) */
      main {
        -webkit-mask: url(x.png) center/5rem no-repeat;
        mask: url(x.png) center/5rem no-repeat;
      }

      This change was contributed

    • Additional minification of switch statements (#4176, #4359)

      This release contains additional minification patterns for reducing switch statements. Here is an example:

      // Original code
      switch (x) {
        case 0:
          foo()
          break
        case 1:
        default:
          bar()
      }
      
      // Old output (with --minify)
      switch(x){case 0:foo();break;case 1:default:bar()}
      
      // New output (with --minify)
      x===0?foo():bar();
  12. 0.27.1

    3 Dec 2025
    • Fix bundler bug with var nested inside if

      This release fixes a bug with the bundler that happens when importing an ES module using require (which causes it to be wrapped) and there's a top-level var inside an if statement without being wrapped in a { ... } block (and a few other conditions). The bundling transform needed to hoist these var declarations outside of the lazy ES module wrapper for correctness. See the issue for details.

    • Fix minifier bug with for inside try inside label

      This fixes an old regression from version v0.21.4. Some code was introduced to move the label inside the try statement to address a problem with transforming labeled for await loops to avoid the await (the transformation involves converting the for await loop into a for loop and wrapping it in a try statement). However, it introduces problems for cross-compiled JVM code that uses all three of these features heavily. This release restricts this transform to only apply to for loops that esbuild itself generates internally as part of the for await transform. Here is an example of some affected code:

      // Original code
      d: {
        e: {
          try {
            while (1) { break d }
          } catch { break e; }
        }
      }
      
      // Old output (with --minify)
      a:try{e:for(;;)break a}catch{break e}
      
      // New output (with --minify)
      a:e:try{for(;;)break a}catch{break e}
    • Inline IIFEs containing a single expression

      Previously inlining of IIFEs (immediately-invoked function expressions) only worked if the body contained a single return statement. Now it should also work if the body contains a single expression statement instead:

      // Original code
      const foo = () => {
        const cb = () => {
          console.log(x())
        }
        return cb()
      }
      
      // Old output (with --minify)
      const foo=()=>(()=>{console.log(x())})();
      
      // New output (with --minify)
      const foo=()=>{console.log(x())};
  13. 0.27.0

    9 Nov 2025
    • Use Uint8Array.fromBase64 if available

      With this release, esbuild's binary loader will now use the new Uint8Array.fromBase64 function unless it's unavailable in the configured target environment. If it's unavailable, esbuild's previous code for this will be used as a fallback. Note that this means you may now need to specify target when using this feature with Node (for example --target=node22) unless you're using Node v25+.

    • Update the Go compiler from v1.23.12 to v1.25.4 (#4208, #4311)

      This raises the operating system requirements for running esbuild:

  14. 0.26.x
  15. 0.26.0

    9 Nov 2025
    • Enable trusted publishing

      GitHub and npm are recommending that maintainers for packages such as esbuild switch to trusted publishing. With this release, a VM on GitHub will now build and publish all of esbuild's packages to npm instead of me. In theory.

      Unfortunately there isn't really a way to test that this works other than to do it live. So this release is that live test. Hopefully this release is uneventful and is exactly the same as the previous one (well, except for the green provenance attestation checkmark on npm that happens with trusted publishing).

  16. 0.25.x
  17. 0.25.12

    1 Nov 2025
    • Fix a minification regression with CSS media queries

      The previous release introduced support for parsing media queries which unintentionally introduced a regression with the removal of duplicate media rules during minification. Specifically the grammar for @media <media-type> and <media-condition-without-or> { ... } was missing an equality check for the <media-condition-without-or> part, so rules with different suffix clauses in this position would incorrectly compare equal and be deduplicated. This release fixes the regression.

    • Update the list of known JavaScript globals

      This release updates esbuild's internal list of known JavaScript globals. These are globals that are known to not have side-effects when the property is accessed. For example, accessing the global Array property is considered to be side-effect free but accessing the global scrollY property can trigger a layout, which is a side-effect. This is used by esbuild's tree-shaking to safely remove unused code that is known to be side-effect free. This update adds the following global properties:

      From ES2017:

      From ES2020:

      From ES2021:

      From ES2025:

      Note that this does not indicate that constructing any of these objects is side-effect free, just that accessing the identifier is side-effect free. For example, this now allows esbuild to tree-shake classes that extend from Iterator:

      // This can now be tree-shaken by esbuild:
      class ExampleIterator extends Iterator {}
    • Add support for the new @view-transition CSS rule

      With this release, esbuild now has improved support for pretty-printing and minifying the new @view-transition rule (which esbuild was previously unaware of):

      /* Original code */
      @view-transition {
        navigation: auto;
        types: check;
      }
      
      /* Old output */
      @view-transition { navigation: auto; types: check; }
      
      /* New output */
      @view-transition {
        navigation: auto;
        types: check;
      }

      The new view transition feature provides a mechanism for creating animated transitions between documents in a multi-page app. You can read more about view transition rules here.

      This change was contributed

  18. 0.25.11

    15 Oct 2025
    • Add support for with { type: 'bytes' } imports

      The import bytes proposal has reached stage 2.7 in the TC39 process, which means that although it isn't quite recommended for implementation, it's generally approved and ready for validation. Furthermore it has already been implemented by Deno and Webpack. So with this release, esbuild will also add support for this. It behaves exactly the same as esbuild's existing binary loader. Here's an example:

      import data from './image.png' with { type: 'bytes' }
      const view = new DataView(data.buffer, 0, 24)
      const width = view.getInt32(16)
      const height = view.getInt32(20)
      console.log('size:', width + '\xD7' + height)
    • Lower CSS media query range syntax (#3748, #4293)

      With this release, esbuild will now transform CSS media query range syntax into equivalent syntax using min-/max- prefixes for older browsers. For example, the following CSS:

      @media (640px <= width <= 960px) {
        main {
          display: flex;
        }
      }

      will be transformed like this with a target such as --target=chrome100 (or more specifically with --supported:media-range=false if desired):

      @media (min-width: 640px) and (max-width: 960px) {
        main {
          display: flex;
        }
      }
  19. 0.25.10

    17 Sep 2025
    • Fix a panic in a minification edge case

      This release fixes a panic due to a null pointer that could happen when esbuild inlines a doubly-nested identity function and the final result is empty. It was fixed by emitting the value undefined in this case, which avoids the panic. This case must be rare since it hasn't come up until now. Here is an example of code that previously triggered the panic (which only happened when minifying):

      function identity(x) { return x }
      identity({ y: identity(123) })
    • Fix @supports nested inside pseudo-element

      When transforming nested CSS to non-nested CSS, esbuild is supposed to filter out pseudo-elements such as ::placeholder for correctness. The CSS nesting specification says the following:

      The nesting selector cannot represent pseudo-elements (identical to the behavior of the ':is()' pseudo-class). We’d like to relax this restriction, but need to do so simultaneously for both ':is()' and '&', since they’re intentionally built on the same underlying mechanisms.

      However, it seems like this behavior is different for nested at-rules such as @supports, which do work with pseudo-elements. So this release modifies esbuild's behavior to now take that into account:

      /* Original code */
      ::placeholder {
        color: red;
        body & { color: green }
        @supports (color: blue) { color: blue }
      }
      
      /* Old output (with --supported:nesting=false) */
      ::placeholder {
        color: red;
      }
      body :is() {
        color: green;
      }
      @supports (color: blue) {
         {
          color: blue;
        }
      }
      
      /* New output (with --supported:nesting=false) */
      ::placeholder {
        color: red;
      }
      body :is() {
        color: green;
      }
      @supports (color: blue) {
        ::placeholder {
          color: blue;
        }
      }
  20. 0.25.9

    12 Aug 2025
    • Better support building projects that use Yarn on Windows (#3131, #3663)

      With this release, you can now use esbuild to bundle projects that use Yarn Plug'n'Play on Windows on drives other than the C: drive. The problem was as follows:

      Yarn works around this edge case by pretending Windows-style paths beginning with C:\ are actually Unix-style paths beginning with /C:/, so the ../.. path segments are able to navigate across drives inside Yarn's implementation. This was broken for a long time in esbuild but I finally got access to a Windows machine and was able to debug and fix this edge case. So you should now be able to bundle these projects with esbuild.

    • Preserve parentheses around function expressions

      The V8 JavaScript VM uses parentheses around function expressions as an optimization hint to immediately compile the function. Otherwise the function would be lazily-compiled, which has additional overhead if that function is always called immediately as lazy compilation involves parsing the function twice. You can read V8's blog post about this for more details.

      Previously esbuild did not represent parentheses around functions in the AST so they were lost during compilation. With this change, esbuild will now preserve parentheses around function expressions when they are present in the original source code. This means these optimization hints will not be lost when bundling with esbuild. In addition, esbuild will now automatically add this optimization hint to immediately-invoked function expressions. Here's an example:

      // Original code
      const fn0 = () => 0
      const fn1 = (() => 1)
      console.log(fn0, function() { return fn1() }())
      
      // Old output
      const fn0 = () => 0;
      const fn1 = () => 1;
      console.log(fn0, function() {
        return fn1();
      }());
      
      // New output
      const fn0 = () => 0;
      const fn1 = (() => 1);
      console.log(fn0, (function() {
        return fn1();
      })());

      Note that you do not want to wrap all function expressions in parentheses. This optimization hint should only be used for functions that are called on initial load. Using this hint for functions that are not called on initial load will unnecessarily delay the initial load. Again, see V8's blog post linked above for details.

    • Update Go from 1.23.10 to 1.23.12 (#4257, #4258)

      This should have no effect on existing code as this version change does not change Go's operating system support. It may remove certain false positive reports (specifically CVE-2025-4674 and CVE-2025-47907) from vulnerability scanners that only detect which version of the Go compiler esbuild uses.

  21. 0.25.8

    19 Jul 2025
    • Fix another TypeScript parsing edge case

      This fixes a regression with a change in the previous release that tries to more accurately parse TypeScript arrow functions inside the ?: operator. The regression specifically involves parsing an arrow function containing a #private identifier inside the middle of a ?: ternary operator inside a class body. This was fixed by propagating private identifier state into the parser clone used to speculatively parse the arrow function body. Here is an example of some affected code:

      class CachedDict {
        #has = (a: string) => dict.has(a);
        has = window
          ? (word: string): boolean => this.#has(word)
          : this.#has;
      }
    • Fix a regression with the parsing of source phase imports

      The change in the previous release to parse source phase imports failed to properly handle the following cases:

      import source from 'bar'
      import source from from 'bar'
      import source type foo from 'bar'

      Parsing for these cases should now be fixed. The first case was incorrectly treated as a syntax error because esbuild was expecting the second case. And the last case was previously allowed but is now forbidden. TypeScript hasn't added this feature yet so it remains to be seen whether the last case will be allowed, but it's safer to disallow it for now. At least Babel doesn't allow the last case when parsing TypeScript, and Babel was involved with the source phase import specification.

  22. 0.25.7

    18 Jul 2025
    • Parse and print JavaScript imports with an explicit phase

      This release adds basic syntax support for the defer and source import phases in JavaScript:

      This change only adds support for this syntax. These imports cannot currently be bundled by esbuild. To use these new features with esbuild's bundler, the imported paths must be external to the bundle and the output format must be set to esm.

    • Support optionally emitting absolute paths instead of relative paths (#338, #2082, #3023)

      This release introduces the --abs-paths= feature which takes a comma-separated list of situations where esbuild should use absolute paths instead of relative paths. There are currently three supported situations: code (comments and string literals), log (log message text and location info), and metafile (the JSON build metadata).

      Using absolute paths instead of relative paths is not the default behavior because it means that the build results are no longer machine-independent (which means builds are no longer reproducible). Absolute paths can be useful when used with certain terminal emulators that allow you to click on absolute paths in the terminal text and/or when esbuild is being automatically invoked from several different directories within the same script.

    • Fix a TypeScript parsing edge case

      This release fixes an edge case with parsing an arrow function in TypeScript with a return type that's in the middle of a ?: ternary operator. For example:

      x = a ? (b) : c => d;
      y = a ? (b) : c => d : e;

      The : token in the value assigned to x pairs with the ? token, so it's not the start of a return type annotation. However, the first : token in the value assigned to y is the start of a return type annotation because after parsing the arrow function body, it turns out there's another : token that can be used to pair with the ? token. This case is notable as it's the first TypeScript edge case that esbuild has needed a backtracking parser to parse. It has been addressed by a quick hack (cloning the whole parser) as it's a rare edge case and esbuild doesn't otherwise need a backtracking parser. Hopefully this is sufficient and doesn't cause any issues.

  23. 0.25.6

    7 Jul 2025

    Reading the note…

  24. 0.25.5

    27 May 2025

    Reading the note…

  25. 0.25.4

    6 May 2025

    Reading the note…

  26. 0.25.3

    23 Apr 2025

    Reading the note…

  27. 0.25.2

    30 Mar 2025

    Reading the note…

  28. 0.25.1

    10 Mar 2025

    Reading the note…

  29. 0.25.0

    8 Feb 2025
    • Security

      Restrict access to esbuild's development server (GHSA-67mh-4wv8-2f99)

      This change addresses esbuild's first security vulnerability report. Previously esbuild set the Access-Control-Allow-Origin header to * to allow esbuild's development server to be flexible in how it's used for development. However, this allows the websites you visit to make HTTP requests to esbuild's local development server, which gives read-only access to your source code if the website were to fetch your source code's specific URL. You can read more information in the report.

      Starting with this release, CORS will now be disabled, and requests will now be denied if the host does not match the one provided to --serve=. The default host is 0.0.0.0, which refers to all of the IP addresses that represent the local machine (e.g. both 127.0.0.1 and 192.168.0.1). If you want to customize anything about esbuild's development server, you can put a proxy in front of esbuild and modify the incoming and/or outgoing requests.

      In addition, the serve() API call has been changed to return an array of hosts instead of a single host string. This makes it possible to determine all of the hosts that esbuild's development server will accept.

    • Delete output files when a build fails in watch mode

      It has been requested for esbuild to delete files when a build fails in watch mode. Previously esbuild left the old files in place, which could cause people to not immediately realize that the most recent build failed. With this release, esbuild will now delete all output files if a rebuild fails. Fixing the build error and triggering another rebuild will restore all output files again.

    • Fix correctness issues with the CSS nesting transform (#3620, #3877, #3933, #3997, #4005, #4037, #4038)

      This release fixes the following problems:

  30. 0.24.x
  31. 0.24.2

    20 Dec 2024

    Reading the note…

  32. 0.24.1

    20 Dec 2024

    Reading the note…

  33. 0.24.0

    22 Sep 2024
    • Removed

      Drop support for older platforms

      This release drops support for the following operating system:

      This is because the Go programming language dropped support for this operating system version in Go 1.23, and this release updates esbuild from Go 1.22 to Go 1.23. Go 1.23 now requires macOS 11 Big Sur or later.

      Note that this only affects the binary esbuild executables that are published to the esbuild npm package. It's still possible to compile esbuild's source code for these older operating systems. If you need to, you can compile esbuild for yourself using an older version of the Go compiler (before Go version 1.23). That might look something like this:

      git clone https://github.com/evanw/esbuild.git
      cd esbuild
      go build ./cmd/esbuild
      ./esbuild --version
    • Fix class field decorators in TypeScript if useDefineForClassFields is false

      Setting the useDefineForClassFields flag to false in tsconfig.json means class fields use the legacy TypeScript behavior instead of the standard JavaScript behavior. Specifically they use assign semantics instead of define semantics (e.g. setters are triggered) and fields without an initializer are not initialized at all. However, when this legacy behavior is combined with standard JavaScript decorators, TypeScript switches to always initializing all fields, even those without initializers. Previously esbuild incorrectly continued to omit field initializers for this edge case. These field initializers in this case should now be emitted starting with this release.

    • Avoid incorrect cycle warning with tsconfig.json multiple inheritance

      TypeScript 5.0 introduced multiple inheritance for tsconfig.json files where extends can be an array of file paths. Previously esbuild would incorrectly treat files encountered more than once when processing separate subtrees of the multiple inheritance hierarchy as an inheritance cycle. With this release, tsconfig.json files containing this edge case should work correctly without generating a warning.

  34. 0.23.x
  35. 0.23.1

    16 Aug 2024

    Reading the note…

  36. 0.23.0

    2 Jul 2024
    • Revert the recent change to avoid bundling dependencies for node

      This release reverts the recent change in version 0.22.0 that made --packages=external the default behavior with --platform=node. The default is now back to --packages=bundle.

      I've just been made aware that Amazon doesn't pin their dependencies in their "AWS CDK" product, which means that whenever esbuild publishes a new release, many people (potentially everyone?) using their SDK around the world instantly starts using it without Amazon checking that it works first. This change in version 0.22.0 happened to break their SDK. I'm amazed that things haven't broken before this point. This revert attempts to avoid these problems for Amazon's customers. Hopefully Amazon will pin their dependencies in the future.

      In addition, this is probably a sign that esbuild is used widely enough that it now needs to switch to a more complicated release model. I may have esbuild use a beta channel model for further development.

    • Fix preserving collapsed JSX whitespace

      When transformed, certain whitespace inside JSX elements is ignored completely if it collapses to an empty string. However, the whitespace should only be ignored if the JSX is being transformed, not if it's being preserved. This release fixes a bug where esbuild was previously incorrectly ignoring collapsed whitespace with --jsx=preserve. Here is an example:

      // Original code
      <Foo>
        <Bar />
      </Foo>
      
      // Old output (with --jsx=preserve)
      <Foo><Bar /></Foo>;
      
      // New output (with --jsx=preserve)
      <Foo>
        <Bar />
      </Foo>;
  37. 0.22.x
  38. 0.22.0

    30 Jun 2024
    • Removed

      Drop support for older platforms

      This release drops support for the following operating systems:

      This is because the Go programming language dropped support for these operating system versions in Go 1.21, and this release updates esbuild from Go 1.20 to Go 1.22.

      Note that this only affects the binary esbuild executables that are published to the esbuild npm package. It's still possible to compile esbuild's source code for these older operating systems. If you need to, you can compile esbuild for yourself using an older version of the Go compiler (before Go version 1.21). That might look something like this:

      git clone https://github.com/evanw/esbuild.git
      cd esbuild
      go build ./cmd/esbuild
      ./esbuild.exe --version

      In addition, this release increases the minimum required node version for esbuild's JavaScript API from node 12 to node 18. Node 18 is the oldest version of node that is still being supported (see node's release schedule for more information). This increase is because of an incompatibility between the JavaScript that the Go compiler generates for the esbuild-wasm package and versions of node before node 17.4 (specifically the crypto.getRandomValues function).

    • Omit packages from bundles by default when targeting node (#1874, #2830, #2846, #2915, #3145, #3294, #3323, #3582, #3809, #3815)

      This breaking change is an experiment. People are commonly confused when using esbuild to bundle code for node (i.e. for --platform=node) because some packages may not be intended for bundlers, and may use node-specific features that don't work with a bundler. Even though esbuild's "getting started" instructions say to use --packages=external to work around this problem, many people don't read the documentation and don't do this, and are then confused when it doesn't work. So arguably this is a bad default behavior for esbuild to have if people keep tripping over this.

      With this release, esbuild will now omit packages from the bundle by default when the platform is node (i.e. the previous behavior of --packages=external is now the default in this case). Note that your dependencies must now be present on the file system when your bundle is run. If you don't want this behavior, you can do --packages=bundle to allow packages to be included in the bundle (i.e. the previous default behavior). Note that --packages=bundle doesn't mean all packages are bundled, just that packages are allowed to be bundled. You can still exclude individual packages from the bundle using --external: even when --packages=bundle is present.

      The --packages= setting considers all import paths that "look like" package imports in the original source code to be package imports. Specifically import paths that don't start with a path segment of / or . or .. are considered to be package imports. The only two exceptions to this rule are subpath imports (which start with a # character) and TypeScript path remappings via paths and/or baseUrl in tsconfig.json (which are applied first).

    • Update await using behavior to match TypeScript

      TypeScript 5.5 subtly changes the way await using behaves. This release updates esbuild to match these changes in TypeScript. You can read more about these changes in microsoft/TypeScript#58624.

  39. 0.21.x
  40. 0.21.5

    9 Jun 2024

    Reading the note…

  41. 0.21.4

    25 May 2024

    Reading the note…

  42. 0.21.3

    15 May 2024

    Reading the note…

  43. 0.21.2

    12 May 2024

    Reading the note…

  44. 0.21.1

    7 May 2024

    Reading the note…

  45. 0.21.0

    7 May 2024
    • Implement the JavaScript decorators proposal

      With this release, esbuild now contains an implementation of the upcoming JavaScript decorators proposal. This is the same feature that shipped in TypeScript 5.0 and has been highly-requested on esbuild's issue tracker. You can read more about them in that blog post and in this other (now slightly outdated) extensive blog post here: 2ality.com/2022/10/javascript-decorators.html. Here's a quick example:

      const log = (fn, context) => function() {
        console.log(`before ${context.name}`)
        const it = fn.apply(this, arguments)
        console.log(`after ${context.name}`)
        return it
      }
      
      class Foo {
        @log static foo() {
          console.log('in foo')
        }
      }
      
      // Logs "before foo", "in foo", "after foo"
      Foo.foo()

      Note that this feature is different than the existing "TypeScript experimental decorators" feature that esbuild already implements. It uses similar syntax but behaves very differently, and the two are not compatible (although it's sometimes possible to write decorators that work with both). TypeScript experimental decorators will still be supported by esbuild going forward as they have been around for a long time, are very widely used, and let you do certain things that are not possible with JavaScript decorators (such as decorating function parameters). By default esbuild will parse and transform JavaScript decorators, but you can tell esbuild to parse and transform TypeScript experimental decorators instead by setting "experimentalDecorators": true in your tsconfig.json file.

      Probably at least half of the work for this feature went into creating a test suite that exercises many of the proposal's edge cases: github.com/evanw/decorator-tests. It has given me a reasonable level of confidence that esbuild's initial implementation is acceptable. However, I don't have access to a significant sample of real code that uses JavaScript decorators. If you're currently using JavaScript decorators in a real code base, please try out esbuild's implementation and let me know if anything seems off.

      ⚠️ WARNING ⚠️

      This proposal has been in the works for a very long time (work began around 10 years ago in 2014) and it is finally getting close to becoming part of the JavaScript language. However, it's still a work in progress and isn't a part of JavaScript yet, so keep in mind that any code that uses JavaScript decorators may need to be updated as the feature continues to evolve. The decorators proposal is pretty close to its final form but it can and likely will undergo some small behavioral adjustments before it ends up becoming a part of the standard. If/when that happens, I will update esbuild's implementation to match the specification. I will not be supporting old versions of the specification.

    • Optimize the generated code for private methods

      Previously when lowering private methods for old browsers, esbuild would generate one WeakSet for each private method. This mirrors similar logic for generating one WeakSet for each private field. Using a separate WeakMap for private fields is necessary as their assignment can be observable:

      let it
      class Bar {
        constructor() {
          it = this
        }
      }
      class Foo extends Bar {
        #x = 1
        #y = null.foo
        static check() {
          console.log(#x in it, #y in it)
        }
      }
      try { new Foo } catch {}
      Foo.check()

      This prints true false because this partially-initialized instance has #x but not #y. In other words, it's not true that all class instances will always have all of their private fields. However, the assignment of private methods to a class instance is not observable. In other words, it's true that all class instances will always have all of their private methods. This means esbuild can lower private methods into code where all methods share a single WeakSet, which is smaller, faster, and uses less memory. Other JavaScript processing tools such as the TypeScript compiler already make this optimization. Here's what this change looks like:

      // Original code
      class Foo {
        #x() { return this.#x() }
        #y() { return this.#y() }
        #z() { return this.#z() }
      }
      
      // Old output (--supported:class-private-method=false)
      var _x, x_fn, _y, y_fn, _z, z_fn;
      class Foo {
        constructor() {
          __privateAdd(this, _x);
          __privateAdd(this, _y);
          __privateAdd(this, _z);
        }
      }
      _x = new WeakSet();
      x_fn = function() {
        return __privateMethod(this, _x, x_fn).call(this);
      };
      _y = new WeakSet();
      y_fn = function() {
        return __privateMethod(this, _y, y_fn).call(this);
      };
      _z = new WeakSet();
      z_fn = function() {
        return __privateMethod(this, _z, z_fn).call(this);
      };
      
      // New output (--supported:class-private-method=false)
      var _Foo_instances, x_fn, y_fn, z_fn;
      class Foo {
        constructor() {
          __privateAdd(this, _Foo_instances);
        }
      }
      _Foo_instances = new WeakSet();
      x_fn = function() {
        return __privateMethod(this, _Foo_instances, x_fn).call(this);
      };
      y_fn = function() {
        return __privateMethod(this, _Foo_instances, y_fn).call(this);
      };
      z_fn = function() {
        return __privateMethod(this, _Foo_instances, z_fn).call(this);
      };
    • Fix an obscure bug with lowering class members with computed property keys

      When class members that use newer syntax features are transformed for older target environments, they sometimes need to be relocated. However, care must be taken to not reorder any side effects caused by computed property keys. For example, the following code must evaluate a() then b() then c():

      class Foo {
        [a()]() {}
        [b()];
        static { c() }
      }

      Previously esbuild did this by shifting the computed property key forward to the next spot in the evaluation order. Classes evaluate all computed keys first and then all static class elements, so if the last computed key needs to be shifted, esbuild previously inserted a static block at start of the class body, ensuring it came before all other static class elements:

      var _a;
      class Foo {
        constructor() {
          __publicField(this, _a);
        }
        static {
          _a = b();
        }
        [a()]() {
        }
        static {
          c();
        }
      }

      However, this could cause esbuild to accidentally generate a syntax error if the computed property key contains code that isn't allowed in a static block, such as an await expression. With this release, esbuild fixes this problem by shifting the computed property key backward to the previous spot in the evaluation order instead, which may push it into the extends clause or even before the class itself:

      // Original code
      class Foo {
        [a()]() {}
        [await b()];
        static { c() }
      }
      
      // Old output (with --supported:class-field=false)
      var _a;
      class Foo {
        constructor() {
          __publicField(this, _a);
        }
        static {
          _a = await b();
        }
        [a()]() {
        }
        static {
          c();
        }
      }
      
      // New output (with --supported:class-field=false)
      var _a, _b;
      class Foo {
        constructor() {
          __publicField(this, _a);
        }
        [(_b = a(), _a = await b(), _b)]() {
        }
        static {
          c();
        }
      }
  46. 0.20.x
  47. 0.20.2

    14 Mar 2024

    Reading the note…

  48. 0.20.1

    19 Feb 2024
    • Fix a bug with the CSS nesting transform

      This release fixes a bug with the CSS nesting transform for older browsers where the generated CSS could be incorrect if a selector list contained a pseudo element followed by another selector. The bug was caused by incorrectly mutating the parent rule's selector list when filtering out pseudo elements for the child rules:

      /* Original code */
      .foo {
        &:after,
        & .bar {
          color: red;
        }
      }
      
      /* Old output (with --supported:nesting=false) */
      .foo .bar,
      .foo .bar {
        color: red;
      }
      
      /* New output (with --supported:nesting=false) */
      .foo:after,
      .foo .bar {
        color: red;
      }
    • Constant folding for JavaScript inequality operators

      This release introduces constant folding for the < > <= >= operators. The minifier will now replace these operators with true or false when both sides are compile-time numeric or string constants:

      // Original code
      console.log(1 < 2, '🍕' > '🧀')
      
      // Old output (with --minify)
      console.log(1<2,"🍕">"🧀");
      
      // New output (with --minify)
      console.log(!0,!1);
    • Better handling of __proto__ edge cases

      JavaScript object literal syntax contains a special case where a non-computed property with a key of __proto__ sets the prototype of the object. This does not apply to computed properties or to properties that use the shorthand property syntax introduced in ES6. Previously esbuild didn't correctly preserve the "sets the prototype" status of properties inside an object literal, meaning a property that sets the prototype could accidentally be transformed into one that doesn't and vice versa. This has now been fixed:

      // Original code
      function foo(__proto__) {
        return { __proto__: __proto__ } // Note: sets the prototype
      }
      function bar(__proto__, proto) {
        {
          let __proto__ = proto
          return { __proto__ } // Note: doesn't set the prototype
        }
      }
      
      // Old output
      function foo(__proto__) {
        return { __proto__ }; // Note: no longer sets the prototype (WRONG)
      }
      function bar(__proto__, proto) {
        {
          let __proto__2 = proto;
          return { __proto__: __proto__2 }; // Note: now sets the prototype (WRONG)
        }
      }
      
      // New output
      function foo(__proto__) {
        return { __proto__: __proto__ }; // Note: sets the prototype (correct)
      }
      function bar(__proto__, proto) {
        {
          let __proto__2 = proto;
          return { ["__proto__"]: __proto__2 }; // Note: doesn't set the prototype (correct)
        }
      }
  49. 0.20.0

    27 Jan 2024
    • Work around API deprecations in Deno 1.40.x (#3609, #3611)

      Deno 1.40.0 was just released and introduced run-time warnings about certain APIs that esbuild uses. With this release, esbuild will work around these run-time warnings by using newer APIs if they are present and falling back to the original APIs otherwise. This should avoid the warnings without breaking compatibility with older versions of Deno.

      Unfortunately, doing this introduces a breaking change. The newer child process APIs lack a way to synchronously terminate esbuild's child process, so calling esbuild.stop() from within a Deno test is no longer sufficient to prevent Deno from failing a test that uses esbuild's API (Deno fails tests that create a child process without killing it before the test ends). To work around this, esbuild's stop() function has been changed to return a promise, and you now have to change esbuild.stop() to await esbuild.stop() in all of your Deno tests.

    • Reorder implicit file extensions within node_modules (#3341, #3608)

      In version 0.18.0, esbuild changed the behavior of implicit file extensions within node_modules directories (i.e. in published packages) to prefer .js over .ts even when the --resolve-extensions= order prefers .ts over .js (which it does by default). However, doing that also accidentally made esbuild prefer .css over .ts, which caused problems for people that published packages containing both TypeScript and CSS in files with the same name.

      With this release, esbuild will reorder TypeScript file extensions immediately after the last JavaScript file extensions in the implicit file extension order instead of putting them at the end of the order. Specifically the default implicit file extension order is .tsx,.ts,.jsx,.js,.css,.json which used to become .jsx,.js,.css,.json,.tsx,.ts in node_modules directories. With this release it will now become .jsx,.js,.tsx,.ts,.css,.json instead.

      Why even rewrite the implicit file extension order at all? One reason is because the .js file is more likely to behave correctly than the .ts file. The behavior of the .ts file may depend on tsconfig.json and the tsconfig.json file may not even be published, or may use extends to refer to a base tsconfig.json file that wasn't published. People can get into this situation when they forget to add all .ts files to their .npmignore file before publishing to npm. Picking .js over .ts helps make it more likely that resulting bundle will behave correctly.

  50. 0.19.x
  51. 0.19.12

    23 Jan 2024

    Reading the note…

  52. 0.19.11

    29 Dec 2023
    • Fix TypeScript-specific class transform edge case

      The previous release introduced an optimization that avoided transforming super() in the class constructor for TypeScript code compiled with useDefineForClassFields set to false if all class instance fields have no initializers. The rationale was that in this case, all class instance fields are omitted in the output so no changes to the constructor are needed. However, if all of this is the case and there are #private instance fields with initializers, those private instance field initializers were still being moved into the constructor. This was problematic because they were being inserted before the call to super() (since super() is now no longer transformed in that case). This release introduces an additional optimization that avoids moving the private instance field initializers into the constructor in this edge case, which generates smaller code, matches the TypeScript compiler's output more closely, and avoids this bug:

      // Original code
      class Foo extends Bar {
        #private = 1;
        public: any;
        constructor() {
          super();
        }
      }
      
      // Old output (with esbuild v0.19.9)
      class Foo extends Bar {
        constructor() {
          super();
          this.#private = 1;
        }
        #private;
      }
      
      // Old output (with esbuild v0.19.10)
      class Foo extends Bar {
        constructor() {
          this.#private = 1;
          super();
        }
        #private;
      }
      
      // New output
      class Foo extends Bar {
        #private = 1;
        constructor() {
          super();
        }
      }
    • Minifier: Allow reording a primitive past a side-effect

      The minifier previously allowed reordering a side-effect past a primitive, but didn't handle the case of reordering a primitive past a side-effect. This additional case is now handled:

      // Original code
      function f() {
        let x = false;
        let y = x;
        const boolean = y;
        let frag = $.template(`<p contenteditable="${boolean}">hello world</p>`);
        return frag;
      }
      
      // Old output (with --minify)
      function f(){const e=!1;return $.template(`<p contenteditable="${e}">hello world</p>`)}
      
      // New output (with --minify)
      function f(){return $.template('<p contenteditable="false">hello world</p>')}
    • Minifier: Consider properties named using known Symbol instances to be side-effect free

      Many things in JavaScript can have side effects including property accesses and ToString operations, so using a symbol such as Symbol.iterator as a computed property name is not obviously side-effect free. This release adds a special case for known Symbol instances so that they are considered side-effect free when used as property names. For example, this class declaration will now be considered side-effect free:

      class Foo {
        *[Symbol.iterator]() {
        }
      }
  53. 0.19.10

    19 Dec 2023
    • Fix glob imports in TypeScript files

      This release fixes a problem where bundling a TypeScript file containing a glob import could emit a call to a helper function that doesn't exist. The problem happened because esbuild's TypeScript transformation removes unused imports (which is required for correctness, as they may be type-only imports) and esbuild's glob import transformation wasn't correctly marking the imported helper function as used. This wasn't caught earlier because most of esbuild's glob import tests were written in JavaScript, not in TypeScript.

    • Fix require() glob imports with bundling disabled

      Previously require() calls containing glob imports were incorrectly transformed when bundling was disabled. All glob imports should only be transformed when bundling is enabled. This bug has been fixed.

    • Fix a panic when transforming optional chaining with define (#3551, #3554)

      This release fixes a case where esbuild could crash with a panic, which was triggered by using define to replace an expression containing an optional chain. Here is an example:

      // Original code
      console.log(process?.env.SHELL)
      
      // Old output (with --define:process.env={})
      /* panic: Internal error (while parsing "<stdin>") */
      
      // New output (with --define:process.env={})
      var define_process_env_default = {};
      console.log(define_process_env_default.SHELL);

      This fix was contributed

  54. 0.19.9

    10 Dec 2023
    • Add support for transforming new CSS gradient syntax for older browsers

      The specification called CSS Images Module Level 4 introduces new CSS gradient syntax for customizing how the browser interpolates colors in between color stops. You can now control the color space that the interpolation happens in as well as (for "polar" color spaces) control whether hue angle interpolation happens clockwise or counterclockwise. You can read more about this in Mozilla's blog post about new CSS gradient features.

      With this release, esbuild will now automatically transform this syntax for older browsers in the target list. For example, here's a gradient that should appear as a rainbow in a browser that supports this new syntax:

      /* Original code */
      .rainbow-gradient {
        width: 100px;
        height: 100px;
        background: linear-gradient(in hsl longer hue, #7ff, #77f);
      }
      
      /* New output (with --target=chrome99) */
      .rainbow-gradient {
        width: 100px;
        height: 100px;
        background:
          linear-gradient(
            #77ffff,
            #77ffaa 12.5%,
            #77ff80 18.75%,
            #84ff77 21.88%,
            #99ff77 25%,
            #eeff77 37.5%,
            #fffb77 40.62%,
            #ffe577 43.75%,
            #ffbb77 50%,
            #ff9077 56.25%,
            #ff7b77 59.38%,
            #ff7788 62.5%,
            #ff77dd 75%,
            #ff77f2 78.12%,
            #f777ff 81.25%,
            #cc77ff 87.5%,
            #7777ff);
      }

      You can now use this syntax in your CSS source code and esbuild will automatically convert it to an equivalent gradient for older browsers. In addition, esbuild will now also transform "double position" and "transition hint" syntax for older browsers as appropriate:

      /* Original code */
      .stripes {
        width: 100px;
        height: 100px;
        background: linear-gradient(#e65 33%, #ff2 33% 67%, #99e 67%);
      }
      .glow {
        width: 100px;
        height: 100px;
        background: radial-gradient(white 10%, 20%, black);
      }
      
      /* New output (with --target=chrome33) */
      .stripes {
        width: 100px;
        height: 100px;
        background:
          linear-gradient(
            #e65 33%,
            #ff2 33%,
            #ff2 67%,
            #99e 67%);
      }
      .glow {
        width: 100px;
        height: 100px;
        background:
          radial-gradient(
            #ffffff 10%,
            #aaaaaa 12.81%,
            #959595 15.62%,
            #7b7b7b 21.25%,
            #5a5a5a 32.5%,
            #444444 43.75%,
            #323232 55%,
            #161616 77.5%,
            #000000);
      }

      You can see visual examples of these new syntax features by looking at esbuild's gradient transformation tests.

      If necessary, esbuild will construct a new gradient that approximates the original gradient by recursively splitting the interval in between color stops until the approximation error is within a small threshold. That is why the above output CSS contains many more color stops than the input CSS.

      Note that esbuild deliberately replaces the original gradient with the approximation instead of inserting the approximation before the original gradient as a fallback. The latest version of Firefox has multiple gradient rendering bugs (including incorrect interpolation of partially-transparent colors and interpolating non-sRGB colors using the incorrect color space). If esbuild didn't replace the original gradient, then Firefox would use the original gradient instead of the fallback the appearance would be incorrect in Firefox. In other words, the latest version of Firefox supports modern gradient syntax but interprets it incorrectly.

    • Add support for color(), lab(), lch(), oklab(), oklch(), and hwb() in CSS

      CSS has recently added lots of new ways of specifying colors. You can read more about this in Chrome's blog post about CSS color spaces.

      This release adds support for minifying colors that use the color(), lab(), lch(), oklab(), oklch(), or hwb() syntax and/or transforming these colors for browsers that don't support it yet:

      /* Original code */
      div {
        color: hwb(90deg 20% 40%);
        background: color(display-p3 1 0 0);
      }
      
      /* New output (with --target=chrome99) */
      div {
        color: #669933;
        background: #ff0f0e;
        background: color(display-p3 1 0 0);
      }

      As you can see, colors outside of the sRGB color space such as color(display-p3 1 0 0) are mapped back into the sRGB gamut and inserted as a fallback for browsers that don't support the new color syntax.

    • Allow empty type parameter lists in certain cases

      TypeScript allows interface declarations and type aliases to have empty type parameter lists. Previously esbuild didn't handle this edge case but with this release, esbuild will now parse this syntax:

      interface Foo<> {}
      type Bar<> = {}

      This fix was contributed

  55. 0.19.8

    26 Nov 2023

    Reading the note…

  56. 0.19.7

    21 Nov 2023

    Reading the note…

  57. 0.19.6

    19 Nov 2023

    Reading the note…

  58. 0.19.5

    17 Oct 2023

    Reading the note…

  59. 0.19.4

    28 Sep 2023

    Reading the note…

  60. 0.19.3

    14 Sep 2023

    Reading the note…

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.