build(deps-dev): bump esbuild from 0.25.12 to 0.27.1
Bumps esbuild from 0.25.12 to 0.27.1.
Release notes
Sourced from esbuild's releases.
v0.27.1
Fix bundler bug with
varnested insideif(#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-levelvarinside anifstatement without being wrapped in a{ ... }block (and a few other conditions). The bundling transform needed to hoist thesevardeclarations outside of the lazy ES module wrapper for correctness. See the issue for details.Fix minifier bug with
forinsidetryinside label (#4351)This fixes an old regression from version v0.21.4. Some code was introduced to move the label inside the
trystatement to address a problem with transforming labeledfor awaitloops to avoid theawait(the transformation involves converting thefor awaitloop into aforloop and wrapping it in atrystatement). 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 toforloops that esbuild itself generates internally as part of thefor awaittransform. 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
returnstatement. 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
finallyclauses (#4353)This improvement means that
finallyclauses containing dead code can potentially cause the associatedtrystatement to be removed from the output entirely in minified builds:
... (truncated)
Changelog
Sourced from esbuild's changelog.
0.27.1
Fix bundler bug with
varnested insideif(#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-levelvarinside anifstatement without being wrapped in a{ ... }block (and a few other conditions). The bundling transform needed to hoist thesevardeclarations outside of the lazy ES module wrapper for correctness. See the issue for details.Fix minifier bug with
forinsidetryinside label (#4351)This fixes an old regression from version v0.21.4. Some code was introduced to move the label inside the
trystatement to address a problem with transforming labeledfor awaitloops to avoid theawait(the transformation involves converting thefor awaitloop into aforloop and wrapping it in atrystatement). 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 toforloops that esbuild itself generates internally as part of thefor awaittransform. 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
returnstatement. 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
finallyclauses (#4353)This improvement means that
finallyclauses containing dead code can potentially cause the associatedtrystatement to be removed from the output entirely in minified builds:
... (truncated)
Commits
5e0e56dpublish 0.27.1 to npm5a89732fix #4354: improve IIFE inlining for expressionsb940218minify: move unused expr simplification laterc46d498fix #4353: remove emptytry/finallyclauses7a72735fix #4348: bundler bug withvarinsideif4e4e177fix #4351: label +try+forminifier bugd6427c9fix: deno release url wrong comment (#4326)48e3e19callingSymbol.forwith a primitive never throws4ff88d0updatedecorator-tests.jssnapshot1877e60callingSymbolwith 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 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 rebasewill rebase this PR -
@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it -
@dependabot mergewill merge this PR after your CI passes on it -
@dependabot squash and mergewill squash and merge this PR after your CI passes on it -
@dependabot cancel mergewill cancel a previously requested merge and block automerging -
@dependabot reopenwill reopen this PR if it is closed -
@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually -
@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency -
@dependabot ignore this major versionwill 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 versionwill 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 dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 92.85%. Comparing base (e3fedb0) to head (36d33e6).
:warning: Report is 3 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #4694 +/- ##
==========================================
+ Coverage 92.84% 92.85% +0.01%
==========================================
Files 107 107
Lines 33455 33455
==========================================
+ Hits 31060 31065 +5
+ Misses 2395 2390 -5
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
Superseded by #4709.