chore(deps): update dependency esbuild to v0.14.18 #1480

Merged
konrad merged 1 commits from renovate/esbuild-0.x into main 2022-02-02 20:11:05 +00:00
Member

This PR contains the following updates:

Package Type Update Change
esbuild devDependencies patch 0.14.17 -> 0.14.18

Release Notes

evanw/esbuild

v0.14.18

Compare Source

  • Add the --mangle-cache= feature (#​1977)

    This release adds a cache API for the newly-released --mangle-props= feature. When enabled, all mangled property renamings are recorded in the cache during the initial build. Subsequent builds reuse the renamings stored in the cache and add additional renamings for any newly-added properties. This has a few consequences:

    • You can customize what mangled properties are renamed to by editing the cache before passing it to esbuild (the cache is a map of the original name to the mangled name).

    • The cache serves as a list of all properties that were mangled. You can easily scan it to see if there are any unexpected property renamings.

    • You can disable mangling for individual properties by setting the renamed value to false instead of to a string. This is similar to the --reserve-props= setting but on a per-property basis.

    • You can ensure consistent renaming between builds (e.g. a main-thread file and a web worker, or a library and a plugin). Without this feature, each build would do an independent renaming operation and the mangled property names likely wouldn't be consistent.

    Here's how to use it:

    • CLI

      $ esbuild example.ts --mangle-props=_$ --mangle-cache=cache.json
      
    • JS API

      let result = await esbuild.build({
        entryPoints: ['example.ts'],
        mangleProps: /_$/,
        mangleCache: {
          customRenaming_: '__c',
          disabledRenaming_: false,
        },
      })
      let updatedMangleCache = result.mangleCache
      
    • Go API

      result := api.Build(api.BuildOptions{
        EntryPoints: []string{"example.ts"},
        MangleProps: "_$",
        MangleCache: map[string]interface{}{
          "customRenaming_":   "__c",
          "disabledRenaming_": false,
        },
      })
      updatedMangleCache := result.MangleCache
      

    The above code would do something like the following:

    // Original code
    x = {
      customRenaming_: 1,
      disabledRenaming_: 2,
      otherProp_: 3,
    }
    
    // Generated code
    x = {
      __c: 1,
      disabledRenaming_: 2,
      a: 3
    };
    
    // Updated mangle cache
    {
      "customRenaming_": "__c",
      "disabledRenaming_": false,
      "otherProp_": "a"
    }
    
  • Add opera and ie as possible target environments

    You can now target Opera and/or Internet Explorer using the --target= setting. For example, --target=opera45,ie9 targets Opera 45 and Internet Explorer 9. This change does not add any additional features to esbuild's code transformation pipeline to transform newer syntax so that it works in Internet Explorer. It just adds information about what features are supported in these browsers to esbuild's internal feature compatibility table.

  • Minify typeof x !== 'undefined' to typeof x < 'u'

    This release introduces a small improvement for code that does a lot of typeof checks against undefined:

    // Original code
    y = typeof x !== 'undefined';
    
    // Old output (with --minify)
    y=typeof x!="undefined";
    
    // New output (with --minify)
    y=typeof x<"u";
    

    This transformation is only active when minification is enabled, and is disabled if the language target is set lower than ES2020 or if Internet Explorer is set as a target environment. Before ES2020, implementations were allowed to return non-standard values from the typeof operator for a few objects. Internet Explorer took advantage of this to sometimes return the string 'unknown' instead of 'undefined'. But this has been removed from the specification and Internet Explorer was the only engine to do this, so this minification is valid for code that does not need to target Internet Explorer.


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, check this box.

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.17` -> `0.14.18`](https://renovatebot.com/diffs/npm/esbuild/0.14.17/0.14.18) | --- ### Release Notes <details> <summary>evanw/esbuild</summary> ### [`v0.14.18`](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md#&#8203;01418) [Compare Source](https://github.com/evanw/esbuild/compare/v0.14.17...v0.14.18) - Add the `--mangle-cache=` feature ([#&#8203;1977](https://github.com/evanw/esbuild/issues/1977)) This release adds a cache API for the newly-released `--mangle-props=` feature. When enabled, all mangled property renamings are recorded in the cache during the initial build. Subsequent builds reuse the renamings stored in the cache and add additional renamings for any newly-added properties. This has a few consequences: - You can customize what mangled properties are renamed to by editing the cache before passing it to esbuild (the cache is a map of the original name to the mangled name). - The cache serves as a list of all properties that were mangled. You can easily scan it to see if there are any unexpected property renamings. - You can disable mangling for individual properties by setting the renamed value to `false` instead of to a string. This is similar to the `--reserve-props=` setting but on a per-property basis. - You can ensure consistent renaming between builds (e.g. a main-thread file and a web worker, or a library and a plugin). Without this feature, each build would do an independent renaming operation and the mangled property names likely wouldn't be consistent. Here's how to use it: - CLI ```sh $ esbuild example.ts --mangle-props=_$ --mangle-cache=cache.json ``` - JS API ```js let result = await esbuild.build({ entryPoints: ['example.ts'], mangleProps: /_$/, mangleCache: { customRenaming_: '__c', disabledRenaming_: false, }, }) let updatedMangleCache = result.mangleCache ``` - Go API ```go result := api.Build(api.BuildOptions{ EntryPoints: []string{"example.ts"}, MangleProps: "_$", MangleCache: map[string]interface{}{ "customRenaming_": "__c", "disabledRenaming_": false, }, }) updatedMangleCache := result.MangleCache ``` The above code would do something like the following: ```js // Original code x = { customRenaming_: 1, disabledRenaming_: 2, otherProp_: 3, } // Generated code x = { __c: 1, disabledRenaming_: 2, a: 3 }; // Updated mangle cache { "customRenaming_": "__c", "disabledRenaming_": false, "otherProp_": "a" } ``` - Add `opera` and `ie` as possible target environments You can now target [Opera](https://www.opera.com/) and/or [Internet Explorer](https://www.microsoft.com/en-us/download/internet-explorer.aspx) using the `--target=` setting. For example, `--target=opera45,ie9` targets Opera 45 and Internet Explorer 9. This change does not add any additional features to esbuild's code transformation pipeline to transform newer syntax so that it works in Internet Explorer. It just adds information about what features are supported in these browsers to esbuild's internal feature compatibility table. - Minify `typeof x !== 'undefined'` to `typeof x < 'u'` This release introduces a small improvement for code that does a lot of `typeof` checks against `undefined`: ```js // Original code y = typeof x !== 'undefined'; // Old output (with --minify) y=typeof x!="undefined"; // New output (with --minify) y=typeof x<"u"; ``` This transformation is only active when minification is enabled, and is disabled if the language target is set lower than ES2020 or if Internet Explorer is set as a target environment. Before ES2020, implementations were allowed to return non-standard values from the `typeof` operator for a few objects. Internet Explorer took advantage of this to sometimes return the string `'unknown'` instead of `'undefined'`. But this has been removed from the specification and Internet Explorer was the only engine to do this, so this minification is valid for code that does not need to target Internet Explorer. </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, check this box. --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
renovate added the
dependencies
label 2022-02-02 20:02:49 +00:00
renovate added 1 commit 2022-02-02 20:02:50 +00:00
continuous-integration/drone/pr Build is passing Details
42204207e0
chore(deps): update dependency esbuild to v0.14.18
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://1480-renovateesbuild-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://1480-renovateesbuild-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 39094ec968 into main 2022-02-02 20:11:05 +00:00
konrad deleted branch renovate/esbuild-0.x 2022-02-02 20:11:05 +00:00
This repo is archived. You cannot comment on pull requests.
No description provided.