@series-inc/rundot-syncplay 6.0.0-rc.45 → 6.0.0-rc.46

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.
@@ -23,7 +23,7 @@ export const physicsProfileWasmMetadata = Object.freeze({
23
23
  "sourceHash": "095061366ce3734601d06d48fa61d88a8538e1ba01e9c47663a7303ddb18fee7",
24
24
  "wasmSha256": "4b2ac3ff7d0f7a15eb31f5742a90f16f458a906d5d41bdc5fbde03e5589f94bf",
25
25
  "artifact": "profile",
26
- "packageVersion": "6.0.0-rc.45",
26
+ "packageVersion": "6.0.0-rc.46",
27
27
  "compilerFlags": [
28
28
  "-std=c++20",
29
29
  "-O3",
@@ -23,7 +23,7 @@ export const physicsWasmMetadata = Object.freeze({
23
23
  "sourceHash": "38d5f2cde9e8d448f029fd2921a743e4a40e19dc84c03abf7bed829003e2469d",
24
24
  "wasmSha256": "5f6a3d861cf3eb79a2f8060d6c4b5512673a943044a52a9d20b39f0f2fef985f",
25
25
  "artifact": "production",
26
- "packageVersion": "6.0.0-rc.45",
26
+ "packageVersion": "6.0.0-rc.46",
27
27
  "compilerFlags": [
28
28
  "-std=c++20",
29
29
  "-O3",
@@ -50,7 +50,7 @@ export const physics2dWasmMetadata = Object.freeze({
50
50
  "sourceHash": "faa090a03a6fddaf79c704fb1d76f810955ff35597449c8cec9541a75905a37e",
51
51
  "wasmSha256": "49cb90541deed40f5fff1015bb578e13ec9a793d51931c1227e3e5a11bbfa3f7",
52
52
  "artifact": "production",
53
- "packageVersion": "6.0.0-rc.45",
53
+ "packageVersion": "6.0.0-rc.46",
54
54
  "compilerFlags": [
55
55
  "-std=c++20",
56
56
  "-O3",
package/dist/canonical.js CHANGED
@@ -174,7 +174,7 @@ function canonicalizeValue(value, seen) {
174
174
  });
175
175
  }
176
176
  const result = {};
177
- for (const key of Object.keys(record).sort(compareUniqueStrings)) {
177
+ for (const key of canonicalKeys(record)) {
178
178
  result[key] = canonicalizeValue(record[key], seen);
179
179
  }
180
180
  seen.delete(value);
@@ -221,11 +221,21 @@ function decodeCanonical(value) {
221
221
  }
222
222
  }
223
223
  const result = {};
224
- for (const key of Object.keys(record).sort(compareUniqueStrings)) {
224
+ for (const key of canonicalKeys(record)) {
225
225
  result[key] = decodeCanonical(record[key]);
226
226
  }
227
227
  return result;
228
228
  }
229
+ function canonicalKeys(record) {
230
+ // rdm-ignore-next-line determinism/no-object-key-order: adjacent scan and exact comparator fallback establish canonical order
231
+ const keys = Object.keys(record);
232
+ for (let index = 1; index < keys.length; index += 1) {
233
+ if (keys[index - 1] > keys[index]) {
234
+ return keys.sort(compareUniqueStrings);
235
+ }
236
+ }
237
+ return keys;
238
+ }
229
239
  function compareUniqueStrings(left, right) {
230
240
  return left < right ? -1 : 1;
231
241
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@series-inc/rundot-syncplay",
3
- "version": "6.0.0-rc.45",
3
+ "version": "6.0.0-rc.46",
4
4
  "description": "Kinetix orchestration, rollback, replay, late-join, and deterministic networking for RUN.game",
5
5
  "repository": {
6
6
  "type": "git",