This repository was archived by the owner on Mar 4, 2026. It is now read-only.
fix: Remove incorrect,unreachable and unused code#1983
Merged
milaGGL merged 4 commits intogoogleapis:mainfrom Jan 22, 2024
Merged
fix: Remove incorrect,unreachable and unused code#1983milaGGL merged 4 commits intogoogleapis:mainfrom
milaGGL merged 4 commits intogoogleapis:mainfrom
Conversation
The toJSON function spelling name is incorrect therefore this method is not triggered when using JSON.stringify on firestore objects
|
🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use -- conventional-commit-lint bot |
This code is never invoked, the spelling of toJSON is also wrong ( it is toJson here) Also the Firestore Class toJSON method works well now for protecting the private keys of firestore instance
milaGGL
approved these changes
Jan 22, 2024
Contributor
milaGGL
left a comment
There was a problem hiding this comment.
LGTM. Thank you for your contribution.
MarkDuckworth
added a commit
that referenced
this pull request
Jan 23, 2024
This reverts commit 133f4da.
MarkDuckworth
added a commit
that referenced
this pull request
Jan 25, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The code I have removed is not used since the main Firestore class method has its own toJSON override, the spelling of toJSON method anyways is incorrect here, This will make the code cleaner.
This line instead takes care of the removed code now and is working in the latest version
https://github.com/googleapis/nodejs-firestore/blob/main/dev/src/index.ts#L1451
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
For Issue #1984
This PR was reverted in favor of correcting the redaction code for Firestore settings. It's still possible to serialize the settings on a Firestore instance, and it's also possible that the serialization of Firestore settings will be updated in the future to include the settings. The intent of this PR was good, but we're being cautious to handle the less common use case.
BEGIN_COMMIT_OVERRIDE
chore: This change was reverted before it was release in #1989.
END_COMMIT_OVERRIDE