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.17.19 to 0.18.0 #149

Merged
merged 1 commit into from Jun 12, 2023

Conversation

dependabot[bot]
Copy link
Contributor

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

Bumps esbuild from 0.17.19 to 0.18.0.

Release notes

Sourced from esbuild's releases.

v0.18.0

This release deliberately contains backwards-incompatible changes. To avoid automatically picking up releases like this, you should either be pinning the exact version of esbuild in your package.json file (recommended) or be using a version range syntax that only accepts patch upgrades such as ^0.17.0 or ~0.17.0. See npm's documentation about semver for more information.

The breaking changes in this release mainly focus on fixing some long-standing issues with esbuild's handling of tsconfig.json files. Here are all the changes in this release, in detail:

  • Add a way to try esbuild online (#797)

    There is now a way to try esbuild live on esbuild's website without installing it: https://esbuild.github.io/try/. In addition to being able to more easily evaluate esbuild, this should also make it more efficient to generate esbuild bug reports. For example, you can use it to compare the behavior of different versions of esbuild on the same input. The state of the page is stored in the URL for easy sharing. Many thanks to @​hyrious for creating https://hyrious.me/esbuild-repl/, which was the main inspiration for this addition to esbuild's website.

    Two forms of build options are supported: either CLI-style (example) or JS-style (example). Both are converted into a JS object that's passed to esbuild's WebAssembly API. The CLI-style argument parser is a custom one that simulates shell quoting rules, and the JS-style argument parser is also custom and parses a superset of JSON (basically JSON5 + regular expressions). So argument parsing is an approximate simulation of what happens for real but hopefully it should be close enough.

  • Changes to esbuild's tsconfig.json support (#3019):

    This release makes the following changes to esbuild's tsconfig.json support:

    • Using experimental decorators now requires "experimentalDecorators": true (#104)

      Previously esbuild would always compile decorators in TypeScript code using TypeScript's experimental decorator transform. Now that standard JavaScript decorators are close to being finalized, esbuild will now require you to use "experimentalDecorators": true to do this. This new requirement makes it possible for esbuild to introduce a transform for standard JavaScript decorators in TypeScript code in the future. Such a transform has not been implemented yet, however.

    • TypeScript's target no longer affects esbuild's target (#2628)

      Some people requested that esbuild support TypeScript's target setting, so support for it was added (in version 0.12.4). However, esbuild supports reading from multiple tsconfig.json files within a single build, which opens up the possibility that different files in the build have different language targets configured. There isn't really any reason to do this and it can lead to unexpected results. So with this release, the target setting in tsconfig.json will no longer affect esbuild's own target setting. You will have to use esbuild's own target setting instead (which is a single, global value).

    • TypeScript's jsx setting no longer causes esbuild to preserve JSX syntax (#2634)

      TypeScript has a setting called jsx that controls how to transform JSX into JS. The tool-agnostic transform is called react, and the React-specific transform is called react-jsx (or react-jsxdev). There is also a setting called preserve which indicates JSX should be passed through untransformed. Previously people would run esbuild with "jsx": "preserve" in their tsconfig.json files and then be surprised when esbuild preserved their JSX. So with this release, esbuild will now ignore "jsx": "preserve" in tsconfig.json files. If you want to preserve JSX syntax with esbuild, you now have to use --jsx=preserve.

      Note: Some people have suggested that esbuild's equivalent jsx setting override the one in tsconfig.json. However, some projects need to legitimately have different files within the same build use different transforms (i.e. react vs. react-jsx) and having esbuild's global jsx setting override tsconfig.json would prevent this from working. This release ignores "jsx": "preserve" but still allows other jsx values in tsconfig.json files to override esbuild's global jsx setting to keep the ability for multiple files within the same build to use different transforms.

    • useDefineForClassFields behavior has changed (#2584, #2993)

      Class fields in TypeScript look like this (x is a class field):

      class Foo {
        x = 123
      }

      TypeScript has legacy behavior that uses assignment semantics instead of define semantics for class fields when useDefineForClassFields is enabled (in which case class fields in TypeScript behave differently than they do in JavaScript, which is arguably "wrong").

      This legacy behavior exists because TypeScript added class fields to TypeScript before they were added to JavaScript. The TypeScript team decided to go with assignment semantics and shipped their implementation. Much later on TC39 decided to go with define semantics for class fields in JavaScript instead. This behaves differently if the base class has a setter with the same name:

      class Base {
        set x(_) {
          console.log('x:', _)
        }
      }

... (truncated)

Changelog

Sourced from esbuild's changelog.

0.18.0

This release deliberately contains backwards-incompatible changes. To avoid automatically picking up releases like this, you should either be pinning the exact version of esbuild in your package.json file (recommended) or be using a version range syntax that only accepts patch upgrades such as ^0.17.0 or ~0.17.0. See npm's documentation about semver for more information.

The breaking changes in this release mainly focus on fixing some long-standing issues with esbuild's handling of tsconfig.json files. Here are all the changes in this release, in detail:

  • Add a way to try esbuild online (#797)

    There is now a way to try esbuild live on esbuild's website without installing it: https://esbuild.github.io/try/. In addition to being able to more easily evaluate esbuild, this should also make it more efficient to generate esbuild bug reports. For example, you can use it to compare the behavior of different versions of esbuild on the same input. The state of the page is stored in the URL for easy sharing. Many thanks to @​hyrious for creating https://hyrious.me/esbuild-repl/, which was the main inspiration for this addition to esbuild's website.

    Two forms of build options are supported: either CLI-style (example) or JS-style (example). Both are converted into a JS object that's passed to esbuild's WebAssembly API. The CLI-style argument parser is a custom one that simulates shell quoting rules, and the JS-style argument parser is also custom and parses a superset of JSON (basically JSON5 + regular expressions). So argument parsing is an approximate simulation of what happens for real but hopefully it should be close enough.

  • Changes to esbuild's tsconfig.json support (#3019):

    This release makes the following changes to esbuild's tsconfig.json support:

    • Using experimental decorators now requires "experimentalDecorators": true (#104)

      Previously esbuild would always compile decorators in TypeScript code using TypeScript's experimental decorator transform. Now that standard JavaScript decorators are close to being finalized, esbuild will now require you to use "experimentalDecorators": true to do this. This new requirement makes it possible for esbuild to introduce a transform for standard JavaScript decorators in TypeScript code in the future. Such a transform has not been implemented yet, however.

    • TypeScript's target no longer affects esbuild's target (#2628)

      Some people requested that esbuild support TypeScript's target setting, so support for it was added (in version 0.12.4). However, esbuild supports reading from multiple tsconfig.json files within a single build, which opens up the possibility that different files in the build have different language targets configured. There isn't really any reason to do this and it can lead to unexpected results. So with this release, the target setting in tsconfig.json will no longer affect esbuild's own target setting. You will have to use esbuild's own target setting instead (which is a single, global value).

    • TypeScript's jsx setting no longer causes esbuild to preserve JSX syntax (#2634)

      TypeScript has a setting called jsx that controls how to transform JSX into JS. The tool-agnostic transform is called react, and the React-specific transform is called react-jsx (or react-jsxdev). There is also a setting called preserve which indicates JSX should be passed through untransformed. Previously people would run esbuild with "jsx": "preserve" in their tsconfig.json files and then be surprised when esbuild preserved their JSX. So with this release, esbuild will now ignore "jsx": "preserve" in tsconfig.json files. If you want to preserve JSX syntax with esbuild, you now have to use --jsx=preserve.

      Note: Some people have suggested that esbuild's equivalent jsx setting override the one in tsconfig.json. However, some projects need to legitimately have different files within the same build use different transforms (i.e. react vs. react-jsx) and having esbuild's global jsx setting override tsconfig.json would prevent this from working. This release ignores "jsx": "preserve" but still allows other jsx values in tsconfig.json files to override esbuild's global jsx setting to keep the ability for multiple files within the same build to use different transforms.

    • useDefineForClassFields behavior has changed (#2584, #2993)

      Class fields in TypeScript look like this (x is a class field):

      class Foo {
        x = 123
      }

      TypeScript has legacy behavior that uses assignment semantics instead of define semantics for class fields when useDefineForClassFields is enabled (in which case class fields in TypeScript behave differently than they do in JavaScript, which is arguably "wrong").

      This legacy behavior exists because TypeScript added class fields to TypeScript before they were added to JavaScript. The TypeScript team decided to go with assignment semantics and shipped their implementation. Much later on TC39 decided to go with define semantics for class fields in JavaScript instead. This behaves differently if the base class has a setter with the same name:

      class Base {
        set x(_) {
          console.log('x:', _)
        }
      }

... (truncated)

Commits

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.17.19 to 0.18.0.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](evanw/esbuild@v0.17.19...v0.18.0)

---
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 dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Jun 12, 2023
@socket-security
Copy link

New and updated dependency changes detected. Learn more about Socket for GitHub ↗︎

🚮 Removed packages: esbuild@0.17.19

@bcomnes bcomnes merged commit ef422e5 into master Jun 12, 2023
5 checks passed
@bcomnes bcomnes deleted the dependabot/npm_and_yarn/esbuild-0.18.0 branch June 12, 2023 21:23
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 javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant