From f35ad8523ff9276493c5bec1e619f9d2cc584b59 Mon Sep 17 00:00:00 2001 From: Imron Rosadi Date: Thu, 6 Aug 2026 19:51:03 +0700 Subject: [PATCH] fix(build): sort locale metadata deterministically --- build/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build/index.js b/build/index.js index 4dd7708c2..96e8d986b 100644 --- a/build/index.js +++ b/build/index.js @@ -30,7 +30,11 @@ async function listLocaleJson(localeArr) { name: localeData.match(localeNameRegex)[1] }) })) - promisifyWriteFile(path.join(__dirname, '../locale.json'), JSON.stringify(localeListArr), 'utf8') + await promisifyWriteFile( + path.join(__dirname, '../locale.json'), + JSON.stringify(localeListArr.sort((a, b) => (a.key > b.key) - (a.key < b.key))), + 'utf8' + ) } (async () => {