From 994d9cd78e9815f9082c7b30f490e8352a5a1a2c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 22 Nov 2022 02:04:20 +0000 Subject: [PATCH 1/2] Update dependency kafkajs to v2.2.3 Signed-off-by: Renovate Bot --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 2793196219..f731819b41 100644 --- a/yarn.lock +++ b/yarn.lock @@ -26080,9 +26080,9 @@ __metadata: linkType: hard "kafkajs@npm:^2.0.0": - version: 2.1.0 - resolution: "kafkajs@npm:2.1.0" - checksum: b751b06f8005ac9ff192d98306f59c6ae018ce09acc0f959dfbfd4fbb4731fe7dfd42de0c3592d45a6b66b6d5caa40926673a02eb764b701c2953ea203ced60c + version: 2.2.3 + resolution: "kafkajs@npm:2.2.3" + checksum: 30f17de75da852942334b6069c5c515e2531a7b610997f0e4c6088281f16588df45ac920218411d9ae995c09af1f69186ed4d73cbe0e5f1247ec756dd9c7678e languageName: node linkType: hard From 0b54dbaf7dbe5050f39d0a432b1740978cad20e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Fri, 25 Nov 2022 14:00:13 +0100 Subject: [PATCH 2/2] fix the SaslConfig type to compile with the updated library MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- .changeset/healthy-crabs-collect.md | 5 +++++ plugins/kafka-backend/src/types/types.ts | 21 ++++++++++++++++----- 2 files changed, 21 insertions(+), 5 deletions(-) create mode 100644 .changeset/healthy-crabs-collect.md diff --git a/.changeset/healthy-crabs-collect.md b/.changeset/healthy-crabs-collect.md new file mode 100644 index 0000000000..5dc90f9b80 --- /dev/null +++ b/.changeset/healthy-crabs-collect.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-kafka-backend': patch +--- + +Internal tweak to adapt to `kafkajs` 2.2.3 diff --git a/plugins/kafka-backend/src/types/types.ts b/plugins/kafka-backend/src/types/types.ts index 1fb9701334..f5ffd6b6c7 100644 --- a/plugins/kafka-backend/src/types/types.ts +++ b/plugins/kafka-backend/src/types/types.ts @@ -25,8 +25,19 @@ export interface ClusterDetails { export type SslConfig = ConnectionOptions | boolean; -export type SaslConfig = { - mechanism: 'plain' | 'scram-sha-256' | 'scram-sha-512'; - username: string; - password: string; -}; +export type SaslConfig = + | { + mechanism: 'plain'; + username: string; + password: string; + } + | { + mechanism: 'scram-sha-256'; + username: string; + password: string; + } + | { + mechanism: 'scram-sha-512'; + username: string; + password: string; + };