@vouchington/localization 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tables.mjs +4 -1
- package/package.json +1 -1
package/dist/tables.mjs
CHANGED
|
@@ -56,7 +56,10 @@ export function catalogFromMessages(messages) {
|
|
|
56
56
|
return { copies, aliases, translations };
|
|
57
57
|
}
|
|
58
58
|
export function serializeCatalogTable(rows) {
|
|
59
|
-
|
|
59
|
+
const sorted = [...rows].toSorted((a, b) => compareCodePoints(rowKey(a), rowKey(b)));
|
|
60
|
+
if (sorted.length === 0)
|
|
61
|
+
return '[]\n';
|
|
62
|
+
return `[\n${sorted.map(canonicalJson).join(',\n')}\n]\n`;
|
|
60
63
|
}
|
|
61
64
|
function rowKey(value) {
|
|
62
65
|
if (!object(value))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vouchington/localization",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Browser-safe localization catalog contracts, locale fallback, and selector validation.",
|
|
5
5
|
"homepage": "https://github.com/vouchington/vouchington-platform/tree/main/packages/localization#readme",
|
|
6
6
|
"bugs": {
|