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
isEqualandisObjectfrom the library (they are still used internally). - Unified naming conventions across all diff:
getListDiff
- Renamed
newIndex→index - Renamed
prevIndex→previousIndex - Removed
indexDiff(it can be computed from index and previousIndex if needed) - Renamed the option
referenceProperty→referenceKey
diff: {
value: unknown;
- newIndex: number | null;
+ index: number | null;
- prevIndex: number | null;
+ previousIndex: number | null;
- indexDiff: number | null;
status: ListStatus;
}[];getStreamDiff:
- Renamed
currentValue→value - Renamed
newIndex→index - Renamed
prevIndex→previousIndex - 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
property→key - Renamed
currentValue→value
diff: {
- property: string;
+ key: string;
- currentValue: unknown;
+ value: unknown;
previousValue: unknown;
status: ObjectStatus;
diff?: Diff[];
};