Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Snyk] Upgrade esbuild from 0.14.38 to 0.14.39 #255

Merged
merged 1 commit into from
Jun 8, 2022

Conversation

ytetsuro
Copy link
Owner

@ytetsuro ytetsuro commented Jun 3, 2022

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.

merge advice
ℹ️ 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.


  • The recommended version is 1 version ahead of your current version.
  • The recommended version was released 22 days ago, on 2022-05-11.
Release notes
Package name: esbuild
  • 0.14.39 - 2022-05-11
    • 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:

      // Original code
      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:

      // Original code
      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 in package.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 the browser 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:

        require('pkg/sub')
      • node_modules/pkg/package.json:

        {
          "browser": {
            "./sub": "./sub/foo.js",
            "./sub/sub.js": "./sub/foo.js"
          }
        }
      • node_modules/pkg/sub/foo.js:

        require('sub')
      • node_modules/sub/index.js:

        console.log('works')

      The import path sub in require('sub') was previously matching the remapping "./sub/sub.js": "./sub/foo.js" but with this release it should now no longer match that remapping. Now require('sub') will only match the remapping "./sub/sub": "./sub/foo.js" (without the trailing .js). Browserify apparently only matches without the .js suffix here.

  • 0.14.38 - 2022-04-21
    • 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:

      Code TS 4.6.3 TS 4.7.0 beta TS 4.7.0 nightly esbuild 0.14.36 esbuild 0.14.37 esbuild 0.14.38
      a<b> == c<d> Invalid a == c Invalid a == c a == c Invalid
      a<b> in c<d> Invalid Invalid Invalid Invalid a in c Invalid
      a<b>>=c<d> Invalid Invalid Invalid Invalid a >= c Invalid
      a<b>=c<d> Invalid 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.

from esbuild GitHub release notes
Commit messages
Package name: esbuild
  • 7abb7d8 publish 0.14.39 to npm
  • 5082f3e run "make compat-table"
  • bb7a0a1 fix #2239: more closely replicate a browserify bug
  • 7e2d75c fix #2245: preserve `...` before JSX children
  • 1bd0094 attempt to fix pnpm in end-to-end checks
  • e876856 fix #2203: `export default` of `/* @ __PURE__ */`
  • e9728a6 readme: use new light/dark mode feature
  • fc1862d update to go 1.18.1

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

@ytetsuro ytetsuro merged commit 475e417 into master Jun 8, 2022
@ytetsuro ytetsuro deleted the snyk-upgrade-ac9665ca9b0fd6d94ffc40a2a7cd782c branch June 8, 2022 14:28
@github-actions
Copy link

🎉 This PR is included in version 0.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants