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:
+4
-4
@@ -251,11 +251,11 @@ async function render(entries, options) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function getLatest(patterns) {
|
async function getLatest(patterns) {
|
||||||
const stats = await globby(patterns, {stats: true});
|
const infoList = await globby(patterns, {stats: true});
|
||||||
let latest = 0;
|
let latest = 0;
|
||||||
for (const stat of stats) {
|
for (const info of infoList) {
|
||||||
if (stat.mtime > latest) {
|
if (info.stats.mtime > latest) {
|
||||||
latest = stat.mtime;
|
latest = info.stats.mtime;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return latest;
|
return latest;
|
||||||
|
|||||||
Reference in New Issue
Block a user