Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Restore sorting behavior
  • Loading branch information
amcasey committed Jan 11, 2020
commit 490f736ccb501d58656da81ccd4b507026edcc67
4 changes: 2 additions & 2 deletions src/compiler/sys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1617,7 +1617,7 @@ namespace ts {
function getAccessibleFileSystemEntries(path: string): FileSystemEntries {
perfLogger.logEvent("ReadDir: " + (path || "."));
try {
const entries = _fs.readdirSync(path || ".", { withFileTypes: true }).sort();
const entries = _fs.readdirSync(path || ".", { withFileTypes: true });
const files: string[] = [];
const directories: string[] = [];
for (const entry of entries) {
Expand All @@ -1634,7 +1634,7 @@ namespace ts {
directories.push(entryName);
}
}
return { files, directories };
return { files: files.sort(), directories: directories.sort() };
}
catch (e) {
return emptyFileSystemEntries;
Expand Down