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: bump set-interval-async from 1.0.34 to 2.0.1 #2132

Merged

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Apr 12, 2021

Bumps set-interval-async from 1.0.34 to 2.0.1.

Release notes

Sourced from set-interval-async's releases.

Relese Notes: v2.0.0

Breaking changes

Error handling

Errors thrown by the handler function passed in to setIntervalAsync are no longer hidden (swallowed). This will allow users of this library to more easily detect and handle failure within their handlers, which will now raise an UnhandledPromiseRejectionWarning if not handled by the application itself. If you wish to fall back to the previous behaviour, you may simply wrap your handlers in the following way:

setIntervalAsync(async () => {
  try {
    await handler();  // the previous handler function which could potentially fail
  } catch (err) {
    console.error(err);
  }
}, someInterval);
// or similarly,
setIntervalAsync(() => {
return Promise.resolve(handler()).catch((err) => console.error(err));
}, someInterval);

Bug fixes

Awaiting clearIntervalAsync

While clearIntervalAsync was still correctly clearing the execution interval, a bug in version v1.x.x was causing the promise returned by the function to be resolved prematurely before the interval was fully stopped. This bug has now been fixed, which means the following code should work as expected:

it('should test something', async () => {
  const timer = setIntervalAsync(...);
  // Some assertions.
  await clearIntervalAsync(timer);
  // At this point, the interval has been cleared and all executions
  // are guaranteed to have fully finished.
});
Commits

Dependabot compatibility score

You can trigger a rebase of this PR 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 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)

@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Apr 12, 2021
@dependabot dependabot bot requested a review from a team April 12, 2021 19:01
@cindyorangis
Copy link
Contributor

@dependabot rebase

@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/set-interval-async-2.0.1 branch from 3f03441 to 8600764 Compare April 12, 2021 23:12
@cindyorangis
Copy link
Contributor

@dependabot rebase

@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/set-interval-async-2.0.1 branch from 8600764 to 930964e Compare April 15, 2021 00:40
@manekenpix
Copy link
Member

@dependabot rebase

@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/set-interval-async-2.0.1 branch from 930964e to fc25c5b Compare April 18, 2021 22:13
@manekenpix
Copy link
Member

@dependabot rebase

@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/set-interval-async-2.0.1 branch from fc25c5b to dccac86 Compare April 18, 2021 22:42
@chrispinkney
Copy link
Contributor

We triggered set-interval-async in both the spots they're used (wiki-feed-parser.js, indexer.js). Both behaved as they should.

@chrispinkney chrispinkney added this to the 2.0 Release milestone Apr 18, 2021
@chrispinkney chrispinkney merged commit 9552b7f into master Apr 18, 2021
@chrispinkney chrispinkney deleted the dependabot/npm_and_yarn/set-interval-async-2.0.1 branch April 18, 2021 22:51
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants