node-ldapjs icon indicating copy to clipboard operation
node-ldapjs copied to clipboard

Wrong event names after uglify-ing the code

Open strebl opened this issue 8 years ago • 4 comments

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.

strebl avatar Dec 06 '16 14:12 strebl

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

alvestjo avatar Jan 02 '17 09:01 alvestjo

🔔 Ping @pfmooney 😊

strebl avatar Jan 05 '17 19:01 strebl

I've also created pull request to fix this issue. https://github.com/joyent/node-ldapjs/pull/492

grogi avatar Oct 17 '18 11:10 grogi

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.

jsumners avatar Aug 25 '19 14:08 jsumners

👋

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.

jsumners avatar Feb 22 '23 19:02 jsumners