perf: optimize getFileCommitDate, make it async (#9890)

This commit is contained in:
Sébastien Lorber 2024-02-24 23:32:18 +01:00 committed by GitHub
parent 0279c329ad
commit f159bb2472
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 54 additions and 34 deletions

View file

@ -258,10 +258,11 @@ async function processBlogSourceFile(
}
try {
const result = getFileCommitDate(blogSourceAbsolute, {
const result = await getFileCommitDate(blogSourceAbsolute, {
age: 'oldest',
includeAuthor: false,
});
return result.date;
} catch (err) {
logger.warn(err);