From 2a6946ff4258dc9a2a06030c374582aa7ecb0796 Mon Sep 17 00:00:00 2001 From: Amadeus Demarzi Date: Mon, 30 Mar 2026 15:58:39 -0700 Subject: [PATCH 1/2] hotfix: apply newFile lang override to FileDiffMetadata when parseDiffFromFile --- packages/diffs/src/utils/parseDiffFromFile.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/diffs/src/utils/parseDiffFromFile.ts b/packages/diffs/src/utils/parseDiffFromFile.ts index 6d7a1948c..c720a8377 100644 --- a/packages/diffs/src/utils/parseDiffFromFile.ts +++ b/packages/diffs/src/utils/parseDiffFromFile.ts @@ -43,5 +43,10 @@ export function parseDiffFromFile( 'parseDiffFrom: FileInvalid diff -- probably need to fix something -- if the files are the same maybe?' ); } + // If we've been provided an override for language in the newFile, lets pass + // it through to FileDiffMetadata. + if (newFile.lang != null) { + fileData.lang = newFile.lang; + } return fileData; } From 00e303ccdb5b137f2fc4bb8a29c74e3926e45d9c Mon Sep 17 00:00:00 2001 From: Amadeus Demarzi Date: Mon, 30 Mar 2026 16:08:54 -0700 Subject: [PATCH 2/2] Update packages/diffs/src/utils/parseDiffFromFile.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- packages/diffs/src/utils/parseDiffFromFile.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/diffs/src/utils/parseDiffFromFile.ts b/packages/diffs/src/utils/parseDiffFromFile.ts index c720a8377..dd5dc8f57 100644 --- a/packages/diffs/src/utils/parseDiffFromFile.ts +++ b/packages/diffs/src/utils/parseDiffFromFile.ts @@ -43,7 +43,7 @@ export function parseDiffFromFile( 'parseDiffFrom: FileInvalid diff -- probably need to fix something -- if the files are the same maybe?' ); } - // If we've been provided an override for language in the newFile, lets pass + // If we've been provided an override for language in the newFile, let’s pass // it through to FileDiffMetadata. if (newFile.lang != null) { fileData.lang = newFile.lang;