chore(deps): update dependency esbuild to v0.14.43 #2033

Merged
konrad merged 1 commits from renovate/esbuild-0.x into main 2022-06-08 05:08:23 +00:00
Member

This PR contains the following updates:

Package Type Update Change
esbuild devDependencies patch 0.14.42 -> 0.14.43

Release Notes

evanw/esbuild

v0.14.43

Compare Source

  • Fix TypeScript parse error whe a generic function is the first type argument (#​2306)

    In TypeScript, the << token may need to be split apart into two < tokens if it's present in a type argument context. This was already correctly handled for all type expressions and for identifier expressions such as in the following code:

    // These cases already worked in the previous release
    let foo: Array<<T>() => T>;
    bar<<T>() => T>;
    

    However, normal expressions of the following form were previously incorrectly treated as syntax errors:

    // These cases were broken but have now been fixed
    foo.bar<<T>() => T>;
    foo?.<<T>() => T>();
    

    With this release, these cases now parsed correctly.

  • Fix minification regression with pure IIFEs (#​2279)

    An Immediately Invoked Function Expression (IIFE) is a function call to an anonymous function, and is a way of introducing a new function-level scope in JavaScript since JavaScript lacks a way to do this otherwise. And a pure function call is a function call with the special /* @&#8203;__PURE__ */ comment before it, which tells JavaScript build tools that the function call can be considered to have no side effects (and can be removed if it's unused).

    Version 0.14.9 of esbuild introduced a regression that changed esbuild's behavior when these two features were combined. If the IIFE body contains a single expression, the resulting output still contained that expression instead of being empty. This is a minor regression because you normally wouldn't write code like this, so this shouldn't come up in practice, and it doesn't cause any correctness issues (just larger-than-necessary output). It's unusual that you would tell esbuild "remove this if the result is unused" and then not store the result anywhere, since the result is unused by construction. But regardless, the issue has now been fixed.

    For example, the following code is a pure IIFE, which means it should be completely removed when minification is enabled. Previously it was replaced by the contents of the IIFE but it's now completely removed:

    // Original code
    /* @&#8203;__PURE__ */ (() => console.log(1))()
    
    // Old output (with --minify)
    console.log(1);
    
    // New output (with --minify)
    
  • Add log messages for indirect require references (#​2231)

    A long time ago esbuild used to warn about indirect uses of require because they break esbuild's ability to analyze the dependencies of the code and cause dependencies to not be bundled, resulting in a potentially broken bundle. However, this warning was removed because many people wanted the warning to be removed. Some packages have code that uses require like this but on a code path that isn't used at run-time, so their code still happens to work even though the bundle is incomplete. For example, the following code will not bundle bindings:

    // Prevent React Native packager from seeing modules required with this
    const nodeRequire = require;
    
    function getRealmConstructor(environment) {
      switch (environment) {
        case "node.js":
        case "electron":
          return nodeRequire("bindings")("realm.node").Realm;
      }
    }
    

    Version 0.11.11 of esbuild removed this warning, which means people no longer have a way to know at compile time whether their bundle is broken in this way. Now that esbuild has custom log message levels, this warning can be added back in a way that should make both people happy. With this release, there is now a log message for this that defaults to the debug log level, which normally isn't visible. You can either do --log-override:indirect-require=warning to make this log message a warning (and therefore visible) or use --log-level=debug to see this and all other debug log messages.


Configuration

📅 Schedule: 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.


  • If you want to rebase/retry this PR, click this checkbox.

This PR has been generated by Renovate Bot.

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [esbuild](https://github.com/evanw/esbuild) | devDependencies | patch | [`0.14.42` -> `0.14.43`](https://renovatebot.com/diffs/npm/esbuild/0.14.42/0.14.43) | --- ### Release Notes <details> <summary>evanw/esbuild</summary> ### [`v0.14.43`](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md#&#8203;01443) [Compare Source](https://github.com/evanw/esbuild/compare/v0.14.42...v0.14.43) - Fix TypeScript parse error whe a generic function is the first type argument ([#&#8203;2306](https://github.com/evanw/esbuild/issues/2306)) In TypeScript, the `<<` token may need to be split apart into two `<` tokens if it's present in a type argument context. This was already correctly handled for all type expressions and for identifier expressions such as in the following code: ```ts // These cases already worked in the previous release let foo: Array<<T>() => T>; bar<<T>() => T>; ``` However, normal expressions of the following form were previously incorrectly treated as syntax errors: ```ts // These cases were broken but have now been fixed foo.bar<<T>() => T>; foo?.<<T>() => T>(); ``` With this release, these cases now parsed correctly. - Fix minification regression with pure IIFEs ([#&#8203;2279](https://github.com/evanw/esbuild/issues/2279)) An Immediately Invoked Function Expression (IIFE) is a function call to an anonymous function, and is a way of introducing a new function-level scope in JavaScript since JavaScript lacks a way to do this otherwise. And a pure function call is a function call with the special `/* @&#8203;__PURE__ */` comment before it, which tells JavaScript build tools that the function call can be considered to have no side effects (and can be removed if it's unused). Version 0.14.9 of esbuild introduced a regression that changed esbuild's behavior when these two features were combined. If the IIFE body contains a single expression, the resulting output still contained that expression instead of being empty. This is a minor regression because you normally wouldn't write code like this, so this shouldn't come up in practice, and it doesn't cause any correctness issues (just larger-than-necessary output). It's unusual that you would tell esbuild "remove this if the result is unused" and then not store the result anywhere, since the result is unused by construction. But regardless, the issue has now been fixed. For example, the following code is a pure IIFE, which means it should be completely removed when minification is enabled. Previously it was replaced by the contents of the IIFE but it's now completely removed: ```js // Original code /* @&#8203;__PURE__ */ (() => console.log(1))() // Old output (with --minify) console.log(1); // New output (with --minify) ``` - Add log messages for indirect `require` references ([#&#8203;2231](https://github.com/evanw/esbuild/issues/2231)) A long time ago esbuild used to warn about indirect uses of `require` because they break esbuild's ability to analyze the dependencies of the code and cause dependencies to not be bundled, resulting in a potentially broken bundle. However, this warning was removed because many people wanted the warning to be removed. Some packages have code that uses `require` like this but on a code path that isn't used at run-time, so their code still happens to work even though the bundle is incomplete. For example, the following code will *not* bundle `bindings`: ```js // Prevent React Native packager from seeing modules required with this const nodeRequire = require; function getRealmConstructor(environment) { switch (environment) { case "node.js": case "electron": return nodeRequire("bindings")("realm.node").Realm; } } ``` Version 0.11.11 of esbuild removed this warning, which means people no longer have a way to know at compile time whether their bundle is broken in this way. Now that esbuild has custom log message levels, this warning can be added back in a way that should make both people happy. With this release, there is now a log message for this that defaults to the `debug` log level, which normally isn't visible. You can either do `--log-override:indirect-require=warning` to make this log message a warning (and therefore visible) or use `--log-level=debug` to see this and all other `debug` log messages. </details> --- ### Configuration 📅 **Schedule**: 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. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
renovate added the
dependencies
label 2022-06-08 03:02:40 +00:00
renovate added 1 commit 2022-06-08 03:02:40 +00:00
continuous-integration/drone/pr Build is passing Details
e1af939bd7
chore(deps): update dependency esbuild to v0.14.43
Member

Hi renovate!

Thank you for creating a PR!

I've deployed the changes of this PR on a preview environment under this URL: https://2033-renovate-esbuild-0-x--vikunja-frontend-preview.netlify.app

You can use this url to view the changes live and test them out.
You will need to manually connect this to an api running somehwere. The easiest to use is https://try.vikunja.io/.

Have a nice day!

Beep boop, I'm a bot.

Hi renovate! Thank you for creating a PR! I've deployed the changes of this PR on a preview environment under this URL: https://2033-renovate-esbuild-0-x--vikunja-frontend-preview.netlify.app You can use this url to view the changes live and test them out. You will need to manually connect this to an api running somehwere. The easiest to use is https://try.vikunja.io/. Have a nice day! > Beep boop, I'm a bot.
konrad merged commit b7ca56d2b7 into main 2022-06-08 05:08:23 +00:00
konrad deleted branch renovate/esbuild-0.x 2022-06-08 05:08:23 +00:00
This repo is archived. You cannot comment on pull requests.
No description provided.