From 5de3c259e6d3320a837d293aafaa07cb71cfcd7a Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 31 Oct 2025 10:43:10 +0100 Subject: [PATCH] test --- packages/docusaurus-utils/src/gitUtils.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/docusaurus-utils/src/gitUtils.ts b/packages/docusaurus-utils/src/gitUtils.ts index d18b71bc09..a7d8a10962 100644 --- a/packages/docusaurus-utils/src/gitUtils.ts +++ b/packages/docusaurus-utils/src/gitUtils.ts @@ -193,6 +193,12 @@ export async function getFileCommitDate( // Test if (!output) { + console.log('NO GIT OUTPUT', file); + /* + throw new FileNotTrackedError( + `Failed to retrieve the git history for file "${file}" because the file is not tracked by git.`, + ); + */ return { date: new Date(), timestamp: Date.now(), @@ -203,6 +209,8 @@ export async function getFileCommitDate( const match = output.match(regex); if (!match) { + console.log('NO GIT MATCH', file); + return { date: new Date(), timestamp: Date.now(), @@ -210,6 +218,8 @@ export async function getFileCommitDate( }; } + console.log('GIT MATCH', file, match.groups!.timestamp, match.groups!.author); + const timestampInSeconds = Number(match.groups!.timestamp); const timestamp = timestampInSeconds * 1_000; const date = new Date(timestamp);