Skip to content

Commit

Permalink
chore(deps): update dependency esbuild to ^0.18.13 (#1836)
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.18.12` ->
`^0.18.13`](https://renovatebot.com/diffs/npm/esbuild/0.18.12/0.18.13) |
[![age](https://badges.renovateapi.com/packages/npm/esbuild/0.18.13/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/esbuild/0.18.13/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/esbuild/0.18.13/compatibility-slim/0.18.12)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/esbuild/0.18.13/confidence-slim/0.18.12)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

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

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

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

- Add the `--drop-labels=` option
([#&#8203;2398](https://togithub.com/evanw/esbuild/issues/2398))

If you want to conditionally disable some development-only code and have
it not be present in the final production bundle, right now the most
straightforward way of doing this is to use the `--define:` flag along
with a specially-named global variable. For example, consider the
following code:

    ```js
    function main() {
      DEV && doAnExpensiveCheck()
    }
    ```

    You can build this for development and production like this:

    -   Development: `esbuild --define:DEV=true`
    -   Production: `esbuild --define:DEV=false`

One drawback of this approach is that the resulting code crashes if you
don't provide a value for `DEV` with `--define:`. In practice this isn't
that big of a problem, and there are also various ways to work around
this.

However, another approach that avoids this drawback is to use JavaScript
label statements instead. That's what the `--drop-labels=` flag
implements. For example, consider the following code:

    ```js
    function main() {
      DEV: doAnExpensiveCheck()
    }
    ```

With this release, you can now build this for development and production
like this:

    -   Development: `esbuild`
    -   Production: `esbuild --drop-labels=DEV`

This means that code containing optional development-only checks can now
be written such that it's safe to run without any additional
configuration. The `--drop-labels=` flag takes comma-separated list of
multiple label names to drop.

- Avoid causing `unhandledRejection` during shutdown
([#&#8203;3219](https://togithub.com/evanw/esbuild/issues/3219))

All pending esbuild JavaScript API calls are supposed to fail if
esbuild's underlying child process is unexpectedly terminated. This can
happen if `SIGINT` is sent to the parent `node` process with Ctrl+C, for
example. Previously doing this could also cause an unhandled promise
rejection when esbuild attempted to communicate this failure to its own
child process that no longer exists. This release now swallows this
communication failure, which should prevent this internal unhandled
promise rejection. This change means that you can now use esbuild's
JavaScript API with a custom `SIGINT` handler that extends the lifetime
of the `node` process without esbuild's internals causing an early exit
due to an unhandled promise rejection.

-   Update browser compatibility table scripts

The scripts that esbuild uses to compile its internal browser
compatibility table have been overhauled. Briefly:

    -   Converted from JavaScript to TypeScript
    -   Fixed some bugs that resulted in small changes to the table
- Added [`caniuse-lite`](https://www.npmjs.com/package/caniuse-lite) and
[`@mdn/browser-compat-data`](https://www.npmjs.com/package/@&#8203;mdn/browser-compat-data)
as new data sources (replacing manually-copied information)

This change means it's now much easier to keep esbuild's internal
compatibility tables up to date. You can review the table changes here
if you need to debug something about this change:

- [JS table
changes](https://togithub.com/evanw/esbuild/compare/d259b8fac717ee347c19bd8299f2c26d7c87481a...af1d35c372f78c14f364b63e819fd69548508f55#diff-1649eb68992c79753469f02c097de309adaf7231b45cc816c50bf751af400eb4)
- [CSS table
changes](https://togithub.com/evanw/esbuild/commit/95feb2e09877597cb929469ce43811bdf11f50c1#diff-4e1c4f269e02c5ea31cbd5138d66751e32cf0e240524ee8a966ac756f0e3c3cd)

</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:eyJjcmVhdGVkSW5WZXIiOiIzNi41LjMiLCJ1cGRhdGVkSW5WZXIiOiIzNi41LjMiLCJ0YXJnZXRCcmFuY2giOiJtYWluIn0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
  • Loading branch information
renovate[bot] committed Jul 15, 2023
1 parent 1815a3a commit 61c18ad
Show file tree
Hide file tree
Showing 4 changed files with 286 additions and 59 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.0.0",
"cross-env": "^7.0.3",
"esbuild": "^0.18.12",
"esbuild": "^0.18.13",
"nodemon": "^3.0.1",
"open": "^9.1.0",
"rimraf": "^5.0.1",
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.18.12",
"esbuild": "^0.18.13",
"rimraf": "^5.0.1",
"typescript": "^5.1.6"
}
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.18.12",
"esbuild": "^0.18.13",
"exclusive-promises": "^1.0.3",
"execa": "^7.1.1",
"ovsx": "^0.8.2",
Expand Down
Loading

0 comments on commit 61c18ad

Please sign in to comment.