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.18 to 0.14.19 #177

Merged
merged 1 commit into from
Feb 7, 2022

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Feb 7, 2022

Bumps esbuild from 0.14.18 to 0.14.19.

Release notes

Sourced from esbuild's releases.

v0.14.19

  • Special-case const inlining at the top of a scope (#1317, #1981)

    The minifier now inlines const variables (even across modules during bundling) if a certain set of specific requirements are met:

    • All const variables to be inlined are at the top of their scope
    • That scope doesn't contain any import or export statements with paths
    • All constants to be inlined are null, undefined, true, false, an integer, or a short real number
    • Any expression outside of a small list of allowed ones stops constant identification

    Practically speaking this basically means that you can trigger this optimization by just putting the constants you want inlined into a separate file (e.g. constants.js) and bundling everything together.

    These specific conditions are present to avoid esbuild unintentionally causing any behavior changes by inlining constants when the variable reference could potentially be evaluated before being declared. It's possible to identify more cases where constants can be inlined but doing so may require complex call graph analysis so it has not been implemented. Although these specific heuristics may change over time, this general approach to constant inlining should continue to work going forward.

    Here's an example:

    // Original code
    const bold = 1 << 0;
    const italic = 1 << 1;
    const underline = 1 << 2;
    const font = bold | italic | underline;
    console.log(font);
    // Old output (with --minify --bundle)
    (()=>{var o=1<<0,n=1<<1,c=1<<2,t=o|n|c;console.log(t);})();
    // New output (with --minify --bundle)
    (()=>{console.log(7);})();

Changelog

Sourced from esbuild's changelog.

0.14.19

  • Special-case const inlining at the top of a scope (#1317, #1981)

    The minifier now inlines const variables (even across modules during bundling) if a certain set of specific requirements are met:

    • All const variables to be inlined are at the top of their scope
    • That scope doesn't contain any import or export statements with paths
    • All constants to be inlined are null, undefined, true, false, an integer, or a short real number
    • Any expression outside of a small list of allowed ones stops constant identification

    Practically speaking this basically means that you can trigger this optimization by just putting the constants you want inlined into a separate file (e.g. constants.js) and bundling everything together.

    These specific conditions are present to avoid esbuild unintentionally causing any behavior changes by inlining constants when the variable reference could potentially be evaluated before being declared. It's possible to identify more cases where constants can be inlined but doing so may require complex call graph analysis so it has not been implemented. Although these specific heuristics may change over time, this general approach to constant inlining should continue to work going forward.

    Here's an example:

    // Original code
    const bold = 1 << 0;
    const italic = 1 << 1;
    const underline = 1 << 2;
    const font = bold | italic | underline;
    console.log(font);
    // Old output (with --minify --bundle)
    (()=>{var o=1<<0,n=1<<1,c=1<<2,t=o|n|c;console.log(t);})();
    // New output (with --minify --bundle)
    (()=>{console.log(7);})();

Commits
  • 256ab49 publish 0.14.19 to npm
  • f479f62 fix changelog
  • 2e074f9 only minify string.length outside assign targets
  • 06843d4 minify "foo".length into 3
  • ed341b0 omit ts enum name comments when minifying names
  • 51d866a retain more enum information when not folding
  • 4da5b95 pull out utf8/utf6 code from parser
  • 41f420d add some numeric constant folding to the printer
  • e50817b minify enables "~" constant folding
  • 9dfeae7 Fix a mention of "EImportString" from "EImportCall" (#1974)
  • 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.18 to 0.14.19.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](evanw/esbuild@v0.14.18...v0.14.19)

---
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 Feb 7, 2022
@roberthgnz roberthgnz merged commit 67b8975 into master Feb 7, 2022
@roberthgnz roberthgnz deleted the dependabot/npm_and_yarn/esbuild-0.14.19 branch February 7, 2022 12:10
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