Skip to content
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

Resolve create() with WriteResult #29

Merged
merged 67 commits into from
Jan 8, 2020
Merged

Resolve create() with WriteResult #29

merged 67 commits into from
Jan 8, 2020

Conversation

dmurvihill
Copy link
Owner

Reopening the original PR here.

Tomas Rupsys and others added 17 commits January 18, 2019 16:15
This has been the default for Firebase for a while now.
Previously, when a document have a reference to another document, we
ended up in an infinite loop. This is now prevented by only follow plain
objects.

This logic makes it easier to reason about the call chain too.
Previous behavior for Server Timestamp was to return UNIX timestamp.
This is the correct bahviour still for the client firebase.database
library. This change restores this.
Internally date is now stored as Date until returned, where it is
converted to Timestamp. This fixes orderBy.
@dmurvihill
Copy link
Owner Author

Hi @op, we're running into the same issue here as we did with #31 -- this is only available through firebase.admin and not through firebase. Needs resolution.

Previously, gulp-shell did not properly signal completion, resulting
in errors with Gulp 4. Fixed now.
# Conflicts:
#	src/storage-bucket.js
#	src/storage.js
raman-nbg and others added 14 commits December 18, 2019 23:45
Fix: Add Boolean support to Query equalTo
Pass a `User` into the setup instead of a plain object.
Also, fix one typo in a test name.
Firebase SDK [Version 4.0.0](https://firebase.google.com/support/release-notes/js#version_500_-_may_8_2018)
changed the behavior of `onAuthStateChanged` and added a new event handler
called `onIdTokenChanged`. This patch mocks that change.

onIdTokenChanged now implements the former behavior of onAuthStateChanged.
onAuthStateChanged now signals only when the actual user changes, not when
a new ID token is set for the same user.
@joelpoloney
Copy link

Hi @op, we're running into the same issue here as we did with #31 -- this is only available through firebase.admin and not through firebase. Needs resolution.

Is this really an issue? Why not support it regardless? What's the downside of adding it in?

@dmurvihill
Copy link
Owner Author

I'm realizing now that this PR doesn't make the problem any worse than it already is.

We have an issue where if you call .firestore() on a mock SDK, you will get a sort of half-regular and half-admin Frankenmock. For instance, MockFirestoreDocument has a create method even though that method exists only on the admin SDK, but most of its other methods return Promise<void> which is consistent with the regular SDK.

You're right that none of that has anything to do with this PR, so I'm going to merge it. Cheers.

@dmurvihill dmurvihill merged commit f9bf0c7 into master Jan 8, 2020
@joelpoloney
Copy link

Thank you 🙏

@dmurvihill dmurvihill deleted the create-write-result branch January 8, 2020 21:48
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.

6 participants