Skip to content

Commit

Permalink
style: Sort using String.localeCompare().
Browse files Browse the repository at this point in the history
  • Loading branch information
vxern committed Oct 18, 2024
1 parent 73cb680 commit 1227b5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/runners/migrator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ async function rollback({
type AvailableMigrations = Record<string, string>;
async function getAvailableMigrations(): Promise<AvailableMigrations> {
const migrationFilenames = await Array.fromAsync(new Bun.Glob("*.ts").scan(constants.directories.migrations)).then(
(filenames) => filenames.toSorted(),
(filenames) => filenames.toSorted((a, b) => a.localeCompare(b, "en", { sensitivity: "base" })),
);

return Object.fromEntries(migrationFilenames.map((filename) => [filename.split("_").at(0)!, filename]));
Expand Down

0 comments on commit 1227b5f

Please sign in to comment.