@supawatch/target-schema-lock 0.13.0 → 0.14.1

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.
Files changed (2) hide show
  1. package/dist/index.js +10 -1
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -19,7 +19,16 @@ function canonical(value) {
19
19
  return value;
20
20
  }
21
21
  function sortByName(xs) {
22
- return [...xs].sort((a, b) => `${a.schema ?? ""}.${a.name}`.localeCompare(`${b.schema ?? ""}.${b.name}`));
22
+ // Code point order, never localeCompare: this file is committed and
23
+ // byte-compared, and ICU collation differs by locale and by build.
24
+ // Measured: en-US sorts "a A_b a-b ab z Z", sv-SE sorts "A_b a-b ab z
25
+ // Z a", so two developers would see spurious drift on an identical
26
+ // schema.
27
+ return [...xs].sort((a, b) => {
28
+ const ka = `${a.schema ?? ""}.${a.name}`;
29
+ const kb = `${b.schema ?? ""}.${b.name}`;
30
+ return ka < kb ? -1 : ka > kb ? 1 : 0;
31
+ });
23
32
  }
24
33
  export class SchemaLockTarget {
25
34
  name = "schema-lock";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supawatch/target-schema-lock",
3
- "version": "0.13.0",
3
+ "version": "0.14.1",
4
4
  "description": "A canonical committed schema lockfile from supawatch, turning pull-request diffs into schema changelogs.",
5
5
  "keywords": [
6
6
  "supabase",
@@ -33,7 +33,7 @@
33
33
  "dist"
34
34
  ],
35
35
  "dependencies": {
36
- "@supawatch/core": "0.13.0"
36
+ "@supawatch/core": "0.14.1"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/node": "^22.20.1",