Skip to content

Add old value to changing difference #17

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
merged 3 commits into from
Dec 26, 2021
Merged

Add old value to changing difference #17

merged 3 commits into from
Dec 26, 2021

Conversation

denis-bel
Copy link
Contributor

Hello, for my project I really need to get old values when object have been changed (updated). It's long enough and inefficient to take old value from path. I think it will be great if you add old value from old object to difference when there are changes. Thank you!

@AsyncBanana
Copy link
Owner

Thanks for the PR! Two things:
First, I think the old value could be added to the REMOVE type, like how the new value is in the CREATE type.
Second, it would be helpful to add to the docs to reflect this in the PR. However, I can do that myself if you do not want to.
Other than that, it looks good!

@denis-bel
Copy link
Contributor Author

denis-bel commented Dec 15, 2021

Yes, adding old value to REMOVE type is awesome idea. I will add removed value and update docs within a few days.

Thanks for the PR! Two things: First, I think the old value could be added to the REMOVE type, like how the new value is in the CREATE type. Second, it would be helpful to add to the docs to reflect this in the PR. However, I can do that myself if you do not want to. Other than that, it looks good!

@denis-bel
Copy link
Contributor Author

I added old value in REMOVE type and also I updated docs. Check please the changes. Thank you!

@AsyncBanana
Copy link
Owner

Sorry for all of the complications. I want to make sure there are not any problems later. First, I think deletedValue and oldValue should be merged, since oldValue covers deletedValue, and it could cause some confusion for which to use (also look at how CREATE just uses value, not newValue).
Second, it would be helpful to update the testing to use this, although I could do it myself.
These should be the last things needed.

@denis-bel
Copy link
Contributor Author

Can you please do it yourself? I think it would be the best option ;)

@AsyncBanana
Copy link
Owner

Ok, I will. Thanks again for the PR.

@AsyncBanana AsyncBanana merged commit d5fce21 into AsyncBanana:master Dec 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants