Skip to content

Fix: Pick the meta object from actual resource rather from cached res…#783

Merged
wopian merged 6 commits intowopian:masterfrom
mountainfirefly:master
Oct 30, 2022
Merged

Fix: Pick the meta object from actual resource rather from cached res…#783
wopian merged 6 commits intowopian:masterfrom
mountainfirefly:master

Conversation

@mountainfirefly
Copy link
Copy Markdown
Contributor

…ource if it is different

@wopian
Copy link
Copy Markdown
Owner

wopian commented Oct 28, 2022

Please can you fix the linter errors and warnings in the PR. You can run yarn lint --fix and it'll do most of it for you 👍

You can ignore the complexity warning flagged by Codeclimate

Comment thread packages/kitsu-core/src/linkRelationships/index.js
Comment thread packages/kitsu-core/src/deepEqual/index.js
Comment thread packages/kitsu-core/src/deepEqual/index.js Outdated
Comment thread packages/kitsu-core/src/deepEqual/index.js Outdated
Comment thread packages/kitsu-core/src/deepEqual/index.js Outdated
Comment thread packages/kitsu-core/src/deepEqual/index.js Outdated
Comment thread packages/kitsu-core/src/deepEqual/index.js Outdated
@mountainfirefly
Copy link
Copy Markdown
Contributor Author

Sure, will resolve these and update you soon.
Thanks

@mountainfirefly
Copy link
Copy Markdown
Contributor Author

@wopian I have addressed your review comments.
Please review again and let me know if anything else is needed.

Copy link
Copy Markdown
Owner

@wopian wopian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please run yarn lint --fix to resolve the lining errors and warnings from ESLint

Comment thread packages/kitsu-core/src/deepEqual/index.js Outdated
Comment on lines +20 to +21
const objKeys1 = Object.keys(object1);
const objKeys2 = Object.keys(object2);
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function should check both values are objects before contining to access Object.keys on them.

Tests are failing due to undefined and null values being passed in through object1 and/or object2.

@mountainfirefly
Copy link
Copy Markdown
Contributor Author

@wopian Your review comments have been addressed, please check now.

Thanks

@qlty-cloud-legacy
Copy link
Copy Markdown

Code Climate has analyzed commit a66f183 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (100% is the threshold).

This pull request will bring the total coverage in the repository to 100.0% (0.0% change).

View more on Code Climate.

@wopian wopian merged commit 97ba151 into wopian:master Oct 30, 2022
@wopian
Copy link
Copy Markdown
Owner

wopian commented Oct 30, 2022

Thank you. I updated the tests to include coverage of the uncovered branches and added the sample you gave in the issue as a test case in linkedRelationships to test the behaviour works as intended.

@wopian
Copy link
Copy Markdown
Owner

wopian commented Oct 30, 2022

Released in 10.0.3 (2022-10-30)

@mountainfirefly
Copy link
Copy Markdown
Contributor Author

Thank you so much @wopian .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issue in Deserialize function: meta object is getting overwritten if the same reference is used multiple places.

2 participants