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

Bump esbuild from 0.21.1 to 0.21.4 in /javascript #589

Merged
merged 1 commit into from
Jun 5, 2024

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github May 27, 2024

Bumps esbuild from 0.21.1 to 0.21.4.

Release notes

Sourced from esbuild's releases.

v0.21.4

  • Update support for import assertions and import attributes in node (#3778)

    Import assertions (the assert keyword) have been removed from node starting in v22.0.0. So esbuild will now strip them and generate a warning with --target=node22 or above:

    ▲ [WARNING] The "assert" keyword is not supported in the configured target environment ("node22") [assert-to-with]
    
    example.mjs:1:40:
      1 │ import json from "esbuild/package.json" assert { type: "json" }
        │                                         ~~~~~~
        ╵                                         with
    

    Did you mean to use "with" instead of "assert"?

    Import attributes (the with keyword) have been backported to node 18 starting in v18.20.0. So esbuild will no longer strip them with --target=node18.N if N is 20 or greater.

  • Fix for await transform when a label is present

    This release fixes a bug where the for await transform, which wraps the loop in a try statement, previously failed to also move the loop's label into the try statement. This bug only affects code that uses both of these features in combination. Here's an example of some affected code:

    // Original code
    async function test() {
      outer: for await (const x of [Promise.resolve([0, 1])]) {
        for (const y of x) if (y) break outer
        throw 'fail'
      }
    }
    // Old output (with --target=es6)
    function test() {
    return __async(this, null, function* () {
    outer: try {
    for (var iter = __forAwait([Promise.resolve([0, 1])]), more, temp, error; more = !(temp = yield iter.next()).done; more = false) {
    const x = temp.value;
    for (const y of x) if (y) break outer;
    throw "fail";
    }
    } catch (temp) {
    error = [temp];
    } finally {
    try {
    more && (temp = iter.return) && (yield temp.call(iter));
    } finally {
    if (error)
    throw error[0];
    }
    }

... (truncated)

Changelog

Sourced from esbuild's changelog.

0.21.4

  • Update support for import assertions and import attributes in node (#3778)

    Import assertions (the assert keyword) have been removed from node starting in v22.0.0. So esbuild will now strip them and generate a warning with --target=node22 or above:

    ▲ [WARNING] The "assert" keyword is not supported in the configured target environment ("node22") [assert-to-with]
    
    example.mjs:1:40:
      1 │ import json from "esbuild/package.json" assert { type: "json" }
        │                                         ~~~~~~
        ╵                                         with
    

    Did you mean to use "with" instead of "assert"?

    Import attributes (the with keyword) have been backported to node 18 starting in v18.20.0. So esbuild will no longer strip them with --target=node18.N if N is 20 or greater.

  • Fix for await transform when a label is present

    This release fixes a bug where the for await transform, which wraps the loop in a try statement, previously failed to also move the loop's label into the try statement. This bug only affects code that uses both of these features in combination. Here's an example of some affected code:

    // Original code
    async function test() {
      outer: for await (const x of [Promise.resolve([0, 1])]) {
        for (const y of x) if (y) break outer
        throw 'fail'
      }
    }
    // Old output (with --target=es6)
    function test() {
    return __async(this, null, function* () {
    outer: try {
    for (var iter = __forAwait([Promise.resolve([0, 1])]), more, temp, error; more = !(temp = yield iter.next()).done; more = false) {
    const x = temp.value;
    for (const y of x) if (y) break outer;
    throw "fail";
    }
    } catch (temp) {
    error = [temp];
    } finally {
    try {
    more && (temp = iter.return) && (yield temp.call(iter));
    } finally {
    if (error)
    throw error[0];
    }

... (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 show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @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.21.1 to 0.21.4.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](evanw/esbuild@v0.21.1...v0.21.4)

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

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 May 27, 2024
@tushuhei tushuhei merged commit e35ab83 into main Jun 5, 2024
27 checks passed
@dependabot dependabot bot deleted the dependabot/npm_and_yarn/javascript/esbuild-0.21.4 branch June 5, 2024 23:33
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.

1 participant