Commit 19d5e11
authored
chore(deps-dev): Bump esbuild from 0.15.15 to 0.15.16 (#341)
Bumps [esbuild](https://github.com/evanw/esbuild) from 0.15.15 to
0.15.16.
<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.15.16</h2>
<ul>
<li>
<p>Add a package alias feature (<a
href="https://github-redirect.dependabot.com/evanw/esbuild/issues/2191">#2191</a>)</p>
<p>With this release, you can now easily substitute one package for
another at build time with the new <code>alias</code> feature. For
example, <code>--alias:oldpkg=newpkg</code> replaces all imports of
<code>oldpkg</code> with <code>newpkg</code>. One use case for this is
easily replacing a node-only package with a browser-friendly package in
3rd-party code that you don't control. These new substitutions happen
first before all of esbuild's existing path resolution logic.</p>
<p>Note that when an import path is substituted using an alias, the
resulting import path is resolved in the working directory instead of in
the directory containing the source file with the import path. If
needed, the working directory can be set with the <code>cd</code>
command when using the CLI or with the <code>absWorkingDir</code>
setting when using the JS or Go APIs.</p>
</li>
<li>
<p>Fix crash when pretty-printing minified JSX with object spread of
object literal with computed property (<a
href="https://github-redirect.dependabot.com/evanw/esbuild/issues/2697">#2697</a>)</p>
<p>JSX elements are translated to JavaScript function calls and JSX
element attributes are translated to properties on a JavaScript object
literal. These properties are always either strings (e.g. in <code><x
y /></code>, <code>y</code> is a string) or an object spread (e.g. in
<code><x {...y} /></code>, <code>y</code> is an object spread)
because JSX doesn't provide syntax for directly passing a computed
property as a JSX attribute. However, esbuild's minifier has a rule that
tries to inline object spread with an inline object literal in
JavaScript. For example, <code>x = { ...{ y } }</code> is minified to
<code>x={y}</code> when minification is enabled. This means that there
is a way to generate a non-string non-spread JSX attribute in esbuild's
internal representation. One example is with <code><x {...{ [y]: z }}
/></code>. When minification is enabled, esbuild's internal
representation of this is something like <code><x [y]={z}
/></code> due to object spread inlining, which is not valid JSX
syntax. If this internal representation is then pretty-printed as JSX
using <code>--minify --jsx=preserve</code>, esbuild previously crashed
when trying to print this invalid syntax. With this release, esbuild
will now print <code><x {...{[y]:z}}/></code> in this scenario
instead of crashing.</p>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/evanw/esbuild/blob/master/CHANGELOG.md">esbuild's
changelog</a>.</em></p>
<blockquote>
<h2>0.15.16</h2>
<ul>
<li>
<p>Add a package alias feature (<a
href="https://github-redirect.dependabot.com/evanw/esbuild/issues/2191">#2191</a>)</p>
<p>With this release, you can now easily substitute one package for
another at build time with the new <code>alias</code> feature. For
example, <code>--alias:oldpkg=newpkg</code> replaces all imports of
<code>oldpkg</code> with <code>newpkg</code>. One use case for this is
easily replacing a node-only package with a browser-friendly package in
3rd-party code that you don't control. These new substitutions happen
first before all of esbuild's existing path resolution logic.</p>
<p>Note that when an import path is substituted using an alias, the
resulting import path is resolved in the working directory instead of in
the directory containing the source file with the import path. If
needed, the working directory can be set with the <code>cd</code>
command when using the CLI or with the <code>absWorkingDir</code>
setting when using the JS or Go APIs.</p>
</li>
<li>
<p>Fix crash when pretty-printing minified JSX with object spread of
object literal with computed property (<a
href="https://github-redirect.dependabot.com/evanw/esbuild/issues/2697">#2697</a>)</p>
<p>JSX elements are translated to JavaScript function calls and JSX
element attributes are translated to properties on a JavaScript object
literal. These properties are always either strings (e.g. in <code><x
y /></code>, <code>y</code> is a string) or an object spread (e.g. in
<code><x {...y} /></code>, <code>y</code> is an object spread)
because JSX doesn't provide syntax for directly passing a computed
property as a JSX attribute. However, esbuild's minifier has a rule that
tries to inline object spread with an inline object literal in
JavaScript. For example, <code>x = { ...{ y } }</code> is minified to
<code>x={y}</code> when minification is enabled. This means that there
is a way to generate a non-string non-spread JSX attribute in esbuild's
internal representation. One example is with <code><x {...{ [y]: z }}
/></code>. When minification is enabled, esbuild's internal
representation of this is something like <code><x [y]={z}
/></code> due to object spread inlining, which is not valid JSX
syntax. If this internal representation is then pretty-printed as JSX
using <code>--minify --jsx=preserve</code>, esbuild previously crashed
when trying to print this invalid syntax. With this release, esbuild
will now print <code><x {...{[y]:z}}/></code> in this scenario
instead of crashing.</p>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/evanw/esbuild/commit/50ae05ba9433c86ac227d917f3b92cec484ccfc5"><code>50ae05b</code></a>
publish 0.15.16 to npm</li>
<li><a
href="https://github.com/evanw/esbuild/commit/d8d7362e3c74d433c8f14164b1550b21fddd1c3a"><code>d8d7362</code></a>
alias: more tests, allow relative substitutions</li>
<li><a
href="https://github.com/evanw/esbuild/commit/a7eb7891ec1aeb7f7967ae38d72ab96518913e62"><code>a7eb789</code></a>
fix <a
href="https://github-redirect.dependabot.com/evanw/esbuild/issues/2191">#2191</a>:
add a path alias feature</li>
<li><a
href="https://github.com/evanw/esbuild/commit/4e9f9c15a261eb01ff13ccf4e191cc8b0b238efc"><code>4e9f9c1</code></a>
fix indentation for some tests</li>
<li><a
href="https://github.com/evanw/esbuild/commit/89e4520ca880ed535897a6d75cb70535372bdb64"><code>89e4520</code></a>
fix <a
href="https://github-redirect.dependabot.com/evanw/esbuild/issues/2697">#2697</a>:
jsx + spread + computed property crash</li>
<li><a
href="https://github.com/evanw/esbuild/commit/ef348a31b80b18fb02e3363eb32a809494b1993b"><code>ef348a3</code></a>
jsx: pretty-print single-line JSX elements</li>
<li>See full diff in <a
href="https://github.com/evanw/esbuild/compare/v0.15.15...v0.15.16">compare
view</a></li>
</ul>
</details>
<br />
[](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 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>1 parent 010a543 commit 19d5e11
1 file changed
+184
-184
lines changed
0 commit comments