bitcoinvsalts / node-binance-trader

💰 Cryptocurrency Trading Strategy & Portfolio Management Development Framework for Binance. 🤖
https://bitcoinvsalts.com
MIT License
1.16k stars 381 forks source link

chore(deps): update dependency set-interval-async to v2 #102

Closed renovate[bot] closed 3 years ago

renovate[bot] commented 3 years ago

WhiteSource Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
set-interval-async 1.0.34 -> 2.0.0 age adoption passing confidence

Release Notes

ealmansi/set-interval-async ### [`v2.0.0`](https://togithub.com/ealmansi/set-interval-async/releases/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: ```javascript 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: ```javascript 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. }); ```

Renovate configuration

:date: Schedule: At any time (no schedule defined).

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

:recycle: Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

:no_bell: Ignore: Close this PR and you won't be reminded about this update again.



This PR has been generated by WhiteSource Renovate. View repository job log here.