chore(deps): update dependency esbuild to v0.12.23 #683
No reviewers
Labels
No Label
area/internal-code
changes requested
confirmed
dependencies
duplicate
good first issue
help wanted
hosting
invalid
kind/bug
kind/feature
question
wontfix
No Milestone
No project
No Assignees
1 Participants
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: vikunja/frontend#683
Loading…
Reference in New Issue
No description provided.
Delete Branch "renovate/esbuild-0.x"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR contains the following updates:
0.12.22
->0.12.23
Release Notes
evanw/esbuild
v0.12.23
Compare Source
Parsing of rest arguments in certain TypeScript types (#1553)
This release implements parsing of rest arguments inside object destructuring inside arrow functions inside TypeScript type declarations. Support for rest arguments in this specific syntax was not previously implemented. The following code was incorrectly considered a syntax error before this release, but is no longer considered a syntax error:
Fix error message for
watch: true
andbuildSync
(#1552)Watch mode currently only works with the
build
API. Previously using watch mode with thebuildSync
API caused a confusing error message. This release explicitly disallows doing this, so the error message is now more clear.Fix an minification bug with the
--keep-names
option (#1552)This release fixes a subtle bug that happens with
--keep-names --minify
and nested function declarations in strict mode code. It can be triggered by the following code, which was being compiled incorrectly under those flags:The bug was caused by an unfortunate interaction between a few of esbuild's behaviors:
Function declarations inside of nested scopes behave differently in different situations, so esbuild rewrites this function declaration to a local variable initialized to a function expression instead so that it behaves the same in all situations.
More specifically, the interpretation of such function declarations depends on whether or not it currently exists in a strict mode context:
The bundling process sometimes erases strict mode context. For example, different files may have different strict mode status but may be merged into a single file which all shares the same strict mode status. Also, files in ESM format are automatically in strict mode but a bundle output file in IIFE format may not be executed in strict mode. Transforming the nested
function
to alet
in strict mode and avar
in non-strict mode means esbuild's output will behave reliably in different environments.The "keep names" feature adds automatic calls to the built-in
__name
helper function to assign the original name to the.name
property of the minified function object at run-time. That transforms the code into this:This injected helper call does not count as a use of the associated function object so that dead-code elimination will still remove the function object as dead code if nothing else uses it. Otherwise dead-code elimination would stop working when the "keep names" feature is enabled.
Minification enables an optimization where an initialized variable with a single use immediately following that variable is transformed by inlining the initializer into the use. So for example
var a = 1; return a
is transformed intoreturn 1
. This code matches this pattern (initialized single-use variable + use immediately following that variable) so the optimization does the inlining, which transforms the code into this:The code is now incorrect because
inner
actually has two uses, although only one was actually counted.This inlining optimization will now be avoided in this specific case, which fixes the bug without regressing dead-code elimination or initialized variable inlining in any other cases.
Configuration
📅 Schedule: At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot.