Skip to content
This repository was archived by the owner on Oct 6, 2021. It is now read-only.

Bump esbuild from 0.11.7 to 0.13.1 - #280

Closed
dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/npm_and_yarn/esbuild-0.13.1
Closed

Bump esbuild from 0.11.7 to 0.13.1#280
dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/npm_and_yarn/esbuild-0.13.1

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Sep 23, 2021

Copy link
Copy Markdown

Bumps esbuild from 0.11.7 to 0.13.1.

Release notes

Sourced from esbuild's releases.

v0.13.1

  • Fix the esbuild package in yarn 2+

    The yarn package manager version 2 and above has a mode called PnP that installs packages inside zip files instead of using individual files on disk, and then hijacks node's fs module to pretend that paths to files inside the zip file are actually individual files on disk so that code that wasn't written specifically for yarn still works. Unfortunately that hijacking is incomplete and it still causes certain things to break such as using these zip file paths to create a JavaScript worker thread or to create a child process.

    This was an issue for the new optionalDependencies package installation strategy that was just released in version 0.13.0 since the binary executable is now inside of an installed package instead of being downloaded using an install script. When it's installed with yarn 2+ in PnP mode the binary executable is inside a zip file and can't be run. To work around this, esbuild detects yarn's PnP mode and copies the binary executable to a real file outside of the zip file.

    Unfortunately the code to do this didn't create the parent directory before writing to the file path. That caused esbuild's API to crash when it was run for the first time. This didn't come up during testing because the parent directory already existed when the tests were run. This release changes the location of the binary executable from a shared cache directory to inside the esbuild package itself, which should fix this crash. This problem only affected esbuild's JS API when it was run through yarn 2+ with PnP mode active.

v0.13.0

This release contains backwards-incompatible changes. Since esbuild is before version 1.0.0, these changes have been released as a new minor version to reflect this (as recommended by npm). You should either be pinning the exact version of esbuild in your package.json file or be using a version range syntax that only accepts patch upgrades such as ~0.12.0. See the documentation about semver for more information.

  • Allow tree shaking to be force-enabled and force-disabled (#1518, #1610, #1611, #1617)

    This release introduces a breaking change that gives you more control over when tree shaking happens ("tree shaking" here refers to declaration-level dead code removal). Previously esbuild's tree shaking was automatically enabled or disabled for you depending on the situation and there was no manual override to change this. Specifically, tree shaking was only enabled either when bundling was enabled or when the output format was set to iife (i.e. wrapped in an immediately-invoked function expression). This was done to avoid issues with people appending code to output files in the cjs and esm formats and expecting that code to be able to reference code in the output file that isn't otherwise referenced.

    You now have the ability to explicitly force-enable or force-disable tree shaking to bypass this default behavior. This is a breaking change because there is already a setting for tree shaking that does something else, and it has been moved to a separate setting instead. The previous setting allowed you to control whether or not to ignore manual side-effect annotations, which is related to tree shaking since only side-effect free code can be removed as dead code. Specifically you can annotate function calls with /* @__PURE__ */ to indicate that they can be removed if they are not used, and you can annotate packages with "sideEffects": false to indicate that imports of that package can be removed if they are not used. Being able to ignore these annotations is necessary because they are sometimes incorrect. This previous setting has been moved to a separate setting because it actually impacts dead-code removal within expressions, which also applies when minifying with tree-shaking disabled.

    Old behavior

    • CLI
      • Ignore side-effect annotations: --tree-shaking=ignore-annotations
    • JS
      • Ignore side-effect annotations: treeShaking: 'ignore-annotations'
    • Go
      • Ignore side-effect annotations: TreeShaking: api.TreeShakingIgnoreAnnotations

    New behavior

    • CLI
      • Ignore side-effect annotations: --ignore-annotations
      • Force-disable tree shaking: --tree-shaking=false
      • Force-enable tree shaking: --tree-shaking=true
    • JS
      • Ignore side-effect annotations: ignoreAnnotations: true
      • Force-disable tree shaking: treeShaking: false
      • Force-enable tree shaking: treeShaking: true
    • Go
      • Ignore side-effect annotations: IgnoreAnnotations: true
      • Force-disable tree shaking: TreeShaking: api.TreeShakingFalse
      • Force-enable tree shaking: TreeShaking: api.TreeShakingTrue
  • The npm package now uses optionalDependencies to install the platform-specific binary executable (#286, #291, #319, #347, #369, #547, #565, #789, #921, #1193, #1270, #1382, #1422, #1450, #1485, #1546, #1547, #1574, #1609)

    This release changes esbuild's installation strategy in an attempt to improve compatibility with edge cases such as custom registries, custom proxies, offline installations, read-only file systems, or when post-install scripts are disabled. It's being treated as a breaking change out of caution because it's a significant change to how esbuild works with JS package managers, and hasn't been widely tested yet.

    The old installation strategy manually downloaded the correct binary executable in a post-install script. The binary executable is hosted in a separate platform-specific npm package such as esbuild-darwin-64. The install script first attempted to download the package via the npm command in case npm had custom network settings configured. If that didn't work, the install script attempted to download the package from https://registry.npmjs.org/ before giving up. This was problematic for many reasons including:

    • Not all of npm's settings can be forwarded due to npm bugs such as npm/cli#2284, and npm has said these bugs will never be fixed.
    • Some people have configured their network environments such that downloading from https://registry.npmjs.org/ will hang instead of either succeeding or failing.

... (truncated)

Changelog

Sourced from esbuild's changelog.

0.13.1

  • Fix the esbuild package in yarn 2+

    The yarn package manager version 2 and above has a mode called PnP that installs packages inside zip files instead of using individual files on disk, and then hijacks node's fs module to pretend that paths to files inside the zip file are actually individual files on disk so that code that wasn't written specifically for yarn still works. Unfortunately that hijacking is incomplete and it still causes certain things to break such as using these zip file paths to create a JavaScript worker thread or to create a child process.

    This was an issue for the new optionalDependencies package installation strategy that was just released in version 0.13.0 since the binary executable is now inside of an installed package instead of being downloaded using an install script. When it's installed with yarn 2+ in PnP mode the binary executable is inside a zip file and can't be run. To work around this, esbuild detects yarn's PnP mode and copies the binary executable to a real file outside of the zip file.

    Unfortunately the code to do this didn't create the parent directory before writing to the file path. That caused esbuild's API to crash when it was run for the first time. This didn't come up during testing because the parent directory already existed when the tests were run. This release changes the location of the binary executable from a shared cache directory to inside the esbuild package itself, which should fix this crash. This problem only affected esbuild's JS API when it was run through yarn 2+ with PnP mode active.

0.13.0

This release contains backwards-incompatible changes. Since esbuild is before version 1.0.0, these changes have been released as a new minor version to reflect this (as recommended by npm). You should either be pinning the exact version of esbuild in your package.json file or be using a version range syntax that only accepts patch upgrades such as ~0.12.0. See the documentation about semver for more information.

  • Allow tree shaking to be force-enabled and force-disabled (#1518, #1610, #1611, #1617)

    This release introduces a breaking change that gives you more control over when tree shaking happens ("tree shaking" here refers to declaration-level dead code removal). Previously esbuild's tree shaking was automatically enabled or disabled for you depending on the situation and there was no manual override to change this. Specifically, tree shaking was only enabled either when bundling was enabled or when the output format was set to iife (i.e. wrapped in an immediately-invoked function expression). This was done to avoid issues with people appending code to output files in the cjs and esm formats and expecting that code to be able to reference code in the output file that isn't otherwise referenced.

    You now have the ability to explicitly force-enable or force-disable tree shaking to bypass this default behavior. This is a breaking change because there is already a setting for tree shaking that does something else, and it has been moved to a separate setting instead. The previous setting allowed you to control whether or not to ignore manual side-effect annotations, which is related to tree shaking since only side-effect free code can be removed as dead code. Specifically you can annotate function calls with /* @__PURE__ */ to indicate that they can be removed if they are not used, and you can annotate packages with "sideEffects": false to indicate that imports of that package can be removed if they are not used. Being able to ignore these annotations is necessary because they are sometimes incorrect. This previous setting has been moved to a separate setting because it actually impacts dead-code removal within expressions, which also applies when minifying with tree-shaking disabled.

    Old behavior

    • CLI
      • Ignore side-effect annotations: --tree-shaking=ignore-annotations
    • JS
      • Ignore side-effect annotations: treeShaking: 'ignore-annotations'
    • Go
      • Ignore side-effect annotations: TreeShaking: api.TreeShakingIgnoreAnnotations

    New behavior

    • CLI
      • Ignore side-effect annotations: --ignore-annotations
      • Force-disable tree shaking: --tree-shaking=false
      • Force-enable tree shaking: --tree-shaking=true
    • JS
      • Ignore side-effect annotations: ignoreAnnotations: true
      • Force-disable tree shaking: treeShaking: false
      • Force-enable tree shaking: treeShaking: true
    • Go
      • Ignore side-effect annotations: IgnoreAnnotations: true
      • Force-disable tree shaking: TreeShaking: api.TreeShakingFalse
      • Force-enable tree shaking: TreeShaking: api.TreeShakingTrue
  • The npm package now uses optionalDependencies to install the platform-specific binary executable (#286, #291, #319, #347, #369, #547, #565, #789, #921, #1193, #1270, #1382, #1422, #1450, #1485, #1546, #1547, #1574, #1609)

    This release changes esbuild's installation strategy in an attempt to improve compatibility with edge cases such as custom registries, custom proxies, offline installations, read-only file systems, or when post-install scripts are disabled. It's being treated as a breaking change out of caution because it's a significant change to how esbuild works with JS package managers, and hasn't been widely tested yet.

    The old installation strategy manually downloaded the correct binary executable in a post-install script. The binary executable is hosted in a separate platform-specific npm package such as esbuild-darwin-64. The install script first attempted to download the package via the npm command in case npm had custom network settings configured. If that didn't work, the install script attempted to download the package from https://registry.npmjs.org/ before giving up. This was problematic for many reasons including:

... (truncated)

Commits
  • 29e8f9d publish 0.13.1 to npm
  • 583569e yarn pnp compat: copy binary into the current pkg
  • 98b0640 fix the "esbuild" package in yarn 2+
  • 80fbcc9 fix release gh action to ignore nested headers
  • 081c5fa publish 0.13.0 to npm
  • 92a3a5b release notes
  • 9e569c4 install using "optionalDependencies" (#1621)
  • feb6b42 separate "ignore annotations" from "tree shaking" (#1625)
  • 9e5e767 no side effects for "typeof x != undefined && x"
  • 7d15c6d publish 0.12.29 to npm
  • 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.11.7 to 0.13.1.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](evanw/esbuild@v0.11.7...v0.13.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added the dependencies Pull requests that update a dependency file label Sep 23, 2021
@vercel

vercel Bot commented Sep 23, 2021

Copy link
Copy Markdown

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/monkatraz/mainframe/Esz9nQ6cChANmkeDGPEGpoLgkUMY
✅ Preview: https://mainframe-git-dependabot-npmandyarnesbuild-0131-monkatraz.vercel.app

@dependabot @github

dependabot Bot commented on behalf of github Sep 24, 2021

Copy link
Copy Markdown
Author

Superseded by #281.

@dependabot dependabot Bot closed this Sep 24, 2021
@dependabot
dependabot Bot deleted the dependabot/npm_and_yarn/esbuild-0.13.1 branch September 24, 2021 12:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants