Update to work with globby@10
With the globby v10 release, the shape of the file info object changed when requesting stats. See https://github.com/mrmlnc/fast-glob#stats for details.
This commit is contained in:
@@ -251,11 +251,11 @@ async function render(entries, options) {
|
||||
}
|
||||
|
||||
async function getLatest(patterns) {
|
||||
const stats = await globby(patterns, {stats: true});
|
||||
const infoList = await globby(patterns, {stats: true});
|
||||
let latest = 0;
|
||||
for (const stat of stats) {
|
||||
if (stat.mtime > latest) {
|
||||
latest = stat.mtime;
|
||||
for (const info of infoList) {
|
||||
if (info.stats.mtime > latest) {
|
||||
latest = info.stats.mtime;
|
||||
}
|
||||
}
|
||||
return latest;
|
||||
|
||||
Reference in New Issue
Block a user