This release fixes a bug with the CSS nesting transform for older browsers where the generated CSS could be incorrect if a selector list contained a pseudo element followed by another selector. The bug was caused by incorrectly mutating the parent rule's selector list when filtering out pseudo elements for the child rules:
Constant folding for JavaScript inequality operators (#3645)
This release introduces constant folding for the < > <= >= operators. The minifier will now replace these operators with true or false when both sides are compile-time numeric or string constants:
// Original code
console.log(1 < 2, '🍕' > '🧀')
// Old output (with --minify)
console.log(1<2,"🍕">"🧀");
JavaScript object literal syntax contains a special case where a non-computed property with a key of __proto__ sets the prototype of the object. This does not apply to computed properties or to properties that use the shorthand property syntax introduced in ES6. Previously esbuild didn't correctly preserve the "sets the prototype" status of properties inside an object literal, meaning a property that sets the prototype could accidentally be transformed into one that doesn't and vice versa. This has now been fixed:
// Original code
function foo(__proto__) {
return { __proto__: __proto__ } // Note: sets the prototype
This release fixes a bug with the CSS nesting transform for older browsers where the generated CSS could be incorrect if a selector list contained a pseudo element followed by another selector. The bug was caused by incorrectly mutating the parent rule's selector list when filtering out pseudo elements for the child rules:
Constant folding for JavaScript inequality operators (#3645)
This release introduces constant folding for the < > <= >= operators. The minifier will now replace these operators with true or false when both sides are compile-time numeric or string constants:
// Original code
console.log(1 < 2, '🍕' > '🧀')
// Old output (with --minify)
console.log(1<2,"🍕">"🧀");
JavaScript object literal syntax contains a special case where a non-computed property with a key of __proto__ sets the prototype of the object. This does not apply to computed properties or to properties that use the shorthand property syntax introduced in ES6. Previously esbuild didn't correctly preserve the "sets the prototype" status of properties inside an object literal, meaning a property that sets the prototype could accidentally be transformed into one that doesn't and vice versa. This has now been fixed:
Dependabot commands
You can trigger Dependabot actions by commenting on this MR
$dependabot recreate will recreate this MR rewriting all the manual changes and resolving conflicts
Bumps [esbuild](https://github.com/evanw/esbuild) from 0.20.0 to 0.20.1.
<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.20.1</h2>
<ul>
<li>
<p>Fix a bug with the CSS nesting transform (<a href="https://github.com/evanw/esbuild/issues/3648">#3648</a>)</p>
<p>This release fixes a bug with the CSS nesting transform for older browsers where the generated CSS could be incorrect if a selector list contained a pseudo element followed by another selector. The bug was caused by incorrectly mutating the parent rule's selector list when filtering out pseudo elements for the child rules:</p>
<pre lang="css"><code>/* Original code */
.foo {
&:after,
& .bar {
color: red;
}
}
<p>/* Old output (with --supported:nesting=false) */
.foo .bar,
.foo .bar {
color: red;
}</p>
<p>/* New output (with --supported:nesting=false) */
.foo:after,
.foo .bar {
color: red;
}
</code></pre></p>
</li>
<li>
<p>Constant folding for JavaScript inequality operators (<a href="https://github.com/evanw/esbuild/issues/3645">#3645</a>)</p>
<p>This release introduces constant folding for the <code>< > <= >=</code> operators. The minifier will now replace these operators with <code>true</code> or <code>false</code> when both sides are compile-time numeric or string constants:</p>
<pre lang="js"><code>// Original code
console.log(1 < 2, '🍕' > '🧀')
<p>// Old output (with --minify)
console.log(1<2,"🍕">"🧀");</p>
<p>// New output (with --minify)
console.log(!0,!1);
</code></pre></p>
</li>
<li>
<p>Better handling of <code>__proto__</code> edge cases (<a href="https://github.com/evanw/esbuild/pull/3651">#3651</a>)</p>
<p>JavaScript object literal syntax contains a special case where a non-computed property with a key of <code>__proto__</code> sets the prototype of the object. This does not apply to computed properties or to properties that use the shorthand property syntax introduced in ES6. Previously esbuild didn't correctly preserve the "sets the prototype" status of properties inside an object literal, meaning a property that sets the prototype could accidentally be transformed into one that doesn't and vice versa. This has now been fixed:</p>
<pre lang="js"><code>// Original code
function foo(__proto__) {
return { __proto__: __proto__ } // Note: sets the prototype
</code></pre>
</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.20.1</h2>
<ul>
<li>
<p>Fix a bug with the CSS nesting transform (<a href="https://github.com/evanw/esbuild/issues/3648">#3648</a>)</p>
<p>This release fixes a bug with the CSS nesting transform for older browsers where the generated CSS could be incorrect if a selector list contained a pseudo element followed by another selector. The bug was caused by incorrectly mutating the parent rule's selector list when filtering out pseudo elements for the child rules:</p>
<pre lang="css"><code>/* Original code */
.foo {
&:after,
& .bar {
color: red;
}
}
<p>/* Old output (with --supported:nesting=false) */
.foo .bar,
.foo .bar {
color: red;
}</p>
<p>/* New output (with --supported:nesting=false) */
.foo:after,
.foo .bar {
color: red;
}
</code></pre></p>
</li>
<li>
<p>Constant folding for JavaScript inequality operators (<a href="https://github.com/evanw/esbuild/issues/3645">#3645</a>)</p>
<p>This release introduces constant folding for the <code>< > <= >=</code> operators. The minifier will now replace these operators with <code>true</code> or <code>false</code> when both sides are compile-time numeric or string constants:</p>
<pre lang="js"><code>// Original code
console.log(1 < 2, '🍕' > '🧀')
<p>// Old output (with --minify)
console.log(1<2,"🍕">"🧀");</p>
<p>// New output (with --minify)
console.log(!0,!1);
</code></pre></p>
</li>
<li>
<p>Better handling of <code>__proto__</code> edge cases (<a href="https://github.com/evanw/esbuild/pull/3651">#3651</a>)</p>
<p>JavaScript object literal syntax contains a special case where a non-computed property with a key of <code>__proto__</code> sets the prototype of the object. This does not apply to computed properties or to properties that use the shorthand property syntax introduced in ES6. Previously esbuild didn't correctly preserve the "sets the prototype" status of properties inside an object literal, meaning a property that sets the prototype could accidentally be transformed into one that doesn't and vice versa. This has now been fixed:</p>
<pre lang="js"><code>// Original code
function foo(__proto__) {
</code></pre>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/evanw/esbuild/commit/9f9e4f85e6e28a58727531458663afd157b8b415"><code>9f9e4f8</code></a> publish 0.20.1 to npm</li>
<li><a href="https://github.com/evanw/esbuild/commit/ac365374f9054493aa07530ae1fe8524d26cb617"><code>ac36537</code></a> fix <a href="https://github.com/evanw/esbuild/issues/3651">#3651</a>: handle <code>__proto__</code> edge cases better</li>
<li><a href="https://github.com/evanw/esbuild/commit/555db48d3ddf826ea12e40192dec7f0a542e7302"><code>555db48</code></a> fix <a href="https://github.com/evanw/esbuild/issues/3645">#3645</a>: constant folding for <code>\< > \<= >=</code></li>
<li><a href="https://github.com/evanw/esbuild/commit/5650831e1e45ca2fa39e8bf30182ab68e302db1e"><code>5650831</code></a> fix <a href="https://github.com/evanw/esbuild/issues/3650">#3650</a>: add a wrapper for float64 math</li>
<li><a href="https://github.com/evanw/esbuild/commit/d086889869b3ce4c01643cebfecf8a22d9ab3596"><code>d086889</code></a> fix some lints</li>
<li><a href="https://github.com/evanw/esbuild/commit/ad3d8c63eaf83e473e4ac22ec50ea5c8b10176d5"><code>ad3d8c6</code></a> fix <a href="https://github.com/evanw/esbuild/issues/3648">#3648</a>: copy selectors before checking children</li>
<li><a href="https://github.com/evanw/esbuild/commit/a08f30db4a475472aa09cd89e2279a822266f6c7"><code>a08f30d</code></a> fix <a href="https://github.com/evanw/esbuild/issues/3634">#3634</a>: crash if resolving with bad source dir</li>
<li>See full diff in <a href="https://github.com/evanw/esbuild/compare/v0.20.0...v0.20.1">compare view</a></li>
</ul>
</details>
<br />
---
<details>
<summary>Dependabot commands</summary>
<br />
You can trigger Dependabot actions by commenting on this MR
- `$dependabot recreate` will recreate this MR rewriting all the manual changes and resolving conflicts
</details>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Bumps esbuild from 0.20.0 to 0.20.1.
Release notes
Sourced from esbuild's releases.
... (truncated)
Changelog
Sourced from esbuild's changelog.
... (truncated)
Commits
9f9e4f8publish 0.20.1 to npmac36537fix #3651: handle__proto__edge cases better555db48fix #3645: constant folding for\< > \<= >=5650831fix #3650: add a wrapper for float64 mathd086889fix some lintsad3d8c6fix #3648: copy selectors before checking childrena08f30dfix #3634: crash if resolving with bad source dirDependabot commands
You can trigger Dependabot actions by commenting on this MR
$dependabot recreatewill recreate this MR rewriting all the manual changes and resolving conflictsadded 2 commits
c25e1864- 1 commit from branchmain0309398c- Build(deps-dev): bump esbuild from 0.20.0 to 0.20.1Compare with previous version