Skip to content

fix(firestore)!: Make DocumentSnapshot.exists() a method rather than a property (BREAKING CHANGE) #8483

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 6 commits into from
Apr 25, 2025

Conversation

MichaelVerdon
Copy link
Collaborator

@MichaelVerdon MichaelVerdon commented Apr 22, 2025

Description

closes #8460

Just as @mikehardy says, JS documentation states exists() is a method returning true or false.
https://firebase.google.com/docs/reference/js/database.datasnapshot.md#datasnapshotexists
Very small breaking change, users just need to change snapshot.exists to snapshot.exists().

To be shipped with other breaking changes.

Related issues

Release Summary

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
    • Yes
  • My change supports the following platforms;
    • Android
    • iOS
    • Other (macOS, web)
  • My change includes tests;
    • e2e tests added or updated in packages/\*\*/e2e
    • jest tests added or updated in packages/\*\*/__tests__
  • I have updated TypeScript types that are affected by my change.
  • This is a breaking change;
    • Yes
    • No

Test Plan


Think react-native-firebase is great? Please consider supporting the project with any of the below:

Copy link

vercel bot commented Apr 22, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-native-firebase ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 23, 2025 9:27am

@MichaelVerdon MichaelVerdon changed the title Make DataSnapshot.exists a method from property fix(firestore): Make DataSnapshot.exists a method from property Apr 22, 2025
@MichaelVerdon MichaelVerdon changed the title fix(firestore): Make DataSnapshot.exists a method from property chore(firestore): Make DataSnapshot.exists a method from property Apr 22, 2025
@MichaelVerdon MichaelVerdon changed the title chore(firestore): Make DataSnapshot.exists a method from property chore(firestore): Make DocumentSnapshot.exists a method from property Apr 22, 2025
@MichaelVerdon MichaelVerdon changed the title chore(firestore): Make DocumentSnapshot.exists a method from property chore(firestore): Make DocumentSnapshot.exists() a method rather than a property Apr 23, 2025
@MichaelVerdon MichaelVerdon marked this pull request as ready for review April 23, 2025 09:56
@MichaelVerdon MichaelVerdon added the blocked: do-not-merge Do not merge this issue without approval by the person who labelled this issue as Do Not Merge label Apr 23, 2025
@MichaelVerdon MichaelVerdon changed the title chore(firestore): Make DocumentSnapshot.exists() a method rather than a property fix(firestore)!: Make DocumentSnapshot.exists() a method rather than a property Apr 23, 2025
@MichaelVerdon MichaelVerdon changed the title fix(firestore)!: Make DocumentSnapshot.exists() a method rather than a property fix(firestore)!: Make DocumentSnapshot.exists() a method rather than a property (BREAKING CHANGE) Apr 23, 2025
Copy link
Collaborator

@mikehardy mikehardy left a comment

Choose a reason for hiding this comment

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

excellent

@mikehardy mikehardy merged commit 346272c into main Apr 25, 2025
22 of 23 checks passed
@mikehardy mikehardy deleted the datasnapshot-fix branch April 25, 2025 23:35
@mikehardy mikehardy removed the blocked: do-not-merge Do not merge this issue without approval by the person who labelled this issue as Do Not Merge label Apr 25, 2025
@MorganTrudeau
Copy link

I think firestore/lib/index.d.ts needs to updated with this change right?

@mikehardy
Copy link
Collaborator

@MorganTrudeau great catch - you are correct

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.

modular firestore DocumentSnapshot.exists is property not method contrary to docs
3 participants