Bump esbuild from 0.14.54 to 0.15.12
Bumps esbuild from 0.14.54 to 0.15.12.
Release notes
Sourced from esbuild's releases.
v0.15.12
Fix minifier correctness bug with single-use substitutions (#2619)
When minification is enabled, esbuild will attempt to eliminate variables that are only used once in certain cases. For example, esbuild minifies this code:
function getEmailForUser(name) { let users = db.table('users'); let user = users.find({ name }); let email = user?.get('email'); return email; }into this code:
function getEmailForUser(e){return db.table("users").find({name:e})?.get("email")}However, this transformation had a bug where esbuild did not correctly consider the "read" part of binary read-modify-write assignment operators. For example, it's incorrect to minify the following code into
bar += fn()because the call tofn()might modifybar:const foo = fn(); bar += foo;In addition to fixing this correctness bug, this release also improves esbuild's output in the case where all values being skipped over are primitives:
function toneMapLuminance(r, g, b) { let hdr = luminance(r, g, b) let decay = 1 / (1 + hdr) return 1 - decay }Previous releases of esbuild didn't substitute these single-use variables here, but esbuild will now minify this to the following code starting with this release:
function toneMapLuminance(e,n,a){return 1-1/(1+luminance(e,n,a))}v0.15.11
Fix various edge cases regarding template tags and
this(#2610)This release fixes some bugs where the value of
thiswasn't correctly preserved when evaluating template tags in a few edge cases. These edge cases are listed below:async function test() {
... (truncated)
Changelog
Sourced from esbuild's changelog.
0.15.12
Fix minifier correctness bug with single-use substitutions (#2619)
When minification is enabled, esbuild will attempt to eliminate variables that are only used once in certain cases. For example, esbuild minifies this code:
function getEmailForUser(name) { let users = db.table('users'); let user = users.find({ name }); let email = user?.get('email'); return email; }into this code:
function getEmailForUser(e){return db.table("users").find({name:e})?.get("email")}However, this transformation had a bug where esbuild did not correctly consider the "read" part of binary read-modify-write assignment operators. For example, it's incorrect to minify the following code into
bar += fn()because the call tofn()might modifybar:const foo = fn(); bar += foo;In addition to fixing this correctness bug, this release also improves esbuild's output in the case where all values being skipped over are primitives:
function toneMapLuminance(r, g, b) { let hdr = luminance(r, g, b) let decay = 1 / (1 + hdr) return 1 - decay }Previous releases of esbuild didn't substitute these single-use variables here, but esbuild will now minify this to the following code starting with this release:
function toneMapLuminance(e,n,a){return 1-1/(1+luminance(e,n,a))}0.15.11
Fix various edge cases regarding template tags and
this(#2610)This release fixes some bugs where the value of
thiswasn't correctly preserved when evaluating template tags in a few edge cases. These edge cases are listed below:
... (truncated)
Commits
223e6eapublish 0.15.12 to npmccc8e8bfix #2619: bug with single-use substitutions4608721ci: update github actions (#2612)0bb62e8publish 0.15.11 to npm9c89f14update go 1.19.1 => 1.19.20d8ec0afix #2610: template tag edge cases withthisa4a45f3fix indentation in tests81fa2camore info in yarn pnp error messages (#2585)fdbea94fixes for NewStringInJSLogaaae34epublish 0.15.10 to npm- Additional commits viewable in compare view
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 commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major versionwill 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 versionwill 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 dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)