[Snyk] Upgrade esbuild from 0.16.17 to 0.17.16#1
Merged
leonardoadame merged 1 commit intomasterfrom Aug 8, 2023
Merged
Conversation
Snyk has created this PR to upgrade esbuild from 0.16.17 to 0.17.16. See this package in npm: https://www.npmjs.com/package/esbuild See this project in Snyk: https://app.snyk.io/org/leonardoadame/project/2155bc85-08fa-4630-b20d-c70d6dede6d3?utm_source=github&utm_medium=referral&page=upgrade-pr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Snyk has created this PR to upgrade esbuild from 0.16.17 to 0.17.16.
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
Release notes
Package name: esbuild
-
0.17.16 - 2023-04-10
-
/ Original input */
-
-
0.17.15 - 2023-04-01
-
-
// Original input
-
// Original input
-
-
0.17.14 - 2023-03-26
-
-
/ Original input */
/ Original input */
-
/ Original input */
-
/ Original input */
-
0.17.13 - 2023-03-24
-
0.17.12 - 2023-03-17
-
-
0.17.11 - 2023-03-03
-
0.17.10 - 2023-02-20
-
0.17.9 - 2023-02-19
-
0.17.8 - 2023-02-13
-
0.17.7 - 2023-02-09
-
0.17.6 - 2023-02-06
-
0.17.5 - 2023-01-27
-
0.17.4 - 2023-01-22
-
0.17.3 - 2023-01-18
-
0.17.2 - 2023-01-17
-
0.17.1 - 2023-01-16
-
0.17.0 - 2023-01-14
-
0.16.17 - 2023-01-11
from esbuild GitHub release notesFix CSS nesting transform for triple-nested rules that start with a combinator (#3046)
This release fixes a bug with esbuild where triple-nested CSS rules that start with a combinator were not transformed correctly for older browsers. Here's an example of such a case before and after this bug fix:
.a {
color: red;
> .b {
color: green;
> .c {
color: blue;
}
}
}
/* Old output (with --target=chrome90) */
.a {
color: red;
}
.a > .b {
color: green;
}
.a .b > .c {
color: blue;
}
/* New output (with --target=chrome90) */
.a {
color: red;
}
.a > .b {
color: green;
}
.a > .b > .c {
color: blue;
}
Support
--injectwith a file loaded using thecopyloader (#3041)This release now allows you to use
--injectwith a file that is loaded using thecopyloader. Thecopyloader copies the imported file to the output directory verbatim and rewrites the path in theimportstatement to point to the copied output file. When used with--inject, this means the injected file will be copied to the output directory as-is and a bareimportstatement for that file will be inserted in any non-copy output files that esbuild generates.Note that since esbuild doesn't parse the contents of copied files, esbuild will not expose any of the export names as usable imports when you do this (in the way that esbuild's
--injectfeature is typically used). However, any side-effects that the injected file has will still occur.Allow keywords as type parameter names in mapped types (#3033)
TypeScript allows type keywords to be used as parameter names in mapped types. Previously esbuild incorrectly treated this as an error. Code that does this is now supported:
Add annotations for re-exported modules in node (#2486, #3029)
Node lets you import named imports from a CommonJS module using ESM import syntax. However, the allowed names aren't derived from the properties of the CommonJS module. Instead they are derived from an arbitrary syntax-only analysis of the CommonJS module's JavaScript AST.
To accommodate node doing this, esbuild's ESM-to-CommonJS conversion adds a special non-executable "annotation" for node that describes the exports that node should expose in this scenario. It takes the form
0 && (module.exports = { ... })and comes at the end of the file (0 && exprmeansexpris never evaluated).Previously esbuild didn't do this for modules re-exported using the
export * fromsyntax. Annotations for these re-exports will now be added starting with this release:export { foo } from './foo'
export * from './bar'
// Old output (with --format=cjs --platform=node)
...
0 && (module.exports = {
foo
});
// New output (with --format=cjs --platform=node)
...
0 && (module.exports = {
foo,
...require("./bar")
});
Note that you need to specify both
--format=cjsand--platform=nodeto get these node-specific annotations.Avoid printing an unnecessary space in between a number and a
.(#3026)JavaScript typically requires a space in between a number token and a
.token to avoid the.being interpreted as a decimal point instead of a member expression. However, this space is not required if the number token itself contains a decimal point, an exponent, or uses a base other than 10. This release of esbuild now avoids printing the unnecessary space in these cases:foo(1000 .x, 0 .x, 0.1 .x, 0.0001 .x, 0xFFFF_0000_FFFF_0000 .x)
// Old output (with --minify)
foo(1e3 .x,0 .x,.1 .x,1e-4 .x,0xffff0000ffff0000 .x);
// New output (with --minify)
foo(1e3.x,0 .x,.1.x,1e-4.x,0xffff0000ffff0000.x);
Fix server-sent events with live reload when writing to the file system root (#3027)
This release fixes a bug where esbuild previously failed to emit server-sent events for live reload when
outdirwas the file system root, such as/. This happened because/is the only path on Unix that cannot have a trailing slash trimmed from it, which was fixed by improved path handling.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:
a.btn {
color: #333;
&:hover { color: #444 }
&:active { color: #555 }
}
/* New output (with --target=chrome88) */
a.btn {
color: #333;
}
a.btn:hover {
color: #444;
}
a.btn:active {
color: #555;
}
More complex cases may generate the
:is()pseudo-class:div, p {
.warning, .error {
padding: 20px;
}
}
/* New output (with --target=chrome88) */
:is(div, p) :is(.warning, .error) {
padding: 20px;
}
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:
▲ [WARNING] A nested style rule cannot start with "p" because it looks like the start of a declaration [css-syntax-error]
To start a nested style rule with an identifier, you need to wrap the identifier in ":is(...)" to
prevent the rule from being parsed as a declaration.
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:
a {
font-weight: bold;
& {
color: blue;
}
& :hover {
text-decoration: underline;
}
}
/* Old output (with --minify) */
a{font-weight:700;&{color:#00f}& :hover{text-decoration:underline}}
/* New output (with --minify) */
a{font-weight:700;:hover{text-decoration:underline}color:#00f}
Minification now removes duplicates from CSS selector lists
This release introduces the following CSS minification optimization:
div, div { color: red }
/* Old output (with --minify) */
div,div{color:red}
/* New output (with --minify) */
div{color:red}
Read more
Fix a crash when parsing inline TypeScript decorators (#2991)
Previously esbuild's TypeScript parser crashed when parsing TypeScript decorators if the definition of the decorator was inlined into the decorator itself:
This crash was not noticed earlier because this edge case did not have test coverage. The crash is fixed in this release.
Read more
Read more
Read more
Read more
Read more
Commit messages
Package name: esbuild
src/routestosrc/appsveltejs/kit#3021: add support for `const` in object typesCompare
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information:
🧐 View latest project report
🛠 Adjust upgrade PR settings
🔕 Ignore this dependency or unsubscribe from future upgrade PRs