evanw/esbuild
### [`v0.17.11`](https://togithub.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#01711)
[Compare Source](https://togithub.com/evanw/esbuild/compare/v0.17.10...v0.17.11)
- Fix the `alias` feature to always prefer the longest match ([#2963](https://togithub.com/evanw/esbuild/issues/2963))
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 ([#2962](https://togithub.com/evanw/esbuild/issues/2962))
With this release, esbuild's minifier now replaces calls to `Boolean`/`Number`/`String`/`BigInt` with equivalent shorter code when relevant:
```js
// 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 ([#2940](https://togithub.com/evanw/esbuild/issues/2940))
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 https://nodejs.org/download/release/.
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ 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 has been generated by Mend Renovate. View repository job log here.
This PR contains the following updates:
0.17.10
->0.17.11
Release Notes
evanw/esbuild
### [`v0.17.11`](https://togithub.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#01711) [Compare Source](https://togithub.com/evanw/esbuild/compare/v0.17.10...v0.17.11) - Fix the `alias` feature to always prefer the longest match ([#2963](https://togithub.com/evanw/esbuild/issues/2963)) 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 ([#2962](https://togithub.com/evanw/esbuild/issues/2962)) With this release, esbuild's minifier now replaces calls to `Boolean`/`Number`/`String`/`BigInt` with equivalent shorter code when relevant: ```js // 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 ([#2940](https://togithub.com/evanw/esbuild/issues/2940)) 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 https://nodejs.org/download/release/.Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ 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.
This PR has been generated by Mend Renovate. View repository job log here.