Skip to content

Add ignoreUndefinedProperties #3077

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 3 commits into from
May 20, 2020
Merged

Conversation

schmidt-sebastian
Copy link
Contributor

@schmidt-sebastian schmidt-sebastian commented May 15, 2020

@google-oss-bot
Copy link
Contributor

google-oss-bot commented May 15, 2020

Binary Size Report

Affected SDKs

  • @firebase/firestore

    Type Base (ac215cf) Head (42f5b02) Diff
    browser 250 kB 251 kB +1.46 kB (+0.6%)
    esm2017 194 kB 195 kB +772 B (+0.4%)
    main 491 kB 493 kB +2.57 kB (+0.5%)
    module 248 kB 249 kB +1.40 kB (+0.6%)
  • @firebase/firestore/memory

    Type Base (ac215cf) Head (42f5b02) Diff
    browser 190 kB 192 kB +1.53 kB (+0.8%)
    esm2017 148 kB 149 kB +833 B (+0.6%)
    main 367 kB 369 kB +2.58 kB (+0.7%)
    module 188 kB 190 kB +1.47 kB (+0.8%)
  • @firebase/performance

    Type Base (ac215cf) Head (42f5b02) Diff
    browser 28.1 kB 26.7 kB -1.43 kB (-5.1%)
    esm2017 26.1 kB 24.7 kB -1.40 kB (-5.4%)
    main 28.1 kB 26.7 kB -1.43 kB (-5.1%)
    module 27.9 kB 26.4 kB -1.43 kB (-5.1%)
  • firebase

    Type Base (ac215cf) Head (42f5b02) Diff
    firebase-firestore.js 288 kB 290 kB +1.39 kB (+0.5%)
    firebase-firestore.memory.js 230 kB 232 kB +1.45 kB (+0.6%)
    firebase-performance-standalone.es2017.js 72.7 kB 71.9 kB -733 B (-1.0%)
    firebase-performance-standalone.js 48.1 kB 47.4 kB -765 B (-1.6%)
    firebase-performance.js 38.5 kB 37.7 kB -765 B (-2.0%)
    firebase.js 822 kB 823 kB +628 B (+0.1%)

Test Logs

@schmidt-sebastian schmidt-sebastian force-pushed the mrschmidt/ignoreundefined branch from 3228017 to e2af49c Compare May 16, 2020 00:23
@@ -461,7 +461,7 @@ export function validatePositiveNumber(
if (n <= 0) {
throw new FirestoreError(
Code.INVALID_ARGUMENT,
`Function "${functionName}()" requires its ${ordinal(
`Function ${functionName}() requires its ${ordinal(
position
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed this to align this error message with the rest of the validation messages.

@@ -310,9 +325,3 @@ export function withTestCollectionSettings(
}
);
}

function wipeDb(db: firestore.FirebaseFirestore): Promise<void> {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed this as I discovered this randomly. The call just gives the wrong illusion and we may actually not need to do this anymore since we are testing against the Emulator.

/**
* Whether to skip nested properties that are set to `undefined` during
* object serialization. If set to `true`, these properties will be skipped
* and are not be written to Firestore. If the setting is set `false` or
Copy link
Contributor

Choose a reason for hiding this comment

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

s/the setting is set/it is set to

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@wu-hui wu-hui assigned schmidt-sebastian and unassigned wu-hui May 19, 2020

/**
* Whether to skip nested properties that are set to `undefined` during
* object serialization. If set to `true`, these properties will be skipped
Copy link
Contributor

Choose a reason for hiding this comment

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

Very much a nit, but we prefer present over future when possible. Here it cold be "properties are skipped . . . . the SDK throws . . ."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated. Thanks for the review!

Copy link
Contributor

@egilmorez egilmorez left a comment

Choose a reason for hiding this comment

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

LG with a nit that you may ignore if you want. Thanks!

@schmidt-sebastian schmidt-sebastian merged commit 4a70e17 into master May 20, 2020
@schmidt-sebastian schmidt-sebastian deleted the mrschmidt/ignoreundefined branch May 20, 2020 19:55
@firebase firebase locked and limited conversation to collaborators Jun 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants