We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3cf50b2 commit a8e21a7Copy full SHA for a8e21a7
1 file changed
scripts/play.ts
@@ -1,6 +1,6 @@
1
import mri from "mri";
2
import chalk from "chalk";
3
-import { fileURLToPath } from "node:url";
+import { fileURLToPath, pathToFileURL } from "node:url";
4
import * as fs from "node:fs/promises";
5
import * as fsSync from "node:fs";
6
import * as crypto from "node:crypto";
@@ -475,8 +475,8 @@ async function getLastModifiedEntryName(
475
476
return entries.sort((a, b) => {
477
return (
478
- fsSync.statSync(new URL(b.name, dir)).mtimeMs -
479
- fsSync.statSync(new URL(a.name, dir)).mtimeMs
+ fsSync.statSync(new URL(b.name, pathToFileURL(b.path))).mtimeMs -
+ fsSync.statSync(new URL(a.name, pathToFileURL(a.path))).mtimeMs
480
);
481
})[0].name;
482
}
0 commit comments