@sanity/mutator 4.14.3-next.8 → 4.15.0-next.11

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/lib/index.js CHANGED
@@ -257,7 +257,7 @@ class Tokenizer {
257
257
  const number = this.takeWhile((char) => char === "." && !dotSeen && digitSeen ? (dotSeen = !0, char) : (digitSeen = !0, char.match(digitChar) ? char : null));
258
258
  return number !== null ? {
259
259
  type: "number",
260
- value: negative ? -number : +number,
260
+ value: negative ? -Number(number) : +number,
261
261
  raw: negative ? `-${number}` : number
262
262
  } : (this.i = start, null);
263
263
  }
@@ -977,7 +977,7 @@ function targetsToIndicies(targets, accessor) {
977
977
  const result = [];
978
978
  return targets.forEach((target) => {
979
979
  target.isIndexReference() && result.push(...target.toIndicies(accessor));
980
- }), result.sort();
980
+ }), result.sort((a, b) => a - b);
981
981
  }
982
982
  class InsertPatch {
983
983
  location;