Description
- I am trying to upgrade from 0.14.32 to 0.14.33+
- I checked the documentation and found no answer
- I checked to make sure that this issue has not already been filed
- I'm reporting the issue to the correct repository
Current Behavior
In MoleculerJS version 0.14.33+, the call(next) middleware hook no longer has access to the this context. In previous versions (e.g., 0.14.32), this inside the call(next) hook referred to the broker instance, which was useful for accessing broker-level properties like nodeID or logging functionalities.
Upon investigation, it seems this regression may have been introduced by the changes in Pull Request #1270, which adjusted the context binding in certain hooks. While this change likely aimed to address other issues, it inadvertently broke access to this in the call(next) hook.
Expected Behavior
I can access broker using 'this' in a call(next) hook
Steps to Reproduce
Using this codesandbox : https://codesandbox.io/p/devbox/moleculer-sample-forked-p4hjmx
Switch between versions 0.14.32 and 0.14.33 in package.json, npm i
and see that with 0.14.32 it logs myNode
and with 0.14.33 it logs undefined
Activity