Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump esbuild from 0.20.2 to 0.21.4 (#67)
Bumps [esbuild](https://github.com/evanw/esbuild) from 0.20.2 to 0.21.4. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/evanw/esbuild/releases">esbuild's releases</a>.</em></p> <blockquote> <h2>v0.21.4</h2> <ul> <li> <p>Update support for import assertions and import attributes in node (<a href="https://redirect.github.com/evanw/esbuild/issues/3778">#3778</a>)</p> <p>Import assertions (the <code>assert</code> keyword) have been removed from node starting in v22.0.0. So esbuild will now strip them and generate a warning with <code>--target=node22</code> or above:</p> <pre><code>▲ [WARNING] The "assert" keyword is not supported in the configured target environment ("node22") [assert-to-with] <pre><code>example.mjs:1:40: 1 │ import json from &quot;esbuild/package.json&quot; assert { type: &quot;json&quot; } │ ~~~~~~ ╵ with </code></pre> <p>Did you mean to use "with" instead of "assert"? </code></pre></p> <p>Import attributes (the <code>with</code> keyword) have been backported to node 18 starting in v18.20.0. So esbuild will no longer strip them with <code>--target=node18.N</code> if <code>N</code> is 20 or greater.</p> </li> <li> <p>Fix <code>for await</code> transform when a label is present</p> <p>This release fixes a bug where the <code>for await</code> transform, which wraps the loop in a <code>try</code> statement, previously failed to also move the loop's label into the <code>try</code> statement. This bug only affects code that uses both of these features in combination. Here's an example of some affected code:</p> <pre lang="js"><code>// Original code async function test() { outer: for await (const x of [Promise.resolve([0, 1])]) { for (const y of x) if (y) break outer throw 'fail' } } <p>// Old output (with --target=es6) function test() { return __async(this, null, function* () { outer: try { for (var iter = __forAwait([Promise.resolve([0, 1])]), more, temp, error; more = !(temp = yield iter.next()).done; more = false) { const x = temp.value; for (const y of x) if (y) break outer; throw "fail"; } } catch (temp) { error = [temp]; } finally { try { more && (temp = iter.return) && (yield temp.call(iter)); } finally { if (error) throw error[0]; } } </code></pre></p> </li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/evanw/esbuild/blob/main/CHANGELOG.md">esbuild's changelog</a>.</em></p> <blockquote> <h2>0.21.4</h2> <ul> <li> <p>Update support for import assertions and import attributes in node (<a href="https://redirect.github.com/evanw/esbuild/issues/3778">#3778</a>)</p> <p>Import assertions (the <code>assert</code> keyword) have been removed from node starting in v22.0.0. So esbuild will now strip them and generate a warning with <code>--target=node22</code> or above:</p> <pre><code>▲ [WARNING] The "assert" keyword is not supported in the configured target environment ("node22") [assert-to-with] <pre><code>example.mjs:1:40: 1 │ import json from &quot;esbuild/package.json&quot; assert { type: &quot;json&quot; } │ ~~~~~~ ╵ with </code></pre> <p>Did you mean to use "with" instead of "assert"? </code></pre></p> <p>Import attributes (the <code>with</code> keyword) have been backported to node 18 starting in v18.20.0. So esbuild will no longer strip them with <code>--target=node18.N</code> if <code>N</code> is 20 or greater.</p> </li> <li> <p>Fix <code>for await</code> transform when a label is present</p> <p>This release fixes a bug where the <code>for await</code> transform, which wraps the loop in a <code>try</code> statement, previously failed to also move the loop's label into the <code>try</code> statement. This bug only affects code that uses both of these features in combination. Here's an example of some affected code:</p> <pre lang="js"><code>// Original code async function test() { outer: for await (const x of [Promise.resolve([0, 1])]) { for (const y of x) if (y) break outer throw 'fail' } } <p>// Old output (with --target=es6) function test() { return __async(this, null, function* () { outer: try { for (var iter = __forAwait([Promise.resolve([0, 1])]), more, temp, error; more = !(temp = yield iter.next()).done; more = false) { const x = temp.value; for (const y of x) if (y) break outer; throw "fail"; } } catch (temp) { error = [temp]; } finally { try { more && (temp = iter.return) && (yield temp.call(iter)); } finally { if (error) throw error[0]; } </code></pre></p> </li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/evanw/esbuild/commit/67cbf87a4909d87a902ca8c3b69ab5330defab0a"><code>67cbf87</code></a> publish 0.21.4 to npm</li> <li><a href="https://github.com/evanw/esbuild/commit/4ad11c303e9fdbbd2dc6198f69abf9e18a8658e5"><code>4ad11c3</code></a> fix <a href="https://redirect.github.com/evanw/esbuild/issues/3639">#3639</a>, fix <a href="https://redirect.github.com/evanw/esbuild/issues/3646">#3646</a>: pass <code>with</code> to <code>onResolve</code></li> <li><a href="https://github.com/evanw/esbuild/commit/516ca317a40185e69265cb50a146130b2e6a7fe6"><code>516ca31</code></a> fix <a href="https://redirect.github.com/evanw/esbuild/issues/3343">#3343</a>: allow bundle-internal string aliases</li> <li><a href="https://github.com/evanw/esbuild/commit/9e2f304cb651d8dfe1a82a26c8d6e38d83046da2"><code>9e2f304</code></a> fix <a href="https://redirect.github.com/evanw/esbuild/issues/3416">#3416</a>, fix <a href="https://redirect.github.com/evanw/esbuild/issues/3425">#3425</a>: better enum constant folding</li> <li><a href="https://github.com/evanw/esbuild/commit/8f1faf7d4a9e5d26768e7b29dc6f5a983be98dbc"><code>8f1faf7</code></a> implement late constant-folding for <code>&& || ??</code></li> <li><a href="https://github.com/evanw/esbuild/commit/7d50a50dccbbba7db0633e9f930249853d5cf241"><code>7d50a50</code></a> implement late constant-folding of string enums</li> <li><a href="https://github.com/evanw/esbuild/commit/1b29ac7d0a85db78d9cb1b39d36f1e0d6284526d"><code>1b29ac7</code></a> fold equality checks after cross-module inlining</li> <li><a href="https://github.com/evanw/esbuild/commit/d7a8bf32702fe5b4a91c2aecf66ae52117f901d8"><code>d7a8bf3</code></a> formatting support for <code>@position-try</code> (for <a href="https://redirect.github.com/evanw/esbuild/issues/3773">#3773</a>)</li> <li><a href="https://github.com/evanw/esbuild/commit/5069410dafd95f44b7d66732d8bfd0aef6321c3b"><code>5069410</code></a> fix <a href="https://redirect.github.com/evanw/esbuild/issues/3778">#3778</a>: import assertions/attributes for node</li> <li><a href="https://github.com/evanw/esbuild/commit/11d568c87468b4af3ea70b01944c1e7d1314ed97"><code>11d568c</code></a> run <code>make update-compat-table</code></li> <li>Additional commits viewable in <a href="https://github.com/evanw/esbuild/compare/v0.20.2...v0.21.4">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=esbuild&package-manager=npm_and_yarn&previous-version=0.20.2&new-version=0.21.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) 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-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will 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 version` will 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 dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
- Loading branch information