From 6807f0ad6777f9c99a7a44f4687557b905b780d9 Mon Sep 17 00:00:00 2001 From: Shamil Ganiev Date: Wed, 8 Oct 2025 18:13:22 +0300 Subject: [PATCH] feat: update changeset with catalog-backend-module-ldap breaking changes Signed-off-by: Shamil Ganiev --- .changeset/heavy-cars-wash.md | 67 ++++++++++++++++++++++++++++++++++- yarn.lock | 8 ++--- 2 files changed, 70 insertions(+), 5 deletions(-) diff --git a/.changeset/heavy-cars-wash.md b/.changeset/heavy-cars-wash.md index d8c7da31fe..87da5a6d95 100644 --- a/.changeset/heavy-cars-wash.md +++ b/.changeset/heavy-cars-wash.md @@ -1,5 +1,70 @@ --- -'@backstage/plugin-catalog-backend-module-ldap': major +'@backstage/plugin-catalog-backend-module-ldap': minor --- Moved from `ldapjs` dependency to `ldapts` + +### Breaking Changes + +**Type Migration** + +Custom transformers must now accept `Entry` from ldapts instead of `SearchEntry` +from ldapjs The Entry type provides direct property access without need for +`.object()` or `.raw()` methods. + +If you have custom user or group transformers, update the signature from: + +```typescript +(vendor: LdapVendor, config: UserConfig, entry: SearchEntry) => + Promise; +``` + +to + +```typescript +(vendor: LdapVendor, config: UserConfig, entry: Entry) => + Promise; +``` + +**Search Options** + +Updated LDAP search configuration `typesOnly: false` → `attributeValues: true` +This inverts the boolean logic: ldapjs used negative form while ldapts uses +positive form. Both achieve the same result: retrieving attribute values rather +than just attribute names. + +Update LDAP search options in configuration from + +```yaml +options: + typesOnly: false +``` + +to + +```yaml +options: + attributeValues: true +``` + +**API Changes** Removed `LdapClient.searchStreaming()` method. Users should +migrate to `LdapClient.search()` instead + +If you're using `searchStreaming` directly: + +```typescript +// Before +await client.searchStreaming(dn, options, async entry => { + // process each entry +}); + +// After +const entries = await client.search(dn, options); +for (const entry of entries) { + // process each entry +} +``` + +> **_NOTE:_**: Both methods have always loaded all entries into memory. The +> searchStreaming method was only needed internally to handle ldapjs's +> event-based API. diff --git a/yarn.lock b/yarn.lock index 62fa944413..555f69d858 100644 --- a/yarn.lock +++ b/yarn.lock @@ -28091,15 +28091,15 @@ __metadata: languageName: node linkType: hard -"debug@npm:4, debug@npm:^4, debug@npm:^4.0.0, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4, debug@npm:^4.3.5, debug@npm:^4.3.6, debug@npm:^4.4.0": - version: 4.4.0 - resolution: "debug@npm:4.4.0" +"debug@npm:4, debug@npm:4.4.1, debug@npm:^4, debug@npm:^4.0.0, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4, debug@npm:^4.3.5, debug@npm:^4.3.6, debug@npm:^4.4.0": + version: 4.4.1 + resolution: "debug@npm:4.4.1" dependencies: ms: "npm:^2.1.3" peerDependenciesMeta: supports-color: optional: true - checksum: 10/1847944c2e3c2c732514b93d11886575625686056cd765336212dc15de2d2b29612b6cd80e1afba767bb8e1803b778caf9973e98169ef1a24a7a7009e1820367 + checksum: 10/8e2709b2144f03c7950f8804d01ccb3786373df01e406a0f66928e47001cf2d336cbed9ee137261d4f90d68d8679468c755e3548ed83ddacdc82b194d2468afe languageName: node linkType: hard