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

Updates to library for OH 4 #107

Merged
merged 16 commits into from
Aug 18, 2023
Merged

Updates to library for OH 4 #107

merged 16 commits into from
Aug 18, 2023

Conversation

rkoshak
Copy link
Owner

@rkoshak rkoshak commented Aug 17, 2023

Cleaning up the code to use OH 4 features, warn about deprecated stuff in logs, and remove unneeded stuff.

timeUtils:

  • added deprecation log warnings to deprecated functions
  • updated test to remove tests for deprecated functions.

timerMgr:

  • made noop private by changing the name from _noop to #noop
  • created a getTimerMgr function and export that as a factory. Use var tm = TimerMgr() instead of var tm = new timerMgr.TimerMgr() to instantiate a timer manager
  • added getTimerMgr to index.js as an export to TimerMgr and added a warning log when one requires timerMgr.
  • updated deferred.js to use the new factory function
  • updated test

testUtils:

  • added comments
  • reimplemented sleep to use java.lang.Thread instead of a busy wait loop

rulesUtils:

  • added warning log statements for deprecated functions.

rateLimit:

  • added a getRateLimit function to export . Use var rl = RateLimit() instead of var rl = new rateLimit.RateLimit() to instantiate

loopingTimer:

  • added a getLoopingTimer function to export. Use var lt = LoopingTimer() instead of var lt = new loopingTimer.LoopingTimer() to instantiate.

helpers:

  • use const for constants instead of let

gatekeeper:

  • made procCommandGenerator private by changing the _ to the #
  • added getGatekeeper function to export. Use var gk = Gatekeeper() instead of var gk = new gatekeeper.Gatekeeper() to instantiate.

deferred:

  • made timerBodyGenerator private by replacing _ with #
  • use time.toZDT() to get now
  • added getDeferred function to export. Use var d = Deferred() instead of var d = new deferred.Deferred() to instantiate.

countdownTimer:

  • mande updateItem and iterateGenerator private by replacing _ with #
    • added getCountdownTimer function to export. Use var ct = CountdownTimer() instead of var ct = new countdownTimer.CountdownTimer() to instantiate.

I'm going to let these changes sit for a few days in case there is a hidden new bug before merging.

Signed-off-by: Richard Koshak <rlkoshak@gmail.com>
rkoshak and others added 15 commits August 17, 2023 11:13
Signed-off-by: Richard Koshak <rlkoshak@gmail.com>
Signed-off-by: Richard Koshak <rlkoshak@gmail.com>
Signed-off-by: Richard Koshak <rlkoshak@gmail.com>
Signed-off-by: Richard Koshak <rlkoshak@gmail.com>
Signed-off-by: Richard Koshak <rlkoshak@gmail.com>
Signed-off-by: Richard Koshak <rlkoshak@gmail.com>
Signed-off-by: Richard Koshak <rlkoshak@gmail.com>
Signed-off-by: Richard Koshak <rlkoshak@gmail.com>
Signed-off-by: Richard Koshak <rlkoshak@gmail.com>
Signed-off-by: Richard Koshak <rlkoshak@gmail.com>
Signed-off-by: Richard Koshak <rlkoshak@gmail.com>
Moved minimum OHRT version o 2.0.3
Moved minimum OHRT version to 2.0.3
moved minimum OHRT version 2.0.3
bumping npm version number
@rkoshak rkoshak merged commit 31285c4 into main Aug 18, 2023
@rkoshak rkoshak deleted the oh4Updates branch August 18, 2023 17:53
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