chore(deps): Update dependency esbuild@>=0.27.3 <0.28.1 to v0.28.2 #75

Merged
renovate merged 1 commit from renovate/esbuild-=0.27.3-0.28.1-0.x into main 2026-08-18 20:56:18 +00:00
Collaborator

This PR contains the following updates:

Package Change Age Confidence
esbuild@>=0.27.3 <0.28.1 [0.28.10.28.2](https://renovatebot.com/diffs/npm/esbuild@>=0.27.3 <0.28.1/0.28.1/0.28.2) age confidence

Release Notes

evanw/esbuild (esbuild@>=0.27.3 <0.28.1)

v0.28.2

Compare Source

  • Fix tree shaking bug due to TypeScript import alias (#​4507)

    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 & (#​4497)

    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 (#​4484)

    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.

  • Fix incorrect code generated when using top-level await (#​4498)

    Previously esbuild could generate code containing a syntax error in complex scenarios involving top-level await used in a dependency cycle. The problem was a missing async on one or more module wrapper closures. With this release, esbuild now uses a fixed-point iteration algorithm to correctly annotate all dependencies in the cycle as needing an async module wrapper.

  • Fix a minification bug with lowered logical assignment operators (#​4508)

    This release fixes a bug that could cause esbuild to generate incorrect code for logical assignment operators when lowering them to an older target environment. Specifically the lowering process requires duplicating the left-hand side, but esbuild incorrectly failed to count the duplicate as a new usage when the left-hand side is an identifier. That then caused the minifier to believe that the left-hand side was only used once and could attempt to incorrectly inline an initializer into the first usage. This bug has now been fixed:

    // Original code
    function foo() {
      let x
      bar(x ||= {})
    }
    
    // Old output (with --minify-syntax --target=es6)
    function foo() {
      bar(void 0 || (x = {}));
    }
    
    // New output (with --minify-syntax --target=es6)
    function foo() {
      let x;
      bar(x || (x = {}));
    }
    
  • Fix a potential deadlock when the JavaScript API is used incorrectly (#​4503, #​4506)

    The JavaScript API runs the native esbuild executable as a long-lived child process and communicates with it over stdin/stdout/stderr. Each API request is asynchronous and the executable stays open as long as it has work to do, which is as long as either stdin is still open (meaning there may be more API requests) or there are currently requests being processed.

    Previously esbuild's tracking of outstanding API requests missed decrementing a reference count in an edge case where esbuild's JavaScript API was used incorrectly and the API request returned an error. This could in some cases cause esbuild's native executable to exit with an error message about a deadlock. This release fixes the reference counting bug.

    This fix was submitted by @​ZuBB.

  • Handle target collisions (#​4509)

    It's possible to specify the same target engine multiple times, such as with --target=chrome1,chrome99. This edge case wasn't anticipated and previously took the last version for the duplicated target engine instead of the minimum version (so chrome99 in this case instead of chrome1). With this release, esbuild will now pick the minimum version between all duplicated target engines.

  • Force .mp3 files to use the audio/mpeg MIME type (#​4485)

    MIME type detection for esbuild's data URLs uses Go's built-in MIME type detection, which is based on the MIME sniffing standard. This works correctly for MP3 files that start with the byte sequence ID3, which is commonly the case. However, it's possible to construct valid MP3 files that do not start with ID3, and that perhaps Go's built-in MIME type detection doesn't implement the "Signature for MP3 without ID3" part of the algorithm. This results in some .mp3 files incorrectly using the application/octet-stream MIME type instead of audio/mpeg. With this release, esbuild will now always use the audio/mpeg MIME type for files ending in .mp3.

  • Add a new TypeScript syntax warning

    TypeScript 7 turned some previously-valid TypeScript syntax into a syntax error because it was confusing. TypeScript 6 accepts 1 + 2 as number * 3 as valid syntax but confusingly converts it to (1 + 2) * 3 instead of the more intuitive conversion to 1 + (2 * 3). This syntax is now an error in TypeScript 7+. With this release, esbuild will now warn about the use of this syntax:

     [WARNING] Operator "*" should not directly follow a TypeScript type cast after the "+" operator [confusing-typescript-cast]
    
        example.ts:1:28:
          1  console.log(1 + 2 as number * 3)
                                         ^
    
      This is a syntax error in newer versions of TypeScript because the type cast has unintuitive
      precedence in this case. Surround the inner expression in parentheses to silence this warning:
    
        example.ts:1:12:
          1  console.log(1 + 2 as number * 3)
                         ~~~~~~~~~~~~~~~
                         (             )
    

    See microsoft/TypeScript#63527 for more information.

  • Add support for formatting errors for Visual Studio (#​4460)

    Visual Studio has a specific style that it expects log messages to be in for them to show up in the UI when esbuild is run as a custom build step. The current log style that esbuild uses doesn't conform to this specific style.

    With this release, esbuild has a new log style for Visual Studio (and other tools in the MSBuild ecosystem) that can be enabled with --log-style=visualstudio. Here is an example log message in this style:

    $ esbuild example.ts --log-style=visualstudio
    /Users/evan/dev/esbuild/example.ts(1,29): warning ES0010: Operator "*" should not directly follow a TypeScript type cast after the "+" operator
    

    This log style is also available via the JS and Go APIs, and can now be used with the existing formatMessages API.

  • Fix a bug with CSS gamut mapping (#​4488)

    Due to a typo, the fallback colors generated for CSS colors outside of the sRGB gamut weren't correct. This release fixes the generated colors to use the intended algorithm.

    This fix was submitted by @​chatman-media.


Configuration

📅 Schedule: (in timezone Europe/Copenhagen)

  • Branch creation
    • "before 6am on monday"
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate.

This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [esbuild@>=0.27.3 <0.28.1](https://github.com/evanw/esbuild) | [`0.28.1` → `0.28.2`](https://renovatebot.com/diffs/npm/esbuild@>=0.27.3 <0.28.1/0.28.1/0.28.2) | ![age](https://developer.mend.io/api/mc/badges/age/npm/esbuild/0.28.2?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/esbuild/0.28.1/0.28.2?slim=true) | --- ### Release Notes <details> <summary>evanw/esbuild (esbuild@>=0.27.3 <0.28.1)</summary> ### [`v0.28.2`](https://github.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#0282) [Compare Source](https://github.com/evanw/esbuild/compare/v0.28.1...v0.28.2) - Fix tree shaking bug due to TypeScript import alias ([#&#8203;4507](https://github.com/evanw/esbuild/issues/4507)) 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: ```ts import Base from './dep.js'; import Alias = Base.SomeType; ``` - Fix CSS minification bug involving `&` ([#&#8203;4497](https://github.com/evanw/esbuild/issues/4497)) This release fixes a bug where esbuild's CSS minifier incorrectly removed a `&` when it was unsafe to do so. Here is an example: ```css /* 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` ([#&#8203;4484](https://github.com/evanw/esbuild/issues/4484)) 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. - Fix incorrect code generated when using top-level await ([#&#8203;4498](https://github.com/evanw/esbuild/issues/4498)) Previously esbuild could generate code containing a syntax error in complex scenarios involving top-level await used in a dependency cycle. The problem was a missing `async` on one or more module wrapper closures. With this release, esbuild now uses a fixed-point iteration algorithm to correctly annotate all dependencies in the cycle as needing an `async` module wrapper. - Fix a minification bug with lowered logical assignment operators ([#&#8203;4508](https://github.com/evanw/esbuild/issues/4508)) This release fixes a bug that could cause esbuild to generate incorrect code for logical assignment operators when lowering them to an older target environment. Specifically the lowering process requires duplicating the left-hand side, but esbuild incorrectly failed to count the duplicate as a new usage when the left-hand side is an identifier. That then caused the minifier to believe that the left-hand side was only used once and could attempt to incorrectly inline an initializer into the first usage. This bug has now been fixed: ```js // Original code function foo() { let x bar(x ||= {}) } // Old output (with --minify-syntax --target=es6) function foo() { bar(void 0 || (x = {})); } // New output (with --minify-syntax --target=es6) function foo() { let x; bar(x || (x = {})); } ``` - Fix a potential deadlock when the JavaScript API is used incorrectly ([#&#8203;4503](https://github.com/evanw/esbuild/issues/4503), [#&#8203;4506](https://github.com/evanw/esbuild/pull/4506)) The JavaScript API runs the native esbuild executable as a long-lived child process and communicates with it over stdin/stdout/stderr. Each API request is asynchronous and the executable stays open as long as it has work to do, which is as long as either stdin is still open (meaning there may be more API requests) or there are currently requests being processed. Previously esbuild's tracking of outstanding API requests missed decrementing a reference count in an edge case where esbuild's JavaScript API was used incorrectly and the API request returned an error. This could in some cases cause esbuild's native executable to exit with an error message about a deadlock. This release fixes the reference counting bug. This fix was submitted by [@&#8203;ZuBB](https://github.com/ZuBB). - Handle target collisions ([#&#8203;4509](https://github.com/evanw/esbuild/issues/4509)) It's possible to specify the same target engine multiple times, such as with `--target=chrome1,chrome99`. This edge case wasn't anticipated and previously took the last version for the duplicated target engine instead of the minimum version (so `chrome99` in this case instead of `chrome1`). With this release, esbuild will now pick the minimum version between all duplicated target engines. - Force `.mp3` files to use the `audio/mpeg` MIME type ([#&#8203;4485](https://github.com/evanw/esbuild/issues/4485)) MIME type detection for esbuild's data URLs uses Go's built-in MIME type detection, which is based on the [MIME sniffing standard](https://mimesniff.spec.whatwg.org/). This works correctly for MP3 files that start with the byte sequence `ID3`, which is commonly the case. However, it's possible to construct valid MP3 files that do not start with `ID3`, and that perhaps Go's built-in MIME type detection doesn't implement the "Signature for MP3 without ID3" part of the algorithm. This results in some `.mp3` files incorrectly using the `application/octet-stream` MIME type instead of `audio/mpeg`. With this release, esbuild will now always use the `audio/mpeg` MIME type for files ending in `.mp3`. - Add a new TypeScript syntax warning TypeScript 7 turned some previously-valid TypeScript syntax into a syntax error because it was confusing. TypeScript 6 accepts `1 + 2 as number * 3` as valid syntax but confusingly converts it to `(1 + 2) * 3` instead of the more intuitive conversion to `1 + (2 * 3)`. This syntax is now an error in TypeScript 7+. With this release, esbuild will now warn about the use of this syntax: ```ts ▲ [WARNING] Operator "*" should not directly follow a TypeScript type cast after the "+" operator [confusing-typescript-cast] example.ts:1:28: 1 │ console.log(1 + 2 as number * 3) ╵ ^ This is a syntax error in newer versions of TypeScript because the type cast has unintuitive precedence in this case. Surround the inner expression in parentheses to silence this warning: example.ts:1:12: 1 │ console.log(1 + 2 as number * 3) │ ~~~~~~~~~~~~~~~ ╵ ( ) ``` See [microsoft/TypeScript#63527](https://github.com/microsoft/TypeScript/issues/63527) for more information. - Add support for formatting errors for Visual Studio ([#&#8203;4460](https://github.com/evanw/esbuild/issues/4460)) Visual Studio has a specific style that it expects log messages to be in for them to show up in the UI when esbuild is run as a custom build step. The current log style that esbuild uses doesn't conform to this specific style. With this release, esbuild has a new log style for Visual Studio (and other tools in the MSBuild ecosystem) that can be enabled with `--log-style=visualstudio`. Here is an example log message in this style: ``` $ esbuild example.ts --log-style=visualstudio /Users/evan/dev/esbuild/example.ts(1,29): warning ES0010: Operator "*" should not directly follow a TypeScript type cast after the "+" operator ``` This log style is also available via the JS and Go APIs, and can now be used with the existing `formatMessages` API. - Fix a bug with CSS gamut mapping ([#&#8203;4488](https://github.com/evanw/esbuild/pull/4488)) Due to a typo, the fallback colors generated for CSS colors outside of the sRGB gamut weren't correct. This release fixes the generated colors to use the intended algorithm. This fix was submitted by [@&#8203;chatman-media](https://github.com/chatman-media). </details> --- ### Configuration 📅 **Schedule**: (in timezone Europe/Copenhagen) - Branch creation - "before 6am on monday" - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yODEuMCIsInVwZGF0ZWRJblZlciI6IjQzLjI4NS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->
chore(deps): Update dependency esbuild@>=0.27.3 <0.28.1 to v0.28.2
Some checks failed
CD Staging / Build & Push Docker Images (pull_request) Has been skipped
CD Staging / Build & Push Docker Images-1 (pull_request) Has been skipped
CD Staging / Deploy Staging (pull_request) Has been skipped
CD Staging / Deploy PR Preview (pull_request) Has been skipped
CD Staging / Tear Down PR Preview (pull_request) Has been skipped
renovate/stability-days Updates have met minimum release age requirement
CI / Dockerfile Package Check (pull_request) Successful in 24s
CI / Security Scan (pull_request) Successful in 48s
CI / Visual Tests (pull_request) Successful in 4m41s
CI / Checks (pull_request) Failing after 7m24s
CI / E2E Tests (pull_request) Has been skipped
CI / Journal Image Smoke Test (pull_request) Successful in 6m57s
651eca6051
renovate scheduled this pull request to auto merge when all checks succeed 2026-08-17 00:04:25 +00:00
renovate force-pushed renovate/esbuild-=0.27.3-0.28.1-0.x from 651eca6051
Some checks failed
CD Staging / Build & Push Docker Images (pull_request) Has been skipped
CD Staging / Build & Push Docker Images-1 (pull_request) Has been skipped
CD Staging / Deploy Staging (pull_request) Has been skipped
CD Staging / Deploy PR Preview (pull_request) Has been skipped
CD Staging / Tear Down PR Preview (pull_request) Has been skipped
renovate/stability-days Updates have met minimum release age requirement
CI / Dockerfile Package Check (pull_request) Successful in 24s
CI / Security Scan (pull_request) Successful in 48s
CI / Visual Tests (pull_request) Successful in 4m41s
CI / Checks (pull_request) Failing after 7m24s
CI / E2E Tests (pull_request) Has been skipped
CI / Journal Image Smoke Test (pull_request) Successful in 6m57s
to 4c59e970aa
All checks were successful
CD Staging / Build & Push Docker Images (pull_request) Has been skipped
CD Staging / Build & Push Docker Images-1 (pull_request) Has been skipped
CD Staging / Deploy Staging (pull_request) Has been skipped
CD Staging / Deploy PR Preview (pull_request) Has been skipped
CD Staging / Tear Down PR Preview (pull_request) Has been skipped
renovate/stability-days Updates have met minimum release age requirement
CI / Security Scan (pull_request) Successful in 58s
CI / Dockerfile Package Check (pull_request) Successful in 15s
CI / Visual Tests (pull_request) Successful in 2m25s
CI / Checks (pull_request) Successful in 8m22s
CI / Journal Image Smoke Test (pull_request) Successful in 34m39s
CI / E2E Tests (pull_request) Successful in 8m14s
2026-08-18 18:04:19 +00:00
Compare
ullrich force-pushed renovate/esbuild-=0.27.3-0.28.1-0.x from 4c59e970aa
All checks were successful
CD Staging / Build & Push Docker Images (pull_request) Has been skipped
CD Staging / Build & Push Docker Images-1 (pull_request) Has been skipped
CD Staging / Deploy Staging (pull_request) Has been skipped
CD Staging / Deploy PR Preview (pull_request) Has been skipped
CD Staging / Tear Down PR Preview (pull_request) Has been skipped
renovate/stability-days Updates have met minimum release age requirement
CI / Security Scan (pull_request) Successful in 58s
CI / Dockerfile Package Check (pull_request) Successful in 15s
CI / Visual Tests (pull_request) Successful in 2m25s
CI / Checks (pull_request) Successful in 8m22s
CI / Journal Image Smoke Test (pull_request) Successful in 34m39s
CI / E2E Tests (pull_request) Successful in 8m14s
to 3a91e51d84
All checks were successful
CD Staging / Build & Push Docker Images (pull_request) Has been skipped
CD Staging / Build & Push Docker Images-1 (pull_request) Has been skipped
CD Staging / Deploy Staging (pull_request) Has been skipped
CD Staging / Deploy PR Preview (pull_request) Has been skipped
CI / Dockerfile Package Check (pull_request) Successful in 16s
CI / Security Scan (pull_request) Successful in 54s
CI / Visual Tests (pull_request) Successful in 3m42s
CI / Checks (pull_request) Successful in 6m50s
CI / E2E Tests (pull_request) Successful in 8m47s
CI / Journal Image Smoke Test (pull_request) Successful in 18m4s
Cancel superseded CI / Cancel in-flight CI (pull_request) Successful in 28s
CD Staging / Tear Down PR Preview (pull_request) Successful in 47s
2026-08-18 20:33:31 +00:00
Compare
renovate deleted branch renovate/esbuild-=0.27.3-0.28.1-0.x 2026-08-18 20:56:18 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
trails-cool/trails!75
No description provided.