The upstream project recommends package-manager aliasing so existing application and dependency imports continue to resolve ldapjs.
Confirm the installed major first
The fork targets ldapjs v2. Do not apply these replacements to an application using ldapjs v3.
Link to Direct npm dependencyDirect npm dependency
npm install ldapjs@npm:ldapjs-community@^2.4.0
Your source continues to use the original module name:
const ldap = require('ldapjs')
Link to Transitive npm dependencyTransitive npm dependency
When another package depends on ldapjs, add an override to the root package.json:
{
"overrides": {
"ldapjs": "npm:ldapjs-community@^2.4.0"
}
}
Reinstall dependencies and inspect the resolved tree with npm ls ldapjs.
Link to YarnYarn
{
"resolutions": {
"ldapjs": "npm:ldapjs-community@^2.4.0"
}
}
Link to pnpm 11 and newerpnpm 11 and newer
overrides:
ldapjs: npm:ldapjs-community@^2.4.0
For pnpm 10 and earlier, use the root package manifest:
{
"pnpm": {
"overrides": {
"ldapjs": "npm:ldapjs-community@^2.4.0"
}
}
}
Link to Verify and testVerify and test
Commit the updated lockfile, verify only the intended versions changed, and exercise bind, search, error, reconnection, TLS, and shutdown behavior used by your application. Package replacement reduces source changes; it does not replace application testing.