parse-community / Parse-SDK-JS

The JavaScript SDK for Parse Platform
https://parseplatform.org
Apache License 2.0
1.32k stars 596 forks source link

fix: `Parse.Installation` not working when installation is deleted on server #2126

Closed dplewis closed 3 months ago

dplewis commented 3 months ago

Pull Request

Issue

The InstallationController never checks for server changes to object, so save() just fails since the local object has an id. And beyond cleaning the cache keys manually out of storage, there is no way to reset the installation locally.

Closes: https://github.com/parse-community/Parse-SDK-JS/issues/2124

Approach

Ensure a new installation is created if installation is not found on the server when fetching / saving. This approach was taken from the iOS SDK

Tasks

parse-github-assistant[bot] commented 3 months ago

Thanks for opening this pull request!

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (b50790a) to head (c93cdf1). Report is 40 commits behind head on alpha.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## alpha #2126 +/- ## ========================================== Coverage 100.00% 100.00% ========================================== Files 61 64 +3 Lines 6186 6348 +162 Branches 1499 1505 +6 ========================================== + Hits 6186 6348 +162 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

dplewis commented 3 months ago

@mtrezza Conflicts have been resolve and this is ready for review.

parseplatformorg commented 3 months ago

🎉 This change has been released in version 5.1.1-alpha.1

parseplatformorg commented 2 months ago

🎉 This change has been released in version 5.2.0-beta.1

parseplatformorg commented 2 months ago

🎉 This change has been released in version 5.2.0