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

Update dependency esbuild to v0.18.8 #265

Merged
merged 1 commit into from
Jun 25, 2023
Merged

Update dependency esbuild to v0.18.8 #265

merged 1 commit into from
Jun 25, 2023

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jun 25, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
esbuild 0.18.7 -> 0.18.8 age adoption passing confidence

Release Notes

evanw/esbuild

v0.18.8

Compare Source

  • Implement transforming async generator functions (#​2780)

    With this release, esbuild will now transform async generator functions into normal generator functions when the configured target environment doesn't support them. These functions behave similar to normal generator functions except that they use the Symbol.asyncIterator interface instead of the Symbol.iterator interface and the iteration methods return promises. Here's an example (helper functions are omitted):

    // Original code
    async function* foo() {
      yield Promise.resolve(1)
      await new Promise(r => setTimeout(r, 100))
      yield *[Promise.resolve(2)]
    }
    async function bar() {
      for await (const x of foo()) {
        console.log(x)
      }
    }
    bar()
    
    // New output (with --target=es6)
    function foo() {
      return __asyncGenerator(this, null, function* () {
        yield Promise.resolve(1);
        yield new __await(new Promise((r) => setTimeout(r, 100)));
        yield* __yieldStar([Promise.resolve(2)]);
      });
    }
    function bar() {
      return __async(this, null, function* () {
        try {
          for (var iter = __forAwait(foo()), more, temp, error; more = !(temp = yield iter.next()).done; more = false) {
            const x = temp.value;
            console.log(x);
          }
        } catch (temp) {
          error = [temp];
        } finally {
          try {
            more && (temp = iter.return) && (yield temp.call(iter));
          } finally {
            if (error)
              throw error[0];
          }
        }
      });
    }
    bar();

    This is an older feature that was added to JavaScript in ES2018 but I didn't implement the transformation then because it's a rarely-used feature. Note that esbuild already added support for transforming for await loops (the other part of the asynchronous iteration proposal) a year ago, so support for asynchronous iteration should now be complete.

    I have never used this feature myself and code that uses this feature is hard to come by, so this transformation has not yet been tested on real-world code. If you do write code that uses this feature, please let me know if esbuild's async generator transformation doesn't work with your code.


Configuration

📅 Schedule: Branch creation - "after 10pm every weekday,before 5am every weekday,every weekend" (UTC), 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.


  • 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 merged commit 70e103e into main Jun 25, 2023
1 check passed
@renovate renovate bot deleted the renovate/all branch June 25, 2023 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

0 participants