chore(deps): update dependency esbuild to ^0.16.9 || ^0.19.1 #191
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.16.9
->^0.16.9 || ^0.19.1
⚠ Dependency Lookup Warnings ⚠
Warnings were logged while processing this repo. Please check the Dependency Dashboard for more information.
Release Notes
evanw/esbuild (esbuild)
v0.19.4
Compare Source
Fix printing of JavaScript decorators in tricky cases (#3396)
This release fixes some bugs where esbuild's pretty-printing of JavaScript decorators could incorrectly produced code with a syntax error. The problem happened because esbuild sometimes substitutes identifiers for other expressions in the pretty-printer itself, but the decision about whether to wrap the expression or not didn't account for this. Here are some examples:
Allow pre-release versions to be passed to
target
(#3388)People want to be able to pass version numbers for unreleased versions of node (which have extra stuff after the version numbers) to esbuild's
target
setting and have esbuild do something reasonable with them. These version strings are of course not present in esbuild's internal feature compatibility table because an unreleased version has not been released yet (by definition). With this release, esbuild will now attempt to accept these version strings passed totarget
and do something reasonable with them.v0.19.3
Compare Source
Fix
list-style-type
with thelocal-css
loader (#3325)The
local-css
loader incorrectly treated all identifiers provided tolist-style-type
as a custom local identifier. That included identifiers such asnone
which have special meaning in CSS, and which should not be treated as custom local identifiers. This release fixes this bug:Note that this bug only affected code using the
local-css
loader. It did not affect code using thecss
loader.Avoid inserting temporary variables before
use strict
(#3322)This release fixes a bug where esbuild could incorrectly insert automatically-generated temporary variables before
use strict
directives:Adjust TypeScript
enum
output to better approximatetsc
(#3329)TypeScript enum values can be either number literals or string literals. Numbers create a bidirectional mapping between the name and the value but strings only create a unidirectional mapping from the name to the value. When the enum value is neither a number literal nor a string literal, TypeScript and esbuild both default to treating it as a number:
However, TypeScript does constant folding slightly differently than esbuild. For example, it may consider template literals to be string literals in some cases:
The template literal initializer for
PRESENT
is treated as a string while the template literal initializer forMISSING
is treated as a number. Previously esbuild treated both of these cases as a number but starting with this release, esbuild will now treat both of these cases as a string. This doesn't exactly match the behavior oftsc
but in the case where the behavior divergestsc
reports a compile error, so this seems like acceptible behavior for esbuild. Note that handling these cases completely correctly would require esbuild to parse type declarations (see thedeclare
keyword), which esbuild deliberately doesn't do.Ignore case in CSS in more places (#3316)
This release makes esbuild's CSS support more case-agnostic, which better matches how browsers work. For example:
Please never actually write code like this.
Improve the error message for
null
entries inexports
(#3377)Package authors can disable package export paths with the
exports
map inpackage.json
. With this release, esbuild now has a clearer error message that points to thenull
token inpackage.json
itself instead of to the surrounding context. Here is an example of the new error message:Parse and print the
with
keyword inimport
statementsJavaScript was going to have a feature called "import assertions" that adds an
assert
keyword toimport
statements. It looked like this:The feature provided a way to assert that the imported file is of a certain type (but was not allowed to affect how the import is interpreted, even though that's how everyone expected it to behave). The feature was fully specified and then actually implemented and shipped in Chrome before the people behind the feature realized that they should allow it to affect how the import is interpreted after all. So import assertions are no longer going to be added to the language.
Instead, the current proposal is to add a feature called "import attributes" instead that adds a
with
keyword to import statements. It looks like this:This feature provides a way to affect how the import is interpreted. With this release, esbuild now has preliminary support for parsing and printing this new
with
keyword. Thewith
keyword is not yet interpreted by esbuild, however, so bundling code with it will generate a build error. All this release does is allow you to use esbuild to process code containing it (such as removing types from TypeScript code). Note that this syntax is not yet a part of JavaScript and may be removed or altered in the future if the specification changes (which it already has once, as described above). If that happens, esbuild reserves the right to remove or alter its support for this syntax too.v0.19.2
Compare Source
Update how CSS nesting is parsed again
CSS nesting syntax has been changed again, and esbuild has been updated to match. Type selectors may now be used with CSS nesting:
Previously this was disallowed in the CSS specification because it's ambiguous whether an identifier is a declaration or a nested rule starting with a type selector without requiring unbounded lookahead in the parser. It has now been allowed because the CSS working group has decided that requiring unbounded lookahead is acceptable after all.
Note that this change means esbuild no longer considers any existing browser to support CSS nesting since none of the existing browsers support this new syntax. CSS nesting will now always be transformed when targeting a browser. This situation will change in the future as browsers add support for this new syntax.
Fix a scope-related bug with
--drop-labels=
(#3311)The recently-released
--drop-labels=
feature previously had a bug where esbuild's internal scope stack wasn't being restored properly when a statement with a label was dropped. This could manifest as a tree-shaking issue, although it's possible that this could have also been causing other subtle problems too. The bug has been fixed in this release.Make renamed CSS names unique across entry points (#3295)
Previously esbuild's generated names for local names in CSS were only unique within a given entry point (or across all entry points when code splitting was enabled). That meant that building multiple entry points with esbuild could result in local names being renamed to the same identifier even when those entry points were built simultaneously within a single esbuild API call. This problem was especially likely to happen with minification enabled. With this release, esbuild will now avoid renaming local names from two separate entry points to the same name if those entry points were built with a single esbuild API call, even when code splitting is disabled.
Fix CSS ordering bug with
@layer
before@import
CSS lets you put
@layer
rules before@import
rules to define the order of layers in a stylesheet. Previously esbuild's CSS bundler incorrectly ordered these after the imported files because before the introduction of cascade layers to CSS, imported files could be bundled by removing the@import
rules and then joining files together in the right order. But with@layer
, CSS files may now need to be split apart into multiple pieces in the bundle. For example:Unwrap nested duplicate
@media
rules (#3226)With this release, esbuild's CSS minifier will now automatically unwrap duplicate nested
@media
rules:These rules are unlikely to be authored manually but may result from using frameworks such as Tailwind to generate CSS.
Configuration
📅 Schedule: Branch creation - "every weekend" (UTC), Automerge - 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 Mend Renovate. View repository job log here.