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

Update dependency esbuild to v0.14.18 #4347

Merged
merged 2 commits into from
Feb 2, 2022
Merged

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Feb 2, 2022

WhiteSource Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
esbuild 0.14.17 -> 0.14.18 age adoption passing confidence

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: 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 WhiteSource Renovate. View repository job log here.

@renovate renovate bot added the release:chore This PR is a chore (means nothing for users) label Feb 2, 2022
@thedavidprice thedavidprice merged commit 7e645bc into main Feb 2, 2022
@thedavidprice thedavidprice deleted the renovate/esbuild-0.x branch February 2, 2022 21:12
@jtoar jtoar added this to the next-release milestone Feb 2, 2022
@thedavidprice thedavidprice modified the milestones: next-release, v0.44.0 Feb 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:chore This PR is a chore (means nothing for users)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants