Update dependency esbuild to v0.17.14 #14595
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.17.12->0.17.14Release Notes
evanw/esbuild
v0.17.14Compare Source
Allow the TypeScript 5.0
constmodifier in object type declarations (#3021)The new TypeScript 5.0
constmodifier was added to esbuild in version 0.17.5, and works with classes, functions, and arrow expressions. However, support for it wasn't added to object type declarations (e.g. interfaces) due to an oversight. This release adds support for these cases, so the following TypeScript 5.0 code can now be built with esbuild:Implement preliminary lowering for CSS nesting (#1945)
Chrome has implemented the new CSS nesting specification in version 112, which is currently in beta but will become stable very soon. So CSS nesting is now a part of the web platform!
This release of esbuild can now transform nested CSS syntax into non-nested CSS syntax for older browsers. The transformation relies on the
:is()pseudo-class in many cases, so the transformation is only guaranteed to work when targeting browsers that support:is()(e.g. Chrome 88+). You'll need to set esbuild'stargetto the browsers you intend to support to tell esbuild to do this transformation. You will get a warning if you use CSS nesting syntax with atargetwhich includes older browsers that don't support:is().The lowering transformation looks like this:
More complex cases may generate the
:is()pseudo-class:In addition, esbuild now has a special warning message for nested style rules that start with an identifier. This isn't allowed in CSS because the syntax would be ambiguous with the existing declaration syntax. The new warning message looks like this:
Keep in mind that the transformation in this release is a preliminary implementation. CSS has many features that interact in complex ways, and there may be some edge cases that don't work correctly yet.
Minification now removes unnecessary
&CSS nesting selectorsThis release introduces the following CSS minification optimizations:
Minification now removes duplicates from CSS selector lists
This release introduces the following CSS minification optimization:
v0.17.13Compare Source
Work around an issue with
NODE_PATHand Go's WebAssembly internals (#3001)Go's WebAssembly implementation returns
EINVALinstead ofENOTDIRwhen using thereaddirsyscall on a file. This messes up esbuild's implementation of node's module resolution algorithm since encounteringENOTDIRcauses esbuild to continue its search (since it's a normal condition) while other encountering other errors causes esbuild to fail with an I/O error (since it's an unexpected condition). You can encounter this issue in practice if you use node's legacyNODE_PATHfeature to tell esbuild to resolve node modules in a custom directory that was not installed by npm. This release works around this problem by convertingEINVALintoENOTDIRfor thereaddirsyscall.Fix a minification bug with CSS
@layerrules that have parsing errors (#3016)CSS at-rules require either a
{}block or a semicolon at the end. Omitting both of these causes esbuild to treat the rule as an unknown at-rule. Previous releases of esbuild had a bug that incorrectly removed unknown at-rules without any children during minification if the at-rule token matched an at-rule that esbuild can handle. Specifically cssnano can generate@layerrules with parsing errors, and empty@layerrules cannot be removed because they have side effects (@layerdidn't exist when esbuild's CSS support was added, so esbuild wasn't written to handle this). This release changes esbuild to no longer discard@layerrules with parsing errors when minifying (the rule@layer chas a parsing error):Unterminated strings in CSS are no longer an error
The CSS specification provides rules for handling parsing errors. One of those rules is that user agents must close strings upon reaching the end of a line (i.e., before an unescaped line feed, carriage return or form feed character), but then drop the construct (declaration or rule) in which the string was found. For example:
...would be treated the same as:
...because the second declaration (from
font-familyto the semicolon aftercolor: red) is invalid and is dropped.Previously using this CSS with esbuild failed to build due to a syntax error, even though the code can be interpreted by a browser. With this release, the code now produces a warning instead of an error, and esbuild prints the invalid CSS such that it stays invalid in the output:
Configuration
📅 Schedule: Branch creation - "after 01:00 on sunday" (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.