Skip to content

fix(build): sort locale metadata deterministically - #3171

Open
irosadie wants to merge 1 commit into
iamkun:devfrom
irosadie:fix/issue-3163-deterministic-locale-json
Open

fix(build): sort locale metadata deterministically#3171
irosadie wants to merge 1 commit into
iamkun:devfrom
irosadie:fix/issue-3163-deterministic-locale-json

Conversation

@irosadie

@irosadie irosadie commented Aug 6, 2026

Copy link
Copy Markdown

Fixes #3163

Sort locale metadata by locale key before writing locale.json.

This makes the generated locale list independent of filesystem enumeration order and keeps build output reproducible.

Validation:

  • npm run lint
  • NODE_OPTIONS=--openssl-legacy-provider npm run build
  • 92 test suites passed
  • 766 tests passed

Copilot AI lite review requested due to automatic review settings August 6, 2026 12:53

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Ready to approve

The change is small, localized to build output generation, and deterministically sorts the locale list while properly awaiting the file write.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Pull request overview

This PR updates the build script that generates locale.json so locale metadata is written in a deterministic order, making the build output reproducible regardless of filesystem enumeration order.

Changes:

  • Sort the generated locale metadata array by locale key before serializing to JSON.
  • Await the writeFile operation to ensure locale.json is fully written before the build script continues/exits.
File summaries
File Description
build/index.js Sorts locale entries deterministically and awaits the write to make locale.json generation reproducible.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

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.

reproductible patch

2 participants