From 70cc6c458e08fdd07314ecfd8e5019ca9cf303e7 Mon Sep 17 00:00:00 2001 From: Antonio Ereiz Date: Fri, 21 Jul 2023 20:53:38 +0200 Subject: [PATCH 1/2] send copy of options instead of original Signed-off-by: Antonio Ereiz --- plugins/linguist-backend/src/api/LinguistBackendClient.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/linguist-backend/src/api/LinguistBackendClient.ts b/plugins/linguist-backend/src/api/LinguistBackendClient.ts index 53da0bee22..1be4a7d288 100644 --- a/plugins/linguist-backend/src/api/LinguistBackendClient.ts +++ b/plugins/linguist-backend/src/api/LinguistBackendClient.ts @@ -261,7 +261,7 @@ export class LinguistBackendClient implements LinguistBackendApi { /** @internal */ async getLinguistResults(dir: string): Promise { - const results = await linguist(dir, this.linguistJsOptions); + const results = await linguist(dir, { ...this.linguistJsOptions }); return results; } } From ca5e591cb86aacc98f16cdcbd40831de72533325 Mon Sep 17 00:00:00 2001 From: Antonio Ereiz Date: Fri, 21 Jul 2023 21:02:06 +0200 Subject: [PATCH 2/2] changeset Signed-off-by: Antonio Ereiz --- .changeset/large-experts-poke.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/large-experts-poke.md diff --git a/.changeset/large-experts-poke.md b/.changeset/large-experts-poke.md new file mode 100644 index 0000000000..9f6ca640b6 --- /dev/null +++ b/.changeset/large-experts-poke.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-linguist-backend': patch +--- + +Fixed bug in LinguistBackendClient.ts file where if the linguistJsOptions is specified and sent over to the linguist-js package it would get changed (another attribute would be added) causing future entities of the batch to fail with an error