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): update dependency esbuild to v0.20.0 #15996

Merged
merged 1 commit into from
Feb 3, 2024
Merged

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jan 28, 2024

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
esbuild 0.19.11 -> 0.20.0 age adoption passing confidence

Release Notes

evanw/esbuild (esbuild)

v0.20.0

Compare Source

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.19.0 or ~0.19.0. See npm's documentation about semver for more information.

This time there is only one breaking change, and it only matters for people using Deno. Deno tests that use esbuild will now fail unless you make the change described below.

  • Work around API deprecations in Deno 1.40.x (#​3609, #​3611)

    Deno 1.40.0 was just released and introduced run-time warnings about certain APIs that esbuild uses. With this release, esbuild will work around these run-time warnings by using newer APIs if they are present and falling back to the original APIs otherwise. This should avoid the warnings without breaking compatibility with older versions of Deno.

    Unfortunately, doing this introduces a breaking change. The newer child process APIs lack a way to synchronously terminate esbuild's child process, so calling esbuild.stop() from within a Deno test is no longer sufficient to prevent Deno from failing a test that uses esbuild's API (Deno fails tests that create a child process without killing it before the test ends). To work around this, esbuild's stop() function has been changed to return a promise, and you now have to change esbuild.stop() to await esbuild.stop() in all of your Deno tests.

  • Reorder implicit file extensions within node_modules (#​3341, #​3608)

    In version 0.18.0, esbuild changed the behavior of implicit file extensions within node_modules directories (i.e. in published packages) to prefer .js over .ts even when the --resolve-extensions= order prefers .ts over .js (which it does by default). However, doing that also accidentally made esbuild prefer .css over .ts, which caused problems for people that published packages containing both TypeScript and CSS in files with the same name.

    With this release, esbuild will reorder TypeScript file extensions immediately after the last JavaScript file extensions in the implicit file extension order instead of putting them at the end of the order. Specifically the default implicit file extension order is .tsx,.ts,.jsx,.js,.css,.json which used to become .jsx,.js,.css,.json,.tsx,.ts in node_modules directories. With this release it will now become .jsx,.js,.tsx,.ts,.css,.json instead.

    Why even rewrite the implicit file extension order at all? One reason is because the .js file is more likely to behave correctly than the .ts file. The behavior of the .ts file may depend on tsconfig.json and the tsconfig.json file may not even be published, or may use extends to refer to a base tsconfig.json file that wasn't published. People can get into this situation when they forget to add all .ts files to their .npmignore file before publishing to npm. Picking .js over .ts helps make it more likely that resulting bundle will behave correctly.

v0.19.12

Compare Source

  • The "preserve" JSX mode now preserves JSX text verbatim (#​3605)

    The JSX specification deliberately doesn't specify how JSX text is supposed to be interpreted and there is no canonical way to interpret JSX text. Two most popular interpretations are Babel and TypeScript. Yes they are different (esbuild deliberately follows TypeScript by the way).

    Previously esbuild normalized text to the TypeScript interpretation when the "preserve" JSX mode is active. However, "preserve" should arguably reproduce the original JSX text verbatim so that whatever JSX transform runs after esbuild is free to interpret it however it wants. So with this release, esbuild will now pass JSX text through unmodified:

    // Original code
    let el =
      <a href={'/'} title='&apos;&quot;'> some text
        {foo}
          more text </a>
    
    // Old output (with --loader=jsx --jsx=preserve)
    let el = <a href="/" title={`'"`}>
      {" some text"}
      {foo}
      {"more text "}
    </a>;
    
    // New output (with --loader=jsx --jsx=preserve)
    let el = <a href={"/"} title='&apos;&quot;'> some text
        {foo}
          more text </a>;
  • Allow JSX elements as JSX attribute values

    JSX has an obscure feature where you can use JSX elements in attribute position without surrounding them with {...}. It looks like this:

    let el = <div data-ab=<><a/><b/></>/>;

    I think I originally didn't implement it even though it's part of the JSX specification because it previously didn't work in TypeScript (and potentially also in Babel?). However, support for it was silently added in TypeScript 4.8 without me noticing and Babel has also since fixed their bugs regarding this feature. So I'm adding it to esbuild too now that I know it's widely supported.

    Keep in mind that there is some ongoing discussion about removing this feature from JSX. I agree that the syntax seems out of place (it does away with the elegance of "JSX is basically just XML with {...} escapes" for something arguably harder to read, which doesn't seem like a good trade-off), but it's in the specification and TypeScript and Babel both implement it so I'm going to have esbuild implement it too. However, I reserve the right to remove it from esbuild if it's ever removed from the specification in the future. So use it with caution.

  • Fix a bug with TypeScript type parsing (#​3574)

    This release fixes a bug with esbuild's TypeScript parser where a conditional type containing a union type that ends with an infer type that ends with a constraint could fail to parse. This was caused by the "don't parse a conditional type" flag not getting passed through the union type parser. Here's an example of valid TypeScript code that previously failed to parse correctly:

    type InferUnion<T> = T extends { a: infer U extends number } | infer U extends number ? U : never

Configuration

📅 Schedule: Branch creation - "after 01:00 on sunday" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot added the dependency Dependency Upgrade label Jan 28, 2024
Copy link

github-actions bot commented Jan 28, 2024

Size Change: 0 B

Total Size: 8.4 MB

ℹ️ View Unchanged
Filename Size
./dist/bin 4.1 kB
./dist/bin/prettier.cjs 2.15 kB
./dist/doc.d.ts 6.91 kB
./dist/doc.js 53.2 kB
./dist/doc.mjs 49.5 kB
./dist/index.cjs 35.8 kB
./dist/index.d.ts 26.7 kB
./dist/index.mjs 801 kB
./dist/internal 4.1 kB
./dist/internal/cli.mjs 224 kB
./dist/LICENSE 228 kB
./dist/package.json 6.28 kB
./dist/plugins 4.1 kB
./dist/plugins/acorn.d.ts 109 B
./dist/plugins/acorn.js 149 kB
./dist/plugins/acorn.mjs 149 kB
./dist/plugins/angular.d.ts 177 B
./dist/plugins/angular.js 42.1 kB
./dist/plugins/angular.mjs 41.4 kB
./dist/plugins/babel.d.ts 419 B
./dist/plugins/babel.js 313 kB
./dist/plugins/babel.mjs 313 kB
./dist/plugins/estree.d.ts 11 B
./dist/plugins/estree.js 195 kB
./dist/plugins/estree.mjs 195 kB
./dist/plugins/flow.d.ts 90 B
./dist/plugins/flow.js 683 kB
./dist/plugins/flow.mjs 682 kB
./dist/plugins/glimmer.d.ts 93 B
./dist/plugins/glimmer.js 136 kB
./dist/plugins/glimmer.mjs 135 kB
./dist/plugins/graphql.d.ts 93 B
./dist/plugins/graphql.js 43.6 kB
./dist/plugins/graphql.mjs 43 kB
./dist/plugins/html.d.ts 139 B
./dist/plugins/html.js 146 kB
./dist/plugins/html.mjs 146 kB
./dist/plugins/markdown.d.ts 127 B
./dist/plugins/markdown.js 150 kB
./dist/plugins/markdown.mjs 150 kB
./dist/plugins/meriyah.d.ts 93 B
./dist/plugins/meriyah.js 120 kB
./dist/plugins/meriyah.mjs 120 kB
./dist/plugins/postcss.d.ts 121 B
./dist/plugins/postcss.js 152 kB
./dist/plugins/postcss.mjs 151 kB
./dist/plugins/typescript.d.ts 96 B
./dist/plugins/typescript.js 1.15 MB
./dist/plugins/typescript.mjs 1.15 MB
./dist/plugins/yaml.d.ts 90 B
./dist/plugins/yaml.js 122 kB
./dist/plugins/yaml.mjs 121 kB
./dist/README.md 4.03 kB
./dist/standalone.d.ts 1.37 kB
./dist/standalone.js 76.8 kB
./dist/standalone.mjs 76.6 kB

compressed-size-action

@fisker fisker merged commit a8d7d5b into main Feb 3, 2024
30 checks passed
@fisker fisker deleted the renovate/esbuild-0.x branch February 3, 2024 09:21
medikoo pushed a commit to medikoo/prettier-elastic that referenced this pull request Feb 18, 2024
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependency Dependency Upgrade
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant