node-ldapjs
node-ldapjs copied to clipboard
Wrong event names after uglify-ing the code
I have an issue with the ldap client.
In one of my build step, the javascript code gets uglyfied. In that step, functions getting renamed etc. Normally that's not a problem, but because the event name in the client is generated off of the message name, a wrong event will be raised.
I think instead of getting the name from msg.constructor.name
, getting it with msg.type
would fix the problem.
I'll create a PR with my solution.
Hi, I can confirm this is a problem. I spent many hours debugging my code that did not work when it was minified but worked fine without minifing.
The fix in #407 worked. Hope this gets merged soon. //Jonas
🔔 Ping @pfmooney 😊
I've also created pull request to fix this issue. https://github.com/joyent/node-ldapjs/pull/492
I am unclear why one would even need to minify/uglify this library. The intention of this library is to be used in a Node.js environment. Minification does nothing in such an environment.
👋
On February 22, 2023, we released version 3 of this library. As a result, we are closing this issue/pull request.
Please see issue #839 for more information, including how to proceed if you feel this closure is in error.