Browse project docs

Migration from ldapjs

Evaluate and test migration from the deprecated ldapjs v2 package to the independent ldapjs-community fork.

On this page

The original ldapjs package and repository remain deprecated and archived. ldapjs-community is a separate project that describes itself as a community-maintained drop-in fork of ldapjs v2.

Link to Decide whether this migration fitsDecide whether this migration fits

Use the fork when all of these are true:

  • the application currently uses ldapjs v2;
  • retaining callback- and event-based APIs is valuable;
  • client or server behavior supplied by ldapjs v2 is still required; and
  • your team accepts the support model of an independent community project.

Do not use this path for ldapjs v3. For new client-only integrations, compare the project with alternatives described in What should you use instead of ldapjs?.

Link to Replace the packageReplace the package

For a direct npm dependency:

bash
npm install ldapjs@npm:ldapjs-community@^2.4.0

The alias means existing imports can remain:

javascript
const ldap = require('ldapjs')

For transitive dependencies, use the package-manager configuration in Installation.

Link to Verify the dependency graphVerify the dependency graph

bash
npm ls ldapjs ldapjs-community

Confirm the resolved dependency is the intended fork and that no unexpected ldapjs versions remain elsewhere in the graph.

Link to Exercise application behaviorExercise application behavior

Test the operations your application actually uses:

  1. successful and rejected binds;
  2. searches, paging, referrals, and result errors;
  3. add, modify, delete, compare, or modifyDN operations;
  4. reconnect and rebind behavior;
  5. LDAPS and StartTLS certificate validation;
  6. server routes and malformed client traffic, when using the server API; and
  7. clean unbind and process shutdown.

Review the fork's changelog, security policy, and open issues before deployment.

Link to Keep the projects distinctKeep the projects distinct

ldapjs-community does not change the status of the original project. Refer to Is ldapjs deprecated? for the original package's history and status; use this project area for the fork's installation and API documentation.