firebase-js-sdk icon indicating copy to clipboard operation
firebase-js-sdk copied to clipboard

snapshot listeners source from cache

Open milaGGL opened this issue 1 year ago • 4 comments

Adding ListenSource enum to SnapshotListenOptions.

const enum ListenSource {
  /** Listen to both cache and server changes */
  Default,
  /** Listen to changes in cache only */
  Cache
}

tests include integration tests and spec tests on:

  • [x] listening/un-listening-relistening to query sourced from cache
  • [x] having multiple listeners from different source
  • [x] raising snapshot from cache, on local mutation, watch updates(while listening to both default and cache) and bundle loads
  • [x] mirror queries in integration test and multi-client spec tests
  • [x] transactions, network changes should not raise snapshot while listening to cache only
  • [x] can execute composite index queries.
  • [x] eager and persistence garbage collection

milaGGL avatar Jan 25 '24 17:01 milaGGL

🦋 Changeset detected

Latest commit: a340dd67317fbece152e4e23bc71c6c2393d5fa6

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

changeset-bot[bot] avatar Jan 25 '24 17:01 changeset-bot[bot]

Size Report 1

Affected Products

  • @firebase/auth

    TypeBase (e60188d)Merge (10acec4)Diff
    browser177 kB177 kB+38 B (+0.0%)
    esm5231 kB231 kB+38 B (+0.0%)
    module177 kB177 kB+38 B (+0.0%)
  • @firebase/auth/internal

    TypeBase (e60188d)Merge (10acec4)Diff
    browser188 kB188 kB+38 B (+0.0%)
    esm5244 kB244 kB+38 B (+0.0%)
    module188 kB188 kB+38 B (+0.0%)
  • @firebase/firestore

    TypeBase (e60188d)Merge (10acec4)Diff
    browser375 kB376 kB+1.29 kB (+0.3%)
    esm5360 kB362 kB+1.60 kB (+0.4%)
    main577 kB579 kB+2.40 kB (+0.4%)
    module375 kB376 kB+1.29 kB (+0.3%)
    react-native375 kB376 kB+1.29 kB (+0.3%)
  • bundle

    11 size changes

    TypeBase (e60188d)Merge (10acec4)Diff
    auth (GoogleFBTwitterGitHubPopup)101 kB101 kB+19 B (+0.0%)
    firestore (CSI Auto Indexing Disable and Delete)268 kB268 kB+57 B (+0.0%)
    firestore (CSI Auto Indexing Enable)268 kB268 kB+57 B (+0.0%)
    firestore (Persistence)303 kB303 kB+101 B (+0.0%)
    firestore (Query Cursors)246 kB247 kB+903 B (+0.4%)
    firestore (Query)243 kB244 kB+936 B (+0.4%)
    firestore (Read data once)231 kB232 kB+903 B (+0.4%)
    firestore (Read Write w Persistence)321 kB322 kB+947 B (+0.3%)
    firestore (Realtime updates)234 kB235 kB+936 B (+0.4%)
    firestore (Transaction)211 kB211 kB+57 B (+0.0%)
    firestore (Write data)211 kB211 kB+57 B (+0.0%)
  • firebase

    TypeBase (e60188d)Merge (10acec4)Diff
    firebase-auth.js147 kB147 kB+19 B (+0.0%)
    firebase-compat.js780 kB781 kB+934 B (+0.1%)
    firebase-firestore-compat.js341 kB342 kB+934 B (+0.3%)
    firebase-firestore.js434 kB436 kB+1.30 kB (+0.3%)

Test Logs

google-oss-bot avatar Jan 25 '24 18:01 google-oss-bot

Size Analysis Report 1

This report is too large (203,112 characters) to be displayed here in a GitHub comment. Please use the below link to see the full report on Google Cloud Storage.

Test Logs

google-oss-bot avatar Jan 25 '24 18:01 google-oss-bot

Changeset File Check :white_check_mark:

  • No modified packages are missing from the changeset file.
  • No changeset formatting errors detected.

github-actions[bot] avatar Feb 02 '24 22:02 github-actions[bot]

@markarndt The public interface ListenSource has been changed from enum to union type, and the documentation has been changed a bit in format. Please help re-review the changed part.

milaGGL avatar Mar 08 '24 15:03 milaGGL