Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Dec 4, 2025

Bumps esbuild from 0.25.9 to 0.27.1.

Release notes

Sourced from esbuild's releases.

v0.27.1

  • Fix bundler bug with var nested inside if (#4348)

    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 (#4351)

    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 (#4354)

    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())};

  • The minifier now strips empty finally clauses (#4353)

    This improvement means that finally clauses containing dead code can potentially cause the associated try statement to be removed from the output entirely in minified builds:

... (truncated)

Changelog

Sourced from esbuild's changelog.

0.27.1

  • Fix bundler bug with var nested inside if (#4348)

    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 (#4351)

    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 (#4354)

    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())};

  • The minifier now strips empty finally clauses (#4353)

    This improvement means that finally clauses containing dead code can potentially cause the associated try statement to be removed from the output entirely in minified builds:

... (truncated)

Commits
  • 5e0e56d publish 0.27.1 to npm
  • 5a89732 fix #4354: improve IIFE inlining for expressions
  • b940218 minify: move unused expr simplification later
  • c46d498 fix #4353: remove empty try/finally clauses
  • 7a72735 fix #4348: bundler bug with var inside if
  • 4e4e177 fix #4351: label + try + for minifier bug
  • d6427c9 fix: deno release url wrong comment (#4326)
  • 48e3e19 calling Symbol.for with a primitive never throws
  • 4ff88d0 update decorator-tests.js snapshot
  • 1877e60 calling Symbol with a primitive will never throw
  • Additional commits viewable in compare view
Maintainer changes

This version was pushed to npm by [GitHub Actions](https://www.npmjs.com/~GitHub Actions), a new releaser for esbuild since your current version.


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [esbuild](https://github.com/evanw/esbuild) from 0.25.9 to 0.27.1.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](evanw/esbuild@v0.25.9...v0.27.1)

---
updated-dependencies:
- dependency-name: esbuild
  dependency-version: 0.27.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Dec 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant