Skip to content

fix: use stable locale for natural sort - #55

Merged
thetutlage merged 1 commit into
poppinss:7.xfrom
RomainForks:fix/natural-sort-locale
Sep 23, 2026
Merged

thetutlage merged 1 commit into
poppinss:7.xfrom
RomainForks:fix/natural-sort-locale

Conversation

@RomainLanz

Copy link
Copy Markdown
Member

Hey! 👋

Generated files sorted with naturalSort can get a different order depending on the operating system's locale. This creates unrelated diffs when teams regenerate and commit those files.

The default comparator now uses English, so its ordering stays stable across machines. Use createNaturalSort({ locale }) when you need a different locale, such as Czech.

Validation passed with npm test (191 tests), npm run typecheck, and npm run compile.

Related to adonisjs/assembler#111

@thetutlage
thetutlage merged commit 335b744 into poppinss:7.x Sep 23, 2026
6 checks passed
@RomainLanz
RomainLanz deleted the fix/natural-sort-locale branch September 23, 2026 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants