Packages

@esbuild/darwin-arm64

0.28.2 · 8 Aug 2026MIT20.6M / weekRepositoryHomepagenpmAtom feed

Your version

0.17.11

3 Mar 2023Where it was published

0.28.2 is the newest release of 0.17.x.

In short

1 fixed2 changed

Release note

  • Fix the alias feature to always prefer the longest match

    It's possible to configure conflicting aliases such as --alias:a=b and --alias:a/c=d, which is ambiguous for the import path a/c/x (since it could map to either b/c/x or d/x). Previously esbuild would pick the first matching alias, which would non-deterministically pick between one of the possible matches. This release fixes esbuild to always deterministically pick the longest possible match.

  • Minify calls to some global primitive constructors

    With this release, esbuild's minifier now replaces calls to Boolean/Number/String/BigInt with equivalent shorter code when relevant:

    // Original code
    console.log(
      Boolean(a ? (b | c) !== 0 : (c & d) !== 0),
      Number(e ? '1' : '2'),
      String(e ? '1' : '2'),
      BigInt(e ? 1n : 2n),
    )
    
    // Old output (with --minify)
    console.log(Boolean(a?(b|c)!==0:(c&d)!==0),Number(e?"1":"2"),String(e?"1":"2"),BigInt(e?1n:2n));
    
    // New output (with --minify)
    console.log(!!(a?b|c:c&d),+(e?"1":"2"),e?"1":"2",e?1n:2n);
  • Adjust some feature compatibility tables for node

    This release makes the following adjustments to esbuild's internal feature compatibility tables for node, which tell esbuild which versions of node are known to support all aspects of that feature:

    • class-private-brand-checks: node v16.9+ => node v16.4+ (a decrease)

    • hashbang: node v12.0+ => node v12.5+ (an increase)

    • optional-chain: node v16.9+ => node v16.1+ (a decrease)

    • template-literal: node v4+ => node v10+ (an increase)

    Each of these adjustments was identified by comparing against data from the node-compat-table package and was manually verified using old node executables downloaded from nodejs.org/download/release/.

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.