Skip to content

feature(firestore): added minimum and maximum FieldValue operations#9913

Open
MarkDuckworth wants to merge 12 commits intomainfrom
markduckworth/min-max-field-value
Open

feature(firestore): added minimum and maximum FieldValue operations#9913
MarkDuckworth wants to merge 12 commits intomainfrom
markduckworth/min-max-field-value

Conversation

@MarkDuckworth
Copy link
Copy Markdown
Contributor

@MarkDuckworth MarkDuckworth requested review from a team as code owners May 1, 2026 22:29
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 1, 2026

🦋 Changeset detected

Latest commit: e3cbb16

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@firebase/firestore Minor
firebase Minor
@firebase/firestore-compat Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces minimum and maximum numeric transforms to Firestore, allowing users to update fields based on numeric comparisons. The changes span the public API, internal transform operations, serialization, and include extensive integration and unit tests. Feedback focuses on correcting typos in the documentation and suggests refactoring duplicated logic for numeric type determination into a shared helper function.

Comment thread packages/firestore/src/lite-api/field_value_impl.ts Outdated
Comment thread packages/firestore/src/lite-api/field_value_impl.ts Outdated
Comment thread packages/firestore/src/model/transform_operation.ts Outdated
MarkDuckworth and others added 5 commits May 4, 2026 14:49
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…se/firebase-js-sdk into markduckworth/min-max-field-value
@MarkDuckworth MarkDuckworth requested a review from a team as a code owner May 6, 2026 15:36
@MarkDuckworth MarkDuckworth requested a review from a team as a code owner May 6, 2026 19:04
@MarkDuckworth
Copy link
Copy Markdown
Contributor Author

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces minimum and maximum FieldValue operations to Firestore, allowing for server-side numeric comparisons during document updates. The implementation includes new transform operations, updated serialization logic, and comprehensive integration and unit tests. Feedback was provided to rename a variable in a shared helper function to improve clarity, as it currently uses a name specific to one operation type while supporting both.

Comment thread packages/firestore/src/model/transform_operation.ts Outdated
MarkDuckworth and others added 3 commits May 6, 2026 14:37
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…se/firebase-js-sdk into markduckworth/min-max-field-value
Comment thread .changeset/nine-toes-explain.md Outdated
@@ -0,0 +1,5 @@
---
"@firebase/firestore": patch
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Public API change so should be minor, plus "firebase: minor"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

good catch. thanks

Comment thread .changeset/nine-toes-explain.md Outdated
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.

4 participants