chore(deps): update dependency esbuild to v0.15.13 #6863
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.15.10
->0.15.13
Release Notes
evanw/esbuild
v0.15.13
Compare Source
Add support for the TypeScript 4.9
satisfies
operator (#2509)TypeScript 4.9 introduces a new operator called
satisfies
that lets you check that a given value satisfies a less specific type without casting it to that less specific type and without generating any additional code at run-time. It looks like this:Before this existed, you could use a cast with
as
to check that a value satisfies a less specific type, but that removes any additional knowledge that TypeScript has about that specific value:You can read more about this feature in TypeScript's blog post for 4.9 as well as the associated TypeScript issue for this feature.
This feature was implemented in esbuild by @magic-akari.
Fix watch mode constantly rebuilding if the parent directory is inaccessible (#2640)
Android is unusual in that it has an inaccessible directory in the path to the root, which esbuild was not originally built to handle. To handle cases like this, the path resolution layer in esbuild has a hack where it treats inaccessible directories as empty. However, esbuild's watch implementation currently triggers a rebuild if a directory previously encountered an error but the directory now exists. The assumption is that the previous error was caused by the directory not existing. Although that's usually the case, it's not the case for this particular parent directory on Android. Instead the error is that the directory previously existed but was inaccessible.
This discrepancy between esbuild's path resolution layer and its watch mode was causing watch mode to rebuild continuously on Android. With this release, esbuild's watch mode instead checks for an error status change in the
readdir
file system call, so watch mode should no longer rebuild continuously on Android.Apply a fix for a rare deadlock with the JavaScript API (#1842, #2485)
There have been reports of esbuild sometimes exiting with an "all goroutines are asleep" deadlock message from the Go language runtime. This issue hasn't made much progress until recently, where a possible cause was discovered (thanks to @jfirebaugh for the investigation). This release contains a possible fix for that possible cause, so this deadlock may have been fixed. The fix cannot be easily verified because the deadlock is non-deterministic and rare. If this was indeed the cause, then this issue only affected the JavaScript API in situations where esbuild was already in the process of exiting.
In detail: The underlying cause is that Go's
sync.WaitGroup
API for waiting for a set of goroutines to finish is not fully thread-safe. Specifically it's not safe to callAdd()
concurrently withWait()
when the wait group counter is zero due to a data race. This situation could come up with esbuild's JavaScript API when the host JavaScript process closes the child process's stdin and the child process (with no active tasks) callsWait()
to check that there are no active tasks, at the same time as esbuild's watchdog timer callsAdd()
to add an active task (that pings the host to see if it's still there). The fix in this release is to avoid callingAdd()
once we learn that stdin has been closed but before we callWait()
.v0.15.12
Compare Source
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:
into this code:
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
: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:
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:
v0.15.11
Compare Source
Fix various edge cases regarding template tags and
this
(#2610)This release fixes some bugs where the value of
this
wasn't correctly preserved when evaluating template tags in a few edge cases. These edge cases are listed below:Each edge case in the code above previously incorrectly printed
false
when run through esbuild with--minify --target=es6
but now correctly printstrue
. These edge cases are unlikely to have affected real-world code.Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR has been generated by Mend Renovate. View repository job log here.