Skip to content

feat(firestore): Added FieldValue.minimum() and FieldValue.maximum()#8151

Merged
MarkDuckworth merged 13 commits intomainfrom
markduckworth/port-pr-2024
May 4, 2026
Merged

feat(firestore): Added FieldValue.minimum() and FieldValue.maximum()#8151
MarkDuckworth merged 13 commits intomainfrom
markduckworth/port-pr-2024

Conversation

@MarkDuckworth
Copy link
Copy Markdown
Contributor

@MarkDuckworth MarkDuckworth commented May 1, 2026

Originally opened as a community contribution in googleapis/nodejs-firestore#2024. The original author @brettwillis has been preserved on the commits and as a co-author in the squash commit.

go/firestore-api-fieldvalue-take-minmax

@MarkDuckworth MarkDuckworth requested a review from a team as a code owner May 1, 2026 20:09
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 FieldValue.minimum() and FieldValue.maximum() to the Firestore SDK, enabling server-side numeric transformations. The implementation includes a refactor of numeric transform logic into a base NumericFieldTransform class along with comprehensive unit, system, and type tests. Feedback highlights an opportunity to further reduce code duplication by moving shared methods to the base class and identifies a logic error in the isEqual() implementation regarding NaN values, which should be addressed and verified with additional test cases.

Comment thread handwritten/firestore/dev/src/field-value.ts
Comment thread handwritten/firestore/dev/src/field-value.ts
Comment thread handwritten/firestore/dev/src/field-value.ts
Comment thread handwritten/firestore/dev/test/field-value.ts
Comment thread handwritten/firestore/dev/test/field-value.ts
@MarkDuckworth MarkDuckworth changed the title feat: Implement FieldValue.minimum() and FieldValue.maximum() feat(firestore): Implement FieldValue.minimum() and FieldValue.maximum() May 1, 2026
@MarkDuckworth MarkDuckworth changed the title feat(firestore): Implement FieldValue.minimum() and FieldValue.maximum() feat(firestore): Added FieldValue.minimum() and FieldValue.maximum() May 1, 2026
Comment thread handwritten/firestore/dev/src/field-value.ts Outdated
Comment thread handwritten/firestore/dev/src/field-value.ts Outdated
Comment thread handwritten/firestore/dev/src/field-value.ts Outdated
MarkDuckworth and others added 5 commits May 4, 2026 13:19
Co-authored-by: Daniel La Rocque <dlarocque@google.com>
Co-authored-by: Daniel La Rocque <dlarocque@google.com>
Co-authored-by: Daniel La Rocque <dlarocque@google.com>
@MarkDuckworth MarkDuckworth requested a review from dlarocque May 4, 2026 20:45
Comment thread handwritten/firestore/dev/src/field-value.ts Outdated
Comment thread handwritten/firestore/dev/src/field-value.ts Outdated
Co-authored-by: Daniel La Rocque <dlarocque@google.com>
Comment thread handwritten/firestore/dev/src/field-value.ts Outdated
Comment thread handwritten/firestore/dev/src/field-value.ts Outdated
Co-authored-by: Mark Duckworth <1124037+MarkDuckworth@users.noreply.github.com>
@MarkDuckworth MarkDuckworth merged commit 41671b0 into main May 4, 2026
28 checks passed
@MarkDuckworth MarkDuckworth deleted the markduckworth/port-pr-2024 branch May 4, 2026 22:01
thiyaguk09 pushed a commit to thiyaguk09/google-cloud-node-fork that referenced this pull request May 5, 2026
…oogleapis#8151)

Co-authored-by: Brett Willis <brettjohnwillis@gmail.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Daniel La Rocque <dlarocque@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: firestore Issues related to the Firestore API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants