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(deps): update dependency set-interval-async to v3 #121

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link

@renovate renovate bot commented Nov 14, 2023

Mend Renovate logo banner

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
set-interval-async ^1.0.33 -> ^3.0.3 age adoption passing confidence

Release Notes

ealmansi/set-interval-async (set-interval-async)

v3.0.3

Compare Source

What's Changed

v3.0.2

Compare Source

What's Changed

v3.0.1

Compare Source

What's Changed

  • Fixed various issues around package distribution (in CommonJs, ES Modules, bundlers, browsers).
  • Improved documentation.
  • Types are included directly in the package, since the library is now implemented in Typescript.

Breaking Changes

  • "Legacy" flavour/strategy removed.

Full Changelog: ealmansi/set-interval-async@v2.0.3...v3.0.1

v3.0.0

Compare Source

v2.0.3: Relese Notes: v2.0.3

Compare Source

Bug fixes:

  • Fixes error "Expected an instance of SetIntervalAsyncTimer" while calling clearIntervalAsync with a valid timer.

v2.0.2

Compare Source

v2.0.1

Compare Source

v2.0.0: 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.
});

Configuration

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

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

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.

@jefrydco jefrydco closed this Nov 16, 2023
Copy link
Author

renovate bot commented Nov 16, 2023

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update. You will not get PRs for any future 3.x releases. But if you manually upgrade to 3.x then Renovate will re-enable minor and patch updates automatically.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.

@renovate renovate bot deleted the renovate/set-interval-async-3.x branch November 16, 2023 09:25
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.

1 participant