[Snyk] Upgrade esbuild from 0.14.38 to 0.14.39 #255
Merged
+169
−169
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 was automatically created by Snyk using the credentials of a real user.
Snyk has created this PR to upgrade esbuild from 0.14.38 to 0.14.39.
ℹ️ 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
Fix code generation for
export default
and/* @ __PURE__ */
call (#2203)The
/* @ __PURE__ */
comment annotation can be added to function calls to indicate that they are side-effect free. These annotations are passed through into the output by esbuild since many JavaScript tools understand them. However, there was an edge case where printing this comment before a function call caused esbuild to fail to parenthesize a function literal because it thought it was no longer at the start of the expression. This problem has been fixed:export default / @ PURE */ (function() {
})()
// Old output
export default /* @ PURE */ function() {
}();
// New output
export default /* @ PURE */ (function() {
})();
Preserve
...
before JSX child expressions (#2245)TypeScript 4.5 changed how JSX child expressions that start with
...
are emitted. Previously the...
was omitted but starting with TypeScript 4.5, the...
is now preserved instead. This release updates esbuild to match TypeScript's new output in this case:console.log(<a>{...b}</a>)
// Old output
console.log(/* @ PURE */ React.createElement("a", null, b));
// New output
console.log(/* @ PURE */ React.createElement("a", null, ...b));
Note that this behavior is TypeScript-specific. Babel doesn't support the
...
token at all (it gives the error "Spread children are not supported in React").Slightly adjust esbuild's handling of the
browser
field inpackage.json
(#2239)This release changes esbuild's interpretation of
browser
path remapping to fix a regression that was introduced in esbuild version 0.14.21. Browserify has a bug where it incorrectly matches package paths to relative paths in thebrowser
field, and esbuild replicates this bug for compatibility with Browserify. I have a set of tests that I use to verify that esbuild's replication of this Browserify is accurate here: https://github.com/evanw/package-json-browser-tests. However, I was missing a test case and esbuild's behavior diverges from Browserify in this case. This release now handles this edge case as well:entry.js
:node_modules/pkg/package.json
:node_modules/pkg/sub/foo.js
:node_modules/sub/index.js
:The import path
sub
inrequire('sub')
was previously matching the remapping"./sub/sub.js": "./sub/foo.js"
but with this release it should now no longer match that remapping. Nowrequire('sub')
will only match the remapping"./sub/sub": "./sub/foo.js"
(without the trailing.js
). Browserify apparently only matches without the.js
suffix here.Further fixes to TypeScript 4.7 instantiation expression parsing (#2201)
This release fixes some additional edge cases with parsing instantiation expressions from the upcoming version 4.7 of TypeScript. Previously it was allowed for an instantiation expression to precede a binary operator but with this release, that's no longer allowed. This was sometimes valid in the TypeScript 4.7 beta but is no longer allowed in the latest version of TypeScript 4.7. Fixing this also fixed a regression that was introduced by the previous release of esbuild:
a<b> == c<d>
a == c
a == c
a == c
a<b> in c<d>
a in c
a<b>>=c<d>
a >= c
a<b>=c<d>
a < b >= c
a = c
a < b >= c
a = c
a = c
a<b>>c<d>
a < b >> c
a < b >> c
a < b >> c
a < b >> c
a > c
a < b >> c
This table illustrates some of the more significant changes between all of these parsers. The most important part is that esbuild 0.14.38 now matches the behavior of the latest TypeScript compiler for all of these cases.
Commit messages
Package name: esbuild
Compare
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