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

Bump esbuild from 0.18.0 to 0.18.1 #244

Merged
merged 1 commit into from
Jun 13, 2023

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jun 12, 2023

Bumps esbuild from 0.18.0 to 0.18.1.

Release notes

Sourced from esbuild's releases.

v0.18.1

  • Fill in null entries in input source maps (#3144)

    If esbuild bundles input files with source maps and those source maps contain a sourcesContent array with null entries, esbuild previously copied those null entries over to the output source map. With this release, esbuild will now attempt to fill in those null entries by looking for a file on the file system with the corresponding name from the sources array. This matches esbuild's existing behavior that automatically generates the sourcesContent array from the file system if the entire sourcesContent array is missing.

  • Support /* @__KEY__ */ comments for mangling property names (#2574)

    Property mangling is an advanced feature that enables esbuild to minify certain property names, even though it's not possible to automatically determine that it's safe to do so. The safe property names are configured via regular expression such as --mangle-props=_$ (mangle all properties ending in _).

    Sometimes it's desirable to also minify strings containing property names, even though it's not possible to automatically determine which strings are property names. This release makes it possible to do this by annotating those strings with /* @__KEY__ */. This is a convention that Terser added earlier this year, and which esbuild is now following too: terser/terser#1365. Using it looks like this:

    // Original code
    console.log(
      [obj.mangle_, obj.keep],
      [obj.get('mangle_'), obj.get('keep')],
      [obj.get(/* @__KEY__ */ 'mangle_'), obj.get(/* @__KEY__ */ 'keep')],
    )
    // Old output (with --mangle-props=$)
    console.log(
    [obj.a, obj.keep],
    [obj.get("mangle"), obj.get("keep")],
    [obj.get(/* @KEY / "mangle_"), obj.get(/ @KEY */ "keep")]
    );
    // New output (with --mangle-props=$)
    console.log(
    [obj.a, obj.keep],
    [obj.get("mangle"), obj.get("keep")],
    [obj.get(/* @KEY / "a"), obj.get(/ @KEY */ "keep")]
    );

  • Support /* @__NO_SIDE_EFFECTS__ */ comments for functions (#3149)

    Rollup has recently added support for /* @__NO_SIDE_EFFECTS__ */ annotations before functions to indicate that calls to these functions can be removed if the result is unused (i.e. the calls can be assumed to have no side effects). This release adds basic support for these to esbuild as well, which means esbuild will now parse these comments in input files and preserve them in output files. This should help people that use esbuild in combination with Rollup.

    Note that this doesn't necessarily mean esbuild will treat these calls as having no side effects, as esbuild's parallel architecture currently isn't set up to enable this type of cross-file tree-shaking information (tree-shaking decisions regarding a function call are currently local to the file they appear in). If you want esbuild to consider a function call to have no side effects, make sure you continue to annotate the function call with /* @__PURE__ */ (which is the previously-established convention for communicating this).

Changelog

Sourced from esbuild's changelog.

0.18.1

  • Fill in null entries in input source maps (#3144)

    If esbuild bundles input files with source maps and those source maps contain a sourcesContent array with null entries, esbuild previously copied those null entries over to the output source map. With this release, esbuild will now attempt to fill in those null entries by looking for a file on the file system with the corresponding name from the sources array. This matches esbuild's existing behavior that automatically generates the sourcesContent array from the file system if the entire sourcesContent array is missing.

  • Support /* @__KEY__ */ comments for mangling property names (#2574)

    Property mangling is an advanced feature that enables esbuild to minify certain property names, even though it's not possible to automatically determine that it's safe to do so. The safe property names are configured via regular expression such as --mangle-props=_$ (mangle all properties ending in _).

    Sometimes it's desirable to also minify strings containing property names, even though it's not possible to automatically determine which strings are property names. This release makes it possible to do this by annotating those strings with /* @__KEY__ */. This is a convention that Terser added earlier this year, and which esbuild is now following too: terser/terser#1365. Using it looks like this:

    // Original code
    console.log(
      [obj.mangle_, obj.keep],
      [obj.get('mangle_'), obj.get('keep')],
      [obj.get(/* @__KEY__ */ 'mangle_'), obj.get(/* @__KEY__ */ 'keep')],
    )
    // Old output (with --mangle-props=$)
    console.log(
    [obj.a, obj.keep],
    [obj.get("mangle"), obj.get("keep")],
    [obj.get(/* @KEY / "mangle_"), obj.get(/ @KEY */ "keep")]
    );
    // New output (with --mangle-props=$)
    console.log(
    [obj.a, obj.keep],
    [obj.get("mangle"), obj.get("keep")],
    [obj.get(/* @KEY / "a"), obj.get(/ @KEY */ "keep")]
    );

  • Support /* @__NO_SIDE_EFFECTS__ */ comments for functions (#3149)

    Rollup has recently added support for /* @__NO_SIDE_EFFECTS__ */ annotations before functions to indicate that calls to these functions can be removed if the result is unused (i.e. the calls can be assumed to have no side effects). This release adds basic support for these to esbuild as well, which means esbuild will now parse these comments in input files and preserve them in output files. This should help people that use esbuild in combination with Rollup.

    Note that this doesn't necessarily mean esbuild will treat these calls as having no side effects, as esbuild's parallel architecture currently isn't set up to enable this type of cross-file tree-shaking information (tree-shaking decisions regarding a function call are currently local to the file they appear in). If you want esbuild to consider a function call to have no side effects, make sure you continue to annotate the function call with /* @__PURE__ */ (which is the previously-established convention for communicating this).

Commits
  • 3aa3ec2 publish 0.18.1 to npm
  • 394941b #3149: @__NO_SIDE_EFFECTS__ on async functions
  • eabcc87 forbid unexpected syntax after TS declare
  • b4a1e70 ASI before TS keywords: abstract, declare, type
  • c316bb6 add STypeScriptShared
  • 8ae4f7c fix a crash when parsing typescript declare
  • 3d81d6f @__PURE__ for file local @__NO_SIDE_EFFECTS__
  • cf687c9 fix #3149: preserve /* @__NO_SIDE_EFFECTS__ */
  • b2176c8 fix #2574: support /* @__KEY__ */ comments
  • 6eb0e71 limit css features to browser engines
  • 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.18.0 to 0.18.1.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](evanw/esbuild@v0.18.0...v0.18.1)

---
updated-dependencies:
- dependency-name: esbuild
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Jun 12, 2023
@junedomingo junedomingo merged commit 60274c7 into master Jun 13, 2023
@dependabot dependabot bot deleted the dependabot/npm_and_yarn/esbuild-0.18.1 branch June 13, 2023 07:25
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.

1 participant