-
Notifications
You must be signed in to change notification settings - Fork 1
refactor: rename itemA/itemB to source/target #44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Jun 4, 2025
Contributor
Author
a6023b6 to
ee95377
Compare
d022678 to
5c829d6
Compare
ee95377 to
30d5dc1
Compare
5c829d6 to
e8850b4
Compare
30d5dc1 to
9a6d1b2
Compare
e8850b4 to
e763f90
Compare
9a6d1b2 to
e226529
Compare
e763f90 to
3c0b6a7
Compare
e226529 to
5e84e17
Compare
rexxars
approved these changes
Jun 9, 2025
0c5fd70 to
5fe4030
Compare
5e84e17 to
86994be
Compare
5fe4030 to
b367cbd
Compare
86994be to
f825413
Compare
Standardize parameter naming across all diff functions for better semantic clarity and consistency. - Update diffPatch, diffItem, diffObject, and diffArray functions - Rename itemA/itemB to source/target throughout codebase - Update error messages and comments to reflect new naming - Improve code readability with more descriptive parameter names
f825413 to
3749d93
Compare
Contributor
Author
Merge activity
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

This PR performs a straightforward but important refactoring throughout the codebase: renaming the parameters
itemAanditemBtosourceandtargetrespectively.This change applies to:
diffPatchfunction.diffItem,diffObject,diffArray,diffArrayByIndex, andgetDiffMatchPatch(where applicable, though some parts ofgetDiffMatchPatchalready used source/target).Key Changes:
diffPatch(itemA, itemB, ...)is nowdiffPatch(source, target, ...).diffItem(itemA, itemB, ...)is nowdiffItem(source, target, ...).diffObjectanddiffArray.getDiffMatchPatchalready usedsource/target, but internal variable names likeitemA/itemBwere updated where they existed.@paramtags updated to reflect the new names (e.g.,@param source - The first document/tree to compare)._id on source and target not present or differs....Rationale:
sourceandtargetare more descriptive and standard terms for diffing operations, clearly indicating the initial state and the desired final state.This is primarily a cosmetic and semantic improvement that enhances code clarity and maintainability without altering the core diffing logic. All tests continue to pass.