chore(deps): update dependency esbuild to ^0.14.45 #6
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.14.44
->^0.14.45
Release Notes
evanw/esbuild
v0.14.45
Compare Source
Add a log message for ambiguous re-exports (#2322)
In JavaScript, you can re-export symbols from another file using
export * from './another-file'
. When you do this from multiple files that export different symbols with the same name, this creates an ambiguous export which is causes that name to not be exported. This is harmless if you don't plan on using the ambiguous export name, so esbuild doesn't have a warning for this. But if you do want a warning for this (or if you want to make it an error), you can now opt-in to seeing this log message with--log-override:ambiguous-reexport=warning
or--log-override:ambiguous-reexport=error
. The log message looks like this:Optimize the output of the JSON loader (#2161)
The
json
loader (which is enabled by default for.json
files) parses the file as JSON and generates a JavaScript file with the parsed expression as thedefault
export. This behavior is standard and works in both node and the browser (well, as long as you use an import assertion). As an extension, esbuild also allows you to import additional top-level properties of the JSON object directly as a named export. This is beneficial for tree shaking. For example:If you bundle the above code with esbuild, you'll get something like the following:
Most of the
package.json
file is irrelevant and has been omitted from the output due to tree shaking. The way esbuild implements this is to have the JavaScript file that's generated from the JSON look something like this with a separate exported variable for each property on the top-level object:However, this means that if you import the
default
export instead of a named export, you will get non-optimal output. Thedefault
export references all top-level properties, leading to many unnecessary variables in the output. With this release esbuild will now optimize this case to only generate additional variables for top-level object properties that are actually imported:Notice how there is no longer an unnecessary generated variable for
foo
since it's never imported. And if you only import thedefault
export, esbuild will now reproduce the original JSON object in the output with all top-level properties compactly inline.Add
id
to warnings returned from the APIWith this release, warnings returned from esbuild's API now have an
id
property. This identifies which kind of log message it is, which can be used to more easily filter out certain warnings. For example, reassigning aconst
variable will generate a message with anid
of"assign-to-constant"
. This also gives you the identifier you need to apply a log override for that kind of message: https://esbuild.github.io/api/#log-override.Configuration
📅 Schedule: Branch creation - "before 6am" in timezone Asia/Jakarta, 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 this update again.
This PR has been generated by Mend Renovate. View repository job log here.