chore(deps): update dependency esbuild to v0.16.5 #2846

Merged
konrad merged 1 commits from renovate/esbuild-0.x into main 2022-12-13 18:15:36 +00:00
Member

This PR contains the following updates:

Package Type Update Change
esbuild devDependencies patch 0.16.4 -> 0.16.5

Release Notes

evanw/esbuild

v0.16.5

Compare Source

  • Make it easy to exclude all packages from a bundle (#​1958, #​1975, #​2164, #​2246, #​2542)

    When bundling for node, it's often necessary to exclude npm packages from the bundle since they weren't designed with esbuild bundling in mind and don't work correctly after being bundled. For example, they may use __dirname and run-time file system calls to load files, which doesn't work after bundling with esbuild. Or they may compile a native .node extension that has similar expectations about the layout of the file system that are no longer true after bundling (even if the .node extension is copied next to the bundle).

    The way to get this to work with esbuild is to use the --external: flag. For example, the fsevents package contains a native .node extension and shouldn't be bundled. To bundle code that uses it, you can pass --external:fsevents to esbuild to exclude it from your bundle. You will then need to ensure that the fsevents package is still present when you run your bundle (e.g. by publishing your bundle to npm as a package with a dependency on fsevents).

    It was possible to automatically do this for all of your dependencies, but it was inconvenient. You had to write some code that read your package.json file and passed the keys of the dependencies, devDependencies, peerDependencies, and/or optionalDependencies maps to esbuild as external packages (either that or write a plugin to mark all package paths as external). Previously esbuild's recommendation for making this easier was to do --external:./node_modules/* (added in version 0.14.13). However, this was a bad idea because it caused compatibility problems with many node packages as it caused esbuild to mark the post-resolve path as external instead of the pre-resolve path. Doing that could break packages that are published as both CommonJS and ESM if esbuild's bundler is also used to do a module format conversion.

    With this release, you can now do the following to automatically exclude all packages from your bundle:

    • CLI:

      esbuild --bundle --packages=external
      
    • JS:

      esbuild.build({
        bundle: true,
        packages: 'external',
      })
      
    • Go:

      api.Build(api.BuildOptions{
        Bundle:   true,
        Packages: api.PackagesExternal,
      })
      

    Doing --external:./node_modules/* is still possible and still has the same behavior, but is no longer recommended. I recommend that you use the new packages feature instead.

  • Fix some subtle bugs with tagged template literals

    This release fixes a bug where minification could incorrectly change the value of this within tagged template literal function calls:

    // Original code
    function f(x) {
      let z = y.z
      return z``
    }
    
    // Old output (with --minify)
    function f(n){return y.z``}
    
    // New output (with --minify)
    function f(n){return(0,y.z)``}
    

    This release also fixes a bug where using optional chaining with --target=es2019 or earlier could incorrectly change the value of this within tagged template literal function calls:

    // Original code
    var obj = {
      foo: function() {
        console.log(this === obj);
      }
    };
    (obj?.foo)``;
    
    // Old output (with --target=es6)
    var obj = {
      foo: function() {
        console.log(this === obj);
      }
    };
    (obj == null ? void 0 : obj.foo)``;
    
    // New output (with --target=es6)
    var __freeze = Object.freeze;
    var __defProp = Object.defineProperty;
    var __template = (cooked, raw) => __freeze(__defProp(cooked, "raw", { value: __freeze(raw || cooked.slice()) }));
    var _a;
    var obj = {
      foo: function() {
        console.log(this === obj);
      }
    };
    (obj == null ? void 0 : obj.foo).call(obj, _a || (_a = __template([""])));
    
  • Some slight minification improvements

    The following minification improvements were implemented:

    • if (~a !== 0) throw x; => if (~a) throw x;
    • if ((a | b) !== 0) throw x; => if (a | b) throw x;
    • if ((a & b) !== 0) throw x; => if (a & b) throw x;
    • if ((a ^ b) !== 0) throw x; => if (a ^ b) throw x;
    • if ((a << b) !== 0) throw x; => if (a << b) throw x;
    • if ((a >> b) !== 0) throw x; => if (a >> b) throw x;
    • if ((a >>> b) !== 0) throw x; => if (a >>> b) throw x;
    • if (!!a || !!b) throw x; => if (a || b) throw x;
    • if (!!a && !!b) throw x; => if (a && b) throw x;
    • if (a ? !!b : !!c) throw x; => if (a ? b : c) throw x;

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

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.16.4` -> `0.16.5`](https://renovatebot.com/diffs/npm/esbuild/0.16.4/0.16.5) | --- ### Release Notes <details> <summary>evanw/esbuild</summary> ### [`v0.16.5`](https://github.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#&#8203;0165) [Compare Source](https://github.com/evanw/esbuild/compare/v0.16.4...v0.16.5) - Make it easy to exclude all packages from a bundle ([#&#8203;1958](https://github.com/evanw/esbuild/issues/1958), [#&#8203;1975](https://github.com/evanw/esbuild/issues/1975), [#&#8203;2164](https://github.com/evanw/esbuild/issues/2164), [#&#8203;2246](https://github.com/evanw/esbuild/issues/2246), [#&#8203;2542](https://github.com/evanw/esbuild/issues/2542)) When bundling for node, it's often necessary to exclude npm packages from the bundle since they weren't designed with esbuild bundling in mind and don't work correctly after being bundled. For example, they may use `__dirname` and run-time file system calls to load files, which doesn't work after bundling with esbuild. Or they may compile a native `.node` extension that has similar expectations about the layout of the file system that are no longer true after bundling (even if the `.node` extension is copied next to the bundle). The way to get this to work with esbuild is to use the `--external:` flag. For example, the [`fsevents`](https://www.npmjs.com/package/fsevents) package contains a native `.node` extension and shouldn't be bundled. To bundle code that uses it, you can pass `--external:fsevents` to esbuild to exclude it from your bundle. You will then need to ensure that the `fsevents` package is still present when you run your bundle (e.g. by publishing your bundle to npm as a package with a dependency on `fsevents`). It was possible to automatically do this for all of your dependencies, but it was inconvenient. You had to write some code that read your `package.json` file and passed the keys of the `dependencies`, `devDependencies`, `peerDependencies`, and/or `optionalDependencies` maps to esbuild as external packages (either that or write a plugin to mark all package paths as external). Previously esbuild's recommendation for making this easier was to do `--external:./node_modules/*` (added in version 0.14.13). However, this was a bad idea because it caused compatibility problems with many node packages as it caused esbuild to mark the post-resolve path as external instead of the pre-resolve path. Doing that could break packages that are published as both CommonJS and ESM if esbuild's bundler is also used to do a module format conversion. With this release, you can now do the following to automatically exclude all packages from your bundle: - CLI: esbuild --bundle --packages=external - JS: ```js esbuild.build({ bundle: true, packages: 'external', }) ``` - Go: ```go api.Build(api.BuildOptions{ Bundle: true, Packages: api.PackagesExternal, }) ``` Doing `--external:./node_modules/*` is still possible and still has the same behavior, but is no longer recommended. I recommend that you use the new `packages` feature instead. - Fix some subtle bugs with tagged template literals This release fixes a bug where minification could incorrectly change the value of `this` within tagged template literal function calls: ```js // Original code function f(x) { let z = y.z return z`` } // Old output (with --minify) function f(n){return y.z``} // New output (with --minify) function f(n){return(0,y.z)``} ``` This release also fixes a bug where using optional chaining with `--target=es2019` or earlier could incorrectly change the value of `this` within tagged template literal function calls: ```js // Original code var obj = { foo: function() { console.log(this === obj); } }; (obj?.foo)``; // Old output (with --target=es6) var obj = { foo: function() { console.log(this === obj); } }; (obj == null ? void 0 : obj.foo)``; // New output (with --target=es6) var __freeze = Object.freeze; var __defProp = Object.defineProperty; var __template = (cooked, raw) => __freeze(__defProp(cooked, "raw", { value: __freeze(raw || cooked.slice()) })); var _a; var obj = { foo: function() { console.log(this === obj); } }; (obj == null ? void 0 : obj.foo).call(obj, _a || (_a = __template([""]))); ``` - Some slight minification improvements The following minification improvements were implemented: - `if (~a !== 0) throw x;` => `if (~a) throw x;` - `if ((a | b) !== 0) throw x;` => `if (a | b) throw x;` - `if ((a & b) !== 0) throw x;` => `if (a & b) throw x;` - `if ((a ^ b) !== 0) throw x;` => `if (a ^ b) throw x;` - `if ((a << b) !== 0) throw x;` => `if (a << b) throw x;` - `if ((a >> b) !== 0) throw x;` => `if (a >> b) throw x;` - `if ((a >>> b) !== 0) throw x;` => `if (a >>> b) throw x;` - `if (!!a || !!b) throw x;` => `if (a || b) throw x;` - `if (!!a && !!b) throw x;` => `if (a && b) throw x;` - `if (a ? !!b : !!c) throw x;` => `if (a ? b : c) throw x;` </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **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-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4yNDAuMiIsInVwZGF0ZWRJblZlciI6IjMyLjI0MC4yIn0=-->
renovate added the
dependencies
label 2022-12-13 18:05:29 +00:00
renovate added 1 commit 2022-12-13 18:05:30 +00:00
continuous-integration/drone/pr Build is passing Details
55d80bf969
chore(deps): update dependency esbuild to v0.16.5
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://2846-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://2846-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 scheduled this pull request to auto merge when all checks succeed 2022-12-13 18:10:58 +00:00
konrad merged commit c6eb72bdeb into main 2022-12-13 18:15:36 +00:00
This repo is archived. You cannot comment on pull requests.
No description provided.