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.5 to 0.14.7 #145

Merged
merged 1 commit into from
Dec 22, 2021

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Dec 22, 2021

Bumps esbuild from 0.14.5 to 0.14.7.

Release notes

Sourced from esbuild's releases.

v0.14.7

  • Cross-module inlining of TypeScript enum constants (#128)

    This release adds inlining of TypeScript enum constants across separate modules. It activates when bundling is enabled and when the enum is exported via the export keyword and imported via the import keyword:

    // foo.ts
    export enum Foo { Bar }
    // bar.ts
    import { Foo } from './foo.ts'
    console.log(Foo.Bar)

    The access to Foo.Bar will now be compiled into 0 /* Bar */ even though the enum is defined in a separate file. This inlining was added without adding another pass (which would have introduced a speed penalty) by splitting the code for the inlining between the existing parsing and printing passes. Enum inlining is active whether or not you use enum or const enum because it improves performance.

    To demonstrate the performance improvement, I compared the performance of the TypeScript compiler built by bundling the TypeScript compiler source code with esbuild before and after this change. The speed of the compiler was measured by using it to type check a small TypeScript code base. Here are the results:

    tsc with esbuild 0.14.6 with esbuild 0.14.7
    Time 2.96s 3.45s 2.95s

    As you can see, enum inlining gives around a 15% speedup, which puts the esbuild-bundled version at the same speed as the offical TypeScript compiler build (the tsc column)!

    The specifics of the benchmark aren't important here since it's just a demonstration of how enum inlining can affect performance. But if you're wondering, I type checked the Rollup code base using a work-in-progress branch of the TypeScript compiler that's part of the ongoing effort to convert their use of namespaces into ES modules.

  • Mark node built-in modules as having no side effects (#705)

    This release marks node built-in modules such as fs as being side-effect free. That means unused imports to these modules are now removed when bundling, which sometimes results in slightly smaller code. For example:

    // Original code
    import fs from 'fs';
    import path from 'path';
    console.log(path.delimiter);
    // Old output (with --bundle --minify --platform=node --format=esm)
    import"fs";import o from"path";console.log(o.delimiter);
    // New output (with --bundle --minify --platform=node --format=esm)
    import o from"path";console.log(o.delimiter);

    Note that these modules are only automatically considered side-effect when bundling for node, since they are only known to be side-effect free imports in that environment. However, you can customize this behavior with a plugin by returning external: true and sideEffects: false in an onResolve callback for whatever paths you want to be treated this way.

  • Recover from a stray top-level } in CSS (#1876)

    This release fixes a bug where a stray } at the top-level of a CSS file would incorrectly truncate the remainder of the file in the output (although not without a warning). With this release, the remainder of the file is now still parsed and printed:

... (truncated)

Changelog

Sourced from esbuild's changelog.

0.14.7

  • Cross-module inlining of TypeScript enum constants (#128)

    This release adds inlining of TypeScript enum constants across separate modules. It activates when bundling is enabled and when the enum is exported via the export keyword and imported via the import keyword:

    // foo.ts
    export enum Foo { Bar }
    // bar.ts
    import { Foo } from './foo.ts'
    console.log(Foo.Bar)

    The access to Foo.Bar will now be compiled into 0 /* Bar */ even though the enum is defined in a separate file. This inlining was added without adding another pass (which would have introduced a speed penalty) by splitting the code for the inlining between the existing parsing and printing passes. Enum inlining is active whether or not you use enum or const enum because it improves performance.

    To demonstrate the performance improvement, I compared the performance of the TypeScript compiler built by bundling the TypeScript compiler source code with esbuild before and after this change. The speed of the compiler was measured by using it to type check a small TypeScript code base. Here are the results:

    tsc with esbuild 0.14.6 with esbuild 0.14.7
    Time 2.96s 3.45s 2.95s

    As you can see, enum inlining gives around a 15% speedup, which puts the esbuild-bundled version at the same speed as the offical TypeScript compiler build (the tsc column)!

    The specifics of the benchmark aren't important here since it's just a demonstration of how enum inlining can affect performance. But if you're wondering, I type checked the Rollup code base using a work-in-progress branch of the TypeScript compiler that's part of the ongoing effort to convert their use of namespaces into ES modules.

  • Mark node built-in modules as having no side effects (#705)

    This release marks node built-in modules such as fs as being side-effect free. That means unused imports to these modules are now removed when bundling, which sometimes results in slightly smaller code. For example:

    // Original code
    import fs from 'fs';
    import path from 'path';
    console.log(path.delimiter);
    // Old output (with --bundle --minify --platform=node --format=esm)
    import"fs";import o from"path";console.log(o.delimiter);
    // New output (with --bundle --minify --platform=node --format=esm)
    import o from"path";console.log(o.delimiter);

    Note that these modules are only automatically considered side-effect when bundling for node, since they are only known to be side-effect free imports in that environment. However, you can customize this behavior with a plugin by returning external: true and sideEffects: false in an onResolve callback for whatever paths you want to be treated this way.

  • Recover from a stray top-level } in CSS (#1876)

    This release fixes a bug where a stray } at the top-level of a CSS file would incorrectly truncate the remainder of the file in the output (although not without a warning). With this release, the remainder of the file is now still parsed and printed:

... (truncated)

Commits
  • b20e0cc publish 0.14.7 to npm
  • 8e551a7 fix #1876: preserve the behavior of the input code
  • 6082ad8 recover from unexpected brace at top-level (#1876)
  • b52096b cross-module inlining of ts enum constants (#128)
  • 169d938 compress boolean flags on records
  • 434bbc6 fix #705: mark node built-ins as side-effect free
  • e39dd7a update go 1.17.4 => 1.17.5
  • 1baacc8 publish 0.14.6 to npm
  • c3182c4 fix bugs introduced by #1859
  • f780076 fix(parser): allow Identifier keyof, readonly, infer in TypeScriptObjec...
  • 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)

@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Dec 22, 2021
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/esbuild-0.14.7 branch 2 times, most recently from bfd7050 to 9d1fbd0 Compare December 22, 2021 17:37
Bumps [esbuild](https://github.com/evanw/esbuild) from 0.14.5 to 0.14.7.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](evanw/esbuild@v0.14.5...v0.14.7)

---
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 force-pushed the dependabot/npm_and_yarn/esbuild-0.14.7 branch from 9d1fbd0 to 5fb7c6d Compare December 22, 2021 21:41
@roberthgnz roberthgnz merged commit b9569d6 into master Dec 22, 2021
@roberthgnz roberthgnz deleted the dependabot/npm_and_yarn/esbuild-0.14.7 branch December 22, 2021 21:59
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