Skip to content

reproductible patch #3163

Description

@bastien-roucaries

From debian could you apply this patch

It keep locale filesystem order independant:

diff --git a/build/index.js b/build/index.js
index 4dd7708..c711ed6 100644
--- a/build/index.js
+++ b/build/index.js
@@ -30,7 +30,16 @@ async function listLocaleJson(localeArr) {
       name: localeData.match(localeNameRegex)[1]
     })
   }))
-  promisifyWriteFile(path.join(__dirname, '../locale.json'), JSON.stringify(localeListArr), 'utf8')
+  const out = localeListArr.sort((a, b) => {
+    if (a.key < b.key) return -1;
+    if (a.key > b.key) return 1;
+    return 0;
+  });
+  promisifyWriteFile(
+      path.join(__dirname, '../locale.json'),
+      JSON.stringify(out, null, 2) + '\n',
+      'utf8'
+  );
 }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions