-
-
Notifications
You must be signed in to change notification settings - Fork 825
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
mergeDeep behaviour with undefined
values changed in 10.6.2
#7011
Comments
In addition to the aforementioned problem the following inputs are also different between 10.6.1 and 10.6.2
|
Thanks for the feedback! |
Thanks for the quick turnaround. One question: per the PR I see that some cases (e.g. "no sources should return Here I assuming Thanks |
We follow semantic versioning, right. The behavior was broken and not intended as you can see in the tests. There is no change in the API but the result is corrected in the PR. So it is a bug fix not a major breaking change in my opinion. |
Well, that behavior has been how this tool has been working for a long time if I'm not mistaken, and as this particular case was not documented afaik, we assumed that to be the expected behavior (always return an object) and relied on that for our tool as we don't have any checks for the result after I agree that relying on unintended behavior is not ideal, and we are not massively affected by this as we can always add some extra checks on our end before updating, but wanted to warn about the potential breaking of other tools by this fix |
Issue workflow progress
Progress of the issue based on the
Contributor Workflow
Describe the bug
In version 10.6.1 of
@graphql-tools/utils
,undefined
values are ignored frommergeDeep
. For example:Returns
{ a: 'dd', b: 1 }
In version 10.6.2 and beyond, the same input returns
undefined
To Reproduce Steps to reproduce the behavior:
In version 10.6.2:
Returns
undefined
Expected behavior
To return the same as 10.6.1:
The text was updated successfully, but these errors were encountered: