HAP-NodeJS icon indicating copy to clipboard operation
HAP-NodeJS copied to clipboard

node-persist is outdated and using deprecated 'q' module

Open n0rt0nthec4t opened this issue 11 months ago • 5 comments

Analysis

node-persist library using being pinned at 0.0.12 uses a deprecated library, 'q'

npm warn deprecated [email protected]: You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.
npm warn deprecated
npm warn deprecated (For a CapTP with native promises, see @endo/eventual-send and @endo/captp)
  └─┬ [email protected]
    └─┬ [email protected]
      └── [email protected]

Expected Behavior

node-persist is current at v4 and nolonger relies on this deprecated model

node-persist would need updating

Steps To Reproduce

install hap-nodejs npm install hap-nodejs

Logs

npm warn deprecated [email protected]: You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.
npm warn deprecated
npm warn deprecated (For a CapTP with native promises, see @endo/eventual-send and @endo/captp)

Configuration

..

Environment

  • OS: rpm bookworm
  • Software: hap-nodejs 1.1.1
  • Node: 22.15.0
  • npm: 10.9.2

Process Supervisor

hb-service

Additional Context

No response

n0rt0nthec4t avatar Apr 30 '25 01:04 n0rt0nthec4t

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar May 30 '25 11:05 github-actions[bot]

Not stale.

n0rt0nthec4t avatar May 31 '25 00:05 n0rt0nthec4t

The more recent versions of node-persist use a different algorithm to generate file names, so this would not be an easy update.

There is also code in config-ui-x that relies on the old file name formats, i mean, it would be pretty disastrous to just update this dependency without a lot of prep work and migrations etc.

bwp91 avatar Jun 01 '25 12:06 bwp91

Perhaps there is middle ground where we can use a version of node-persist that doesn’t use the depreciated Q module but still maintains the file name format in use for hap.

n0rt0nthec4t avatar Jun 01 '25 21:06 n0rt0nthec4t

Even v1 changed the key format by using a base64 implementation.

https://github.com/simonlast/node-persist#100

bwp91 avatar Jun 01 '25 21:06 bwp91

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Jul 02 '25 11:07 github-actions[bot]

This issue has been closed as no further activity has occurred.

github-actions[bot] avatar Jul 07 '25 11:07 github-actions[bot]