Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 4 additions & 2 deletions scripts/json-files-script.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ function getDirNames(directory) {
return fs.readdirSync(directory, { withFileTypes: true })
// Filter out only the directories from the list of files and directories
.filter(dirent => dirent.isDirectory())
// Map the directory names to lowercase to standardise them
.map(dirent => dirent.name);
// Convert directory names to lowercase so the generated grouping stays consistent
.map(dirent => dirent.name.toLowerCase())
// Sort the names so the output is stable and easier to compare
.sort();
}

// ------------------------------------------------------------------------------
Expand Down