Skip to content

chore(deps): update dependency esbuild to v0.27.4#1020

Open
renovate[bot] wants to merge 1 commit intomasterfrom
renovate/esbuild-0.x
Open

chore(deps): update dependency esbuild to v0.27.4#1020
renovate[bot] wants to merge 1 commit intomasterfrom
renovate/esbuild-0.x

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Feb 1, 2026

This PR contains the following updates:

Package Type Update Change OpenSSF
esbuild devDependencies patch 0.27.10.27.4 OpenSSF Scorecard

Release Notes

evanw/esbuild (esbuild)

v0.27.4

Compare Source

  • 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 */
    @&#8203;media only screen and ((min-width: 10px) or (min-height: 10px)) {
      a { color: red }
    }
    
    /* Old output (incorrect) */
    @&#8203;media only screen and (min-width: 10px) or (min-height: 10px) {
      a {
        color: red;
      }
    }
    
    /* New output (correct) */
    @&#8203;media only screen and ((min-width: 10px) or (min-height: 10px)) {
      a {
        color: red;
      }
    }
  • Fix an edge case with the inject feature (#​4407)

    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).

v0.27.3

Compare Source

  • Preserve URL fragments in data URLs (#​4370)

    Consider the following HTML, CSS, and SVG:

    • index.html:

      <!DOCTYPE html>
      <html>
        <head><link rel="stylesheet" href="icons.css"></head>
        <body><div class="triangle"></div></body>
      </html>
    • icons.css:

      .triangle {
        width: 10px;
        height: 10px;
        background: currentColor;
        clip-path: url(./triangle.svg#x);
      }
    • triangle.svg:

      <svg xmlns="http://www.w3.org/2000/svg">
        <defs>
          <clipPath id="x">
            <path d="M0 0H10V10Z"/>
          </clipPath>
        </defs>
      </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 (#​4322)

    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 */
    @&#8203;scope (:global(.foo)) to (:local(.bar)) {
      .bar {
        color: red;
      }
    }
    
    /* Old output (with --loader=local-css --minify) */
    @&#8203;scope (:global(.foo)) to (:local(.bar)){.o{color:red}}
    
    /* New output (with --loader=local-css --minify) */
    @&#8203;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.

  • Update the Go compiler from v1.25.5 to v1.25.7 (#​4383, #​4388)

    This PR was contributed by @​MikeWillCook.

v0.27.2

Compare Source

  • Allow import path specifiers starting with #/ (#​4361)

    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 by @​hybrist.

  • 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 by @​BPJEnnova.

  • 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();
  • Forbid using declarations inside switch clauses (#​4323)

    This is a rare change to remove something that was previously possible. The Explicit Resource Management proposal introduced using declarations. These were previously allowed inside case and default clauses in switch statements. This had well-defined semantics and was already widely implemented (by V8, SpiderMonkey, TypeScript, esbuild, and others). However, it was considered to be too confusing because of how scope works in switch statements, so it has been removed from the specification. This edge case will now be a syntax error. See tc39/proposal-explicit-resource-management#215 and rbuckton/ecma262#14 for details.

    Here is an example of code that is no longer allowed:

    switch (mode) {
      case 'read':
        using readLock = db.read()
        return readAll(readLock)
    
      case 'write':
        using writeLock = db.write()
        return writeAll(writeLock)
    }

    That code will now have to be modified to look like this instead (note the additional { and } block statements around each case body):

    switch (mode) {
      case 'read': {
        using readLock = db.read()
        return readAll(readLock)
      }
      case 'write': {
        using writeLock = db.write()
        return writeAll(writeLock)
      }
    }

    This is not being released in one of esbuild's breaking change releases since this feature hasn't been finalized yet, and esbuild always tracks the current state of the specification (so esbuild's previous behavior was arguably incorrect).


Configuration

📅 Schedule: Branch creation - Between 12:00 AM and 03:59 AM, on day 1 of the month ( * 0-3 1 * * ) (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, 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 was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/esbuild-0.x branch 16 times, most recently from f4f3494 to 8c30253 Compare February 6, 2026 00:52
@renovate renovate bot force-pushed the renovate/esbuild-0.x branch from 8c30253 to 95522b7 Compare February 9, 2026 01:10
@renovate renovate bot changed the title chore(deps): update dependency esbuild to v0.27.2 chore(deps): update dependency esbuild to v0.27.3 Feb 9, 2026
@renovate renovate bot force-pushed the renovate/esbuild-0.x branch 10 times, most recently from 42550d0 to 6d0731b Compare March 3, 2026 09:41
@renovate renovate bot force-pushed the renovate/esbuild-0.x branch 2 times, most recently from 7708dfd to 31d4478 Compare March 3, 2026 16:49
@renovate renovate bot force-pushed the renovate/esbuild-0.x branch from 31d4478 to e936424 Compare March 15, 2026 17:00
@renovate renovate bot changed the title chore(deps): update dependency esbuild to v0.27.3 chore(deps): update dependency esbuild to v0.27.4 Mar 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants