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

chore(deps-dev): bump esbuild from 0.14.42 to 0.14.43 #258

Merged
merged 1 commit into from
Jun 9, 2022

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jun 8, 2022

Bumps esbuild from 0.14.42 to 0.14.43.

Release notes

Sourced from esbuild's releases.

v0.14.43

  • 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 /* @__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
    /* @__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":

... (truncated)

Changelog

Sourced from esbuild's changelog.

0.14.43

  • 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 /* @__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
    /* @__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) {

... (truncated)

Commits
  • d8bd9c5 publish 0.14.43 to npm
  • 2e2b712 fix #2285: copy license into esbuild/esbuild-wasm
  • 43b8e15 fix #2306: split << when used in type arguments
  • 8af93a9 fix typo in js_parser_lower.go (#2293)
  • 8c83fdf fix #2231: log about indirect require usage
  • eda0e02 fix tests: add message ids (non-linux messages)
  • 4296945 fix tests: add message ids
  • e03d473 logger: print the message identifier with warnings
  • 861eb63 "AddMsgID" helper function
  • 588b6e4 add "--log-override" to CLI "--help"
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [esbuild](https://github.com/evanw/esbuild) from 0.14.42 to 0.14.43.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](evanw/esbuild@v0.14.42...v0.14.43)

---
updated-dependencies:
- dependency-name: esbuild
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Jun 8, 2022
@roberthgnz roberthgnz merged commit 2cadeb7 into master Jun 9, 2022
@roberthgnz roberthgnz deleted the dependabot/npm_and_yarn/esbuild-0.14.43 branch June 9, 2022 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant