Skip to content

v4.0.0

Latest

Choose a tag to compare

@github-actions github-actions released this 19 Jan 20:06

BREAKING CHANGES

👉 These changes improve the developer experience by unifying naming conventions across all diff utilities and simplifying the output format. They are minimal and should require only small updates in your codebase.


  • Removed isEqual and isObject from the library (they are still used internally).
  • Unified naming conventions across all diff:

getListDiff

  • Renamed newIndexindex
  • Renamed prevIndexpreviousIndex
  • Removed indexDiff (it can be computed from index and previousIndex if needed)
  • Renamed the option referencePropertyreferenceKey
diff: {
    value: unknown;
-   newIndex: number | null;
+   index: number | null;
-   prevIndex: number | null;
+   previousIndex: number | null;
-   indexDiff: number | null;
    status: ListStatus;
  }[];

getStreamDiff:

  • Renamed currentValuevalue
  • Renamed newIndexindex
  • Renamed prevIndexpreviousIndex
  • Removed indexDiff (same reason as above)
diff: {
-   currentValue: unknown;
+   value: unknown;
-   newIndex: number | null;
+   index: number | null;
-   prevIndex: number | null;
+   previousIndex: number | null;
-   indexDiff: number | null;
    status: ListStatus;
  }[];

getObjectDiff:

  • Renamed propertykey
  • Renamed currentValuevalue
diff: {
-  property: string;
+  key: string;
-  currentValue: unknown;
+  value: unknown;
   previousValue: unknown;
   status: ObjectStatus;
   diff?: Diff[];
 };