Skip to content

Commit

Permalink
chore(deps): update dependency esbuild to ^0.19.12 (#2416)
Browse files Browse the repository at this point in the history
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [esbuild](https://togithub.com/evanw/esbuild) | [`^0.19.11` ->
`^0.19.12`](https://renovatebot.com/diffs/npm/esbuild/0.19.11/0.19.12) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/esbuild/0.19.12?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/esbuild/0.19.12?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/esbuild/0.19.11/0.19.12?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/esbuild/0.19.11/0.19.12?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>evanw/esbuild (esbuild)</summary>

###
[`v0.19.12`](https://togithub.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#01912)

[Compare
Source](https://togithub.com/evanw/esbuild/compare/v0.19.11...v0.19.12)

- The "preserve" JSX mode now preserves JSX text verbatim
([#&#8203;3605](https://togithub.com/evanw/esbuild/issues/3605))

The [JSX specification](https://facebook.github.io/jsx/) 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](https://twitter.com/jarredsumner/status/1456118847937781764)
(esbuild [deliberately follows
TypeScript](https://twitter.com/evanwallace/status/1456122279453208576)
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:

    ```jsx
    // 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:

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

I think I originally didn't implement it even though it's part of the
[JSX specification](https://facebook.github.io/jsx/) because it
previously didn't work in TypeScript (and potentially also in Babel?).
However, support for it was [silently added in TypeScript
4.8](https://togithub.com/microsoft/TypeScript/pull/47994) without me
noticing and Babel has also since fixed their [bugs regarding this
feature](https://togithub.com/babel/babel/pull/6006). 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](https://togithub.com/facebook/jsx/issues/53). 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
([#&#8203;3574](https://togithub.com/evanw/esbuild/issues/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:

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

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **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.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/fwouts/previewjs).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMzUuMCIsInVwZGF0ZWRJblZlciI6IjM3LjEzNS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
  • Loading branch information
renovate[bot] committed Jan 23, 2024
1 parent c360c3c commit 7189e92
Show file tree
Hide file tree
Showing 4 changed files with 297 additions and 75 deletions.
2 changes: 1 addition & 1 deletion integrations/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"chalk": "^5.3.0",
"commander": "^11.1.0",
"cross-env": "^7.0.3",
"esbuild": "^0.19.11",
"esbuild": "^0.19.12",
"nodemon": "^3.0.3",
"open": "^10.0.3",
"rimraf": "^5.0.5",
Expand Down
2 changes: 1 addition & 1 deletion integrations/intellij/daemon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"devDependencies": {
"@previewjs/daemon": "workspace:*",
"@previewjs/loader": "workspace:*",
"esbuild": "^0.19.11",
"esbuild": "^0.19.12",
"rimraf": "^5.0.5",
"typescript": "^5.3.3"
}
Expand Down
2 changes: 1 addition & 1 deletion integrations/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
"@previewjs/loader": "workspace:*",
"@types/vscode": "^1.71.2",
"cross-env": "^7.0.3",
"esbuild": "^0.19.11",
"esbuild": "^0.19.12",
"exclusive-promises": "^1.0.3",
"execa": "^8.0.1",
"get-port": "^7.0.0",
Expand Down
Loading

0 comments on commit 7189e92

Please sign in to comment.