Noticing the following warning coming through from the memory/NeDB adaptor a lot after recent updates:
(node:53449) [DEP0174] DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake.
Enabling node --trace-deprecation warning, we get the following trace:
(node:53449) [DEP0174] DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake.
at node:internal/util:476:17
at new Promise (<anonymous>)
at Datastore.update (node:internal/util:461:12)
at MemoryDbAdapter.updateById (/Users/xxx/moleculer-db/packages/moleculer-db/src/memory-adapter.js:222:18)
at Object.<anonymous> (/Users/xxx/moleculer-db/packages/moleculer-db/test/unit/memory-adapter.spec.js:186:25)
at Promise.then.completed (/Users/xxx/moleculer-db/node_modules/@jest/core/node_modules/jest-circus/build/utils.js:391:28)
at new Promise (<anonymous>)
at callAsyncCircusFn (/Users/xxx/moleculer-db/node_modules/@jest/core/node_modules/jest-circus/build/utils.js:316:10)
at _callCircusTest (/Users/xxx/moleculer-db/node_modules/@jest/core/node_modules/jest-circus/build/run.js:218:40)
at processTicksAndRejections (node:internal/process/task_queues:105:5)
deprecation ref: https://nodejs.org/api/deprecations.html#dep0174-calling-promisify-on-a-function-that-returns-a-promise
A quick bisect suggests this was introduced with 82f1955
Node 22.20.0
MacOS 15.5
Reproduce
Run the memory adapter unit tests:
NODE_OPTIONS="--trace-deprecation" npm run test:unit packages/moleculer-db/test/unit/memory-adapter.spec.js
Noticing the following warning coming through from the memory/NeDB adaptor a lot after recent updates:
Enabling node
--trace-deprecationwarning, we get the following trace:deprecation ref: https://nodejs.org/api/deprecations.html#dep0174-calling-promisify-on-a-function-that-returns-a-promise
A quick bisect suggests this was introduced with 82f1955
Node 22.20.0
MacOS 15.5
Reproduce
Run the memory adapter unit tests:
NODE_OPTIONS="--trace-deprecation" npm run test:unit packages/moleculer-db/test/unit/memory-adapter.spec.js