Skip to content

Port IndexState and IndexOffset #5916

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 8 commits into from
Jan 28, 2022
Merged

Conversation

schmidt-sebastian
Copy link
Contributor

@schmidt-sebastian schmidt-sebastian commented Jan 22, 2022

No description provided.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 22, 2022

Changeset File Check ✅

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

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jan 22, 2022

Size Report 1

Affected Products

  • @firebase/analytics

    TypeBase (fad3c47)Merge (89e04e3)Diff
    browser?18.9 kB? (?)
    esm5?23.5 kB? (?)
    main?24.6 kB? (?)
    module?18.9 kB? (?)
  • @firebase/analytics-compat

    TypeBase (fad3c47)Merge (89e04e3)Diff
    browser?2.57 kB? (?)
    esm5?2.80 kB? (?)
    main?3.24 kB? (?)
    module?2.57 kB? (?)
  • @firebase/api-documenter

    TypeBase (fad3c47)Merge (89e04e3)Diff
    main?3.95 kB? (?)
  • @firebase/app

    TypeBase (fad3c47)Merge (89e04e3)Diff
    browser?7.74 kB? (?)
    esm5?9.37 kB? (?)
    main?10.2 kB? (?)
    module?7.74 kB? (?)
  • @firebase/app-check

    TypeBase (fad3c47)Merge (89e04e3)Diff
    browser?25.1 kB? (?)
    esm5?29.7 kB? (?)
    main?30.9 kB? (?)
    module?25.1 kB? (?)
  • @firebase/app-check-compat

    TypeBase (fad3c47)Merge (89e04e3)Diff
    browser?2.27 kB? (?)
    esm5?2.48 kB? (?)
    main?2.94 kB? (?)
    module?2.27 kB? (?)
  • @firebase/app-compat

    TypeBase (fad3c47)Merge (89e04e3)Diff
    browser?5.28 kB? (?)
    esm5?6.13 kB? (?)
    lite?4.06 kB? (?)
    main?6.73 kB? (?)
    module?5.28 kB? (?)
  • @firebase/auth-compat

    TypeBase (fad3c47)Merge (89e04e3)Diff
    browser?20.1 kB? (?)
    esm5?26.9 kB? (?)
    main?29.5 kB? (?)
    module?20.1 kB? (?)
  • @firebase/auth/cordova

    TypeBase (fad3c47)Merge (89e04e3)Diff
    browser?180 kB? (?)
    module?180 kB? (?)
  • @firebase/auth/internal

    TypeBase (fad3c47)Merge (89e04e3)Diff
    browser?163 kB? (?)
    esm5?212 kB? (?)
    main?179 kB? (?)
    module?163 kB? (?)
  • @firebase/auth/react-native

    TypeBase (fad3c47)Merge (89e04e3)Diff
    browser?164 kB? (?)
    module?164 kB? (?)
  • @firebase/component

    TypeBase (fad3c47)Merge (89e04e3)Diff
    browser?6.54 kB? (?)
    esm5?8.61 kB? (?)
    main?8.99 kB? (?)
    module?6.54 kB? (?)
  • @firebase/database

    TypeBase (fad3c47)Merge (89e04e3)Diff
    browser?247 kB? (?)
    esm5?275 kB? (?)
    main?280 kB? (?)
    module?247 kB? (?)
  • @firebase/database-compat

    TypeBase (fad3c47)Merge (89e04e3)Diff
    browser?17.9 kB? (?)
    esm5?21.0 kB? (?)
    main?21.7 kB? (?)
    module?17.9 kB? (?)
  • @firebase/database-compat/standalone

    TypeBase (fad3c47)Merge (89e04e3)Diff
    main?369 kB? (?)
  • @firebase/firestore

    TypeBase (fad3c47)Merge (89e04e3)Diff
    browser?229 kB? (?)
    esm5?286 kB? (?)
    main?456 kB? (?)
    module?229 kB? (?)
    react-native?229 kB? (?)
  • @firebase/firestore-compat

    TypeBase (fad3c47)Merge (89e04e3)Diff
    browser?20.5 kB? (?)
    esm5?27.6 kB? (?)
    main?20.9 kB? (?)
    module?20.5 kB? (?)
    react-native?20.5 kB? (?)
  • @firebase/firestore-lite

    TypeBase (fad3c47)Merge (89e04e3)Diff
    browser?72.7 kB? (?)
    esm5?86.0 kB? (?)
    main?125 kB? (?)
    module?72.7 kB? (?)
    react-native?72.9 kB? (?)
  • @firebase/functions

    TypeBase (fad3c47)Merge (89e04e3)Diff
    browser?8.99 kB? (?)
    esm5?11.1 kB? (?)
    main?11.8 kB? (?)
    module?8.99 kB? (?)
  • @firebase/functions-compat

    TypeBase (fad3c47)Merge (89e04e3)Diff
    browser?1.67 kB? (?)
    esm5?1.83 kB? (?)
    main?2.20 kB? (?)
    module?1.67 kB? (?)
  • @firebase/installations

    TypeBase (fad3c47)Merge (89e04e3)Diff
    browser?17.3 kB? (?)
    esm5?22.3 kB? (?)
    main?23.1 kB? (?)
    module?17.3 kB? (?)
  • @firebase/installations-compat

    TypeBase (fad3c47)Merge (89e04e3)Diff
    browser?944 B? (?)
    esm5?1.16 kB? (?)
    main?1.48 kB? (?)
    module?944 B? (?)
  • @firebase/logger

    TypeBase (fad3c47)Merge (89e04e3)Diff
    esm5?4.65 kB? (?)
    main?5.32 kB? (?)
    module?3.25 kB? (?)
  • @firebase/messaging

    TypeBase (fad3c47)Merge (89e04e3)Diff
    browser?20.8 kB? (?)
    esm5?26.1 kB? (?)
    main?26.8 kB? (?)
    module?20.8 kB? (?)
  • @firebase/messaging-compat

    TypeBase (fad3c47)Merge (89e04e3)Diff
    browser?2.08 kB? (?)
    esm5?2.51 kB? (?)
    main?2.90 kB? (?)
    module?2.08 kB? (?)
  • @firebase/messaging-sw

    TypeBase (fad3c47)Merge (89e04e3)Diff
    main?29.5 kB? (?)
    module?22.8 kB? (?)
  • @firebase/performance

    TypeBase (fad3c47)Merge (89e04e3)Diff
    browser?28.5 kB? (?)
    esm5?30.2 kB? (?)
    main?30.6 kB? (?)
    module?28.5 kB? (?)
  • @firebase/performance-compat

    TypeBase (fad3c47)Merge (89e04e3)Diff
    browser?1.10 kB? (?)
    esm5?1.37 kB? (?)
    main?1.69 kB? (?)
    module?1.10 kB? (?)
  • @firebase/remote-config

    TypeBase (fad3c47)Merge (89e04e3)Diff
    browser?18.8 kB? (?)
    esm5?23.7 kB? (?)
    main?24.9 kB? (?)
    module?18.8 kB? (?)
  • @firebase/remote-config-compat

    TypeBase (fad3c47)Merge (89e04e3)Diff
    browser?1.85 kB? (?)
    esm5?2.76 kB? (?)
    main?3.09 kB? (?)
    module?1.85 kB? (?)
  • @firebase/rules-unit-testing

    TypeBase (fad3c47)Merge (89e04e3)Diff
    main?17.6 kB? (?)
  • @firebase/storage

    TypeBase (fad3c47)Merge (89e04e3)Diff
    browser?54.5 kB? (?)
    esm5?60.5 kB? (?)
    main?57.3 kB? (?)
    module?54.5 kB? (?)
  • @firebase/storage-compat

    TypeBase (fad3c47)Merge (89e04e3)Diff
    browser?5.67 kB? (?)
    esm5?8.41 kB? (?)
    main?8.82 kB? (?)
    module?5.67 kB? (?)
  • @firebase/util

    TypeBase (fad3c47)Merge (89e04e3)Diff
    browser?20.5 kB? (?)
    esm5?21.9 kB? (?)
    main?26.7 kB? (?)
    module?20.5 kB? (?)
  • @firebase/webchannel-wrapper

    TypeBase (fad3c47)Merge (89e04e3)Diff
    esm5?44.7 kB? (?)
    main?50.8 kB? (?)
    module?43.2 kB? (?)
  • bundle

    43 size changes

    TypeBase (fad3c47)Merge (89e04e3)Diff
    analytics (logEvent)?34.7 kB? (?)
    app-check (CustomProvider)?27.4 kB? (?)
    app-check (ReCaptchaEnterpriseProvider)?29.6 kB? (?)
    app-check (ReCaptchaV3Provider)?29.6 kB? (?)
    auth (Anonymous)?56.9 kB? (?)
    auth (EmailAndPassword)?61.0 kB? (?)
    auth (GoogleFBTwitterGitHubPopup)?80.8 kB? (?)
    auth (GooglePopup)?80.5 kB? (?)
    auth (GoogleRedirect)?80.7 kB? (?)
    auth (Phone)?67.0 kB? (?)
    database (Append to a list of data)?137 kB? (?)
    database (Filtering data)?136 kB? (?)
    database (Listen for child events)?152 kB? (?)
    database (Listen for value events + Detach listeners)?152 kB? (?)
    database (Listen for value events)?152 kB? (?)
    database (Read data once)?144 kB? (?)
    database (Save data as transactions)?154 kB? (?)
    database (Sort data)?138 kB? (?)
    database (Write data)?136 kB? (?)
    firestore (Persistence)?230 kB? (?)
    firestore (Query Cursors)?189 kB? (?)
    firestore (Query)?190 kB? (?)
    firestore (Read data once)?179 kB? (?)
    firestore (Realtime updates)?181 kB? (?)
    firestore (Transaction)?163 kB? (?)
    firestore (Write data)?163 kB? (?)
    firestore-lite (Query Cursors)?56.6 kB? (?)
    firestore-lite (Query)?59.6 kB? (?)
    firestore-lite (Read data once)?44.1 kB? (?)
    firestore-lite (Transaction)?61.5 kB? (?)
    firestore-lite (Write data)?47.0 kB? (?)
    functions (call)?18.3 kB? (?)
    messaging (send + receive)?37.8 kB? (?)
    performance (trace)?42.3 kB? (?)
    remote-config (getAndFetch)?36.7 kB? (?)
    storage (getBytes)?26.6 kB? (?)
    storage (getDownloadURL)?28.7 kB? (?)
    storage (getMetadata)?28.1 kB? (?)
    storage (list + listAll)?27.5 kB? (?)
    storage (updateMetadata)?28.4 kB? (?)
    storage (uploadBytes)?32.9 kB? (?)
    storage (uploadBytesResumable)?42.4 kB? (?)
    storage (uploadString)?33.1 kB? (?)

  • firebase

    29 size changes

    TypeBase (fad3c47)Merge (89e04e3)Diff
    firebase-analytics-compat.js?26.0 kB? (?)
    firebase-analytics.js?107 kB? (?)
    firebase-app-check-compat.js?22.7 kB? (?)
    firebase-app-check.js?89.9 kB? (?)
    firebase-app-compat.js?17.9 kB? (?)
    firebase-app.js?51.4 kB? (?)
    firebase-auth-compat.js?123 kB? (?)
    firebase-auth-cordova.js?462 kB? (?)
    firebase-auth-react-native.js?486 kB? (?)
    firebase-auth.js?411 kB? (?)
    firebase-compat.js?754 kB? (?)
    firebase-database-compat.js?165 kB? (?)
    firebase-database.js?603 kB? (?)
    firebase-firestore-compat.js?281 kB? (?)
    firebase-firestore-lite.js?249 kB? (?)
    firebase-firestore.js?775 kB? (?)
    firebase-functions-compat.js?7.95 kB? (?)
    firebase-functions.js?31.1 kB? (?)
    firebase-messaging-compat.js?37.9 kB? (?)
    firebase-messaging-sw.js?102 kB? (?)
    firebase-messaging.js?101 kB? (?)
    firebase-performance-compat.js?30.8 kB? (?)
    firebase-performance-standalone-compat.es2017.js?78.9 kB? (?)
    firebase-performance-standalone-compat.js?57.0 kB? (?)
    firebase-performance.js?119 kB? (?)
    firebase-remote-config-compat.js?27.5 kB? (?)
    firebase-remote-config.js?109 kB? (?)
    firebase-storage-compat.js?38.2 kB? (?)
    firebase-storage.js?146 kB? (?)

  • functions

    TypeBase (fad3c47)Merge (89e04e3)Diff
    main?46 B? (?)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/vDy99pzmd5.html

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jan 22, 2022

Size Analysis Report 1

Affected Products

  • @firebase/firestore

    • AbstractUserDataWriter

      Size

      TypeBase (fad3c47)Merge (89e04e3)Diff
      size23.4 kB23.4 kB+43 B (+0.2%)
      size-with-ext-deps71.9 kB71.9 kB+45 B (+0.1%)
    • CollectionReference

      Size

      TypeBase (fad3c47)Merge (89e04e3)Diff
      size19.3 kB19.4 kB+43 B (+0.2%)
      size-with-ext-deps67.8 kB67.9 kB+45 B (+0.1%)
    • DocumentReference

      Size

      TypeBase (fad3c47)Merge (89e04e3)Diff
      size19.3 kB19.4 kB+43 B (+0.2%)
      size-with-ext-deps67.8 kB67.9 kB+45 B (+0.1%)
    • DocumentSnapshot

      Size

      TypeBase (fad3c47)Merge (89e04e3)Diff
      size22.8 kB22.9 kB+43 B (+0.2%)
      size-with-ext-deps71.3 kB71.4 kB+45 B (+0.1%)
    • QueryDocumentSnapshot

      Size

      TypeBase (fad3c47)Merge (89e04e3)Diff
      size22.8 kB22.9 kB+43 B (+0.2%)
      size-with-ext-deps71.3 kB71.4 kB+45 B (+0.1%)
    • QuerySnapshot

      Size

      TypeBase (fad3c47)Merge (89e04e3)Diff
      size24.7 kB24.8 kB+43 B (+0.2%)
      size-with-ext-deps73.2 kB73.3 kB+45 B (+0.1%)
    • Transaction

      Size

      TypeBase (fad3c47)Merge (89e04e3)Diff
      size41.9 kB41.9 kB+43 B (+0.1%)
      size-with-ext-deps90.5 kB90.5 kB+45 B (+0.0%)
    • WriteBatch

      Size

      TypeBase (fad3c47)Merge (89e04e3)Diff
      size38.7 kB38.7 kB+43 B (+0.1%)
      size-with-ext-deps87.3 kB87.3 kB+45 B (+0.1%)
    • _DocumentKey

      Size

      TypeBase (fad3c47)Merge (89e04e3)Diff
      size25.0 kB25.0 kB+43 B (+0.2%)
      size-with-ext-deps73.5 kB73.6 kB+45 B (+0.1%)
    • _setIndexConfiguration

      Size

      TypeBase (fad3c47)Merge (89e04e3)Diff
      size20.9 kB23.8 kB+2.93 kB (+14.0%)
      size-with-ext-deps69.4 kB72.4 kB+2.96 kB (+4.3%)

      Dependency

      TypeBase (fad3c47)Merge (89e04e3)Diff
      functions

      18 dependencies

      B
      Ea
      Fo
      L
      M
      Mh
      O
      Oh
      Su
      Ta
      U
      Ua
      Vu
      Xs
      Zr
      ga
      qa
      st

      19 dependencies

      B
      Ea
      Fh
      Fo
      L
      Lh
      M
      O
      Su
      Ta
      U
      Ua
      Vu
      Xs
      Zr
      ga
      qa
      rt
      st

      + Fh
      + Lh
      + rt
      - Mh
      - Oh

      classes

      24 dependencies

      $h
      Aa
      C
      Fa
      G
      Gc
      J
      Mo
      Q
      Ra
      W
      X
      Y
      Z
      da
      dt
      eo
      it
      mt
      tt
      tu
      wa
      xa
      z

      31 dependencies

      $h
      Aa
      C
      Dt
      Fa
      G
      Gc
      J
      Mh
      Mo
      Oh
      Q
      Ra
      W
      X
      Y
      Z
      at
      da
      dt
      eo
      it
      mt
      tt
      tu
      ut
      wa
      wt
      xa
      xh
      z

      + Dt
      + Mh
      + Oh
      + at
      + ut
      + wt
      + xh

    • addDoc

      Size

      TypeBase (fad3c47)Merge (89e04e3)Diff
      size106 kB106 kB+45 B (+0.0%)
      size-with-ext-deps156 kB156 kB+45 B (+0.0%)
    • arrayRemove

      Size

      TypeBase (fad3c47)Merge (89e04e3)Diff
      size28.1 kB28.2 kB+43 B (+0.2%)
      size-with-ext-deps76.7 kB76.7 kB+45 B (+0.1%)
    • arrayUnion

      Size

      TypeBase (fad3c47)Merge (89e04e3)Diff
      size28.1 kB28.2 kB+43 B (+0.2%)
      size-with-ext-deps76.7 kB76.7 kB+45 B (+0.1%)
    • collection

      Size

      TypeBase (fad3c47)Merge (89e04e3)Diff
      size20.0 kB20.1 kB+43 B (+0.2%)
      size-with-ext-deps68.6 kB68.7 kB+45 B (+0.1%)
    • deleteDoc

      Size

      TypeBase (fad3c47)Merge (89e04e3)Diff
      size96.8 kB96.8 kB+45 B (+0.0%)
      size-with-ext-deps147 kB147 kB+45 B (+0.0%)
    • disableNetwork

      Size

      TypeBase (fad3c47)Merge (89e04e3)Diff
      size85.5 kB85.5 kB+45 B (+0.1%)
      size-with-ext-deps135 kB135 kB+45 B (+0.0%)
    • doc

      Size

      TypeBase (fad3c47)Merge (89e04e3)Diff
      size20.1 kB20.1 kB+43 B (+0.2%)
      size-with-ext-deps68.7 kB68.7 kB+45 B (+0.1%)
    • enableIndexedDbPersistence

      Size

      TypeBase (fad3c47)Merge (89e04e3)Diff
      size142 kB142 kB+45 B (+0.0%)
      size-with-ext-deps192 kB192 kB+45 B (+0.0%)
    • enableMultiTabIndexedDbPersistence

      Size

      TypeBase (fad3c47)Merge (89e04e3)Diff
      size173 kB173 kB+45 B (+0.0%)
      size-with-ext-deps223 kB223 kB+45 B (+0.0%)
    • enableNetwork

      Size

      TypeBase (fad3c47)Merge (89e04e3)Diff
      size85.5 kB85.5 kB+45 B (+0.1%)
      size-with-ext-deps135 kB135 kB+45 B (+0.0%)
    • endAt

      Size

      TypeBase (fad3c47)Merge (89e04e3)Diff
      size34.1 kB34.1 kB+43 B (+0.1%)
      size-with-ext-deps82.7 kB82.7 kB+45 B (+0.1%)
    • endBefore

      Size

      TypeBase (fad3c47)Merge (89e04e3)Diff
      size34.1 kB34.1 kB+43 B (+0.1%)
      size-with-ext-deps82.7 kB82.7 kB+45 B (+0.1%)
    • executeWrite

      Size

      TypeBase (fad3c47)Merge (89e04e3)Diff
      size95.9 kB96.0 kB+45 B (+0.0%)
      size-with-ext-deps146 kB146 kB+45 B (+0.0%)
    • getDoc

      Size

      TypeBase (fad3c47)Merge (89e04e3)Diff
      size122 kB122 kB+45 B (+0.0%)
      size-with-ext-deps171 kB171 kB+45 B (+0.0%)
    • getDocFromCache

      Size

      TypeBase (fad3c47)Merge (89e04e3)Diff
      size78.6 kB78.6 kB+43 B (+0.1%)
      size-with-ext-deps127 kB127 kB+45 B (+0.0%)
    • getDocFromServer

      Size

      TypeBase (fad3c47)Merge (89e04e3)Diff
      size122 kB122 kB+45 B (+0.0%)
      size-with-ext-deps171 kB172 kB+45 B (+0.0%)
    • getDocs

      Size

      TypeBase (fad3c47)Merge (89e04e3)Diff
      size123 kB123 kB+45 B (+0.0%)
      size-with-ext-deps173 kB173 kB+45 B (+0.0%)
    • getDocsFromCache

      Size

      TypeBase (fad3c47)Merge (89e04e3)Diff
      size85.8 kB85.9 kB+43 B (+0.1%)
      size-with-ext-deps135 kB135 kB+45 B (+0.0%)
    • getDocsFromServer

      Size

      TypeBase (fad3c47)Merge (89e04e3)Diff
      size123 kB123 kB+45 B (+0.0%)
      size-with-ext-deps173 kB173 kB+45 B (+0.0%)
    • loadBundle

      Size

      TypeBase (fad3c47)Merge (89e04e3)Diff
      size94.3 kB94.3 kB+45 B (+0.0%)
      size-with-ext-deps144 kB144 kB+45 B (+0.0%)
    • namedQuery

      Size

      TypeBase (fad3c47)Merge (89e04e3)Diff
      size72.1 kB72.1 kB+43 B (+0.1%)
      size-with-ext-deps121 kB121 kB+45 B (+0.0%)
    • onSnapshot

      Size

      TypeBase (fad3c47)Merge (89e04e3)Diff
      size124 kB124 kB+45 B (+0.0%)
      size-with-ext-deps174 kB174 kB+45 B (+0.0%)
    • onSnapshotsInSync

      Size

      TypeBase (fad3c47)Merge (89e04e3)Diff
      size114 kB114 kB+45 B (+0.0%)
      size-with-ext-deps163 kB163 kB+45 B (+0.0%)
    • refEqual

      Size

      TypeBase (fad3c47)Merge (89e04e3)Diff
      size19.5 kB19.6 kB+43 B (+0.2%)
      size-with-ext-deps68.1 kB68.1 kB+45 B (+0.1%)
    • runTransaction

      Size

      TypeBase (fad3c47)Merge (89e04e3)Diff
      size106 kB106 kB+45 B (+0.0%)
      size-with-ext-deps156 kB156 kB+45 B (+0.0%)
    • setDoc

      Size

      TypeBase (fad3c47)Merge (89e04e3)Diff
      size105 kB105 kB+45 B (+0.0%)
      size-with-ext-deps155 kB155 kB+45 B (+0.0%)
    • snapshotEqual

      Size

      TypeBase (fad3c47)Merge (89e04e3)Diff
      size32.1 kB32.1 kB+43 B (+0.1%)
      size-with-ext-deps80.7 kB80.7 kB+45 B (+0.1%)
    • startAfter

      Size

      TypeBase (fad3c47)Merge (89e04e3)Diff
      size34.1 kB34.1 kB+43 B (+0.1%)
      size-with-ext-deps82.7 kB82.7 kB+45 B (+0.1%)
    • startAt

      Size

      TypeBase (fad3c47)Merge (89e04e3)Diff
      size34.1 kB34.1 kB+43 B (+0.1%)
      size-with-ext-deps82.7 kB82.7 kB+45 B (+0.1%)
    • updateDoc

      Size

      TypeBase (fad3c47)Merge (89e04e3)Diff
      size105 kB106 kB+45 B (+0.0%)
      size-with-ext-deps155 kB155 kB+45 B (+0.0%)
    • waitForPendingWrites

      Size

      TypeBase (fad3c47)Merge (89e04e3)Diff
      size85.9 kB85.9 kB+45 B (+0.1%)
      size-with-ext-deps136 kB136 kB+45 B (+0.0%)
    • where

      Size

      TypeBase (fad3c47)Merge (89e04e3)Diff
      size40.1 kB40.2 kB+43 B (+0.1%)
      size-with-ext-deps88.8 kB88.8 kB+45 B (+0.1%)
    • writeBatch

      Size

      TypeBase (fad3c47)Merge (89e04e3)Diff
      size107 kB107 kB+45 B (+0.0%)
      size-with-ext-deps157 kB157 kB+45 B (+0.0%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/OWZihr7I3k.html

@changeset-bot
Copy link

changeset-bot bot commented Jan 25, 2022

⚠️ No Changeset found

Latest commit: c07c63e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@schmidt-sebastian schmidt-sebastian changed the base branch from master to mrschmidt/readtime January 25, 2022 01:02
@schmidt-sebastian schmidt-sebastian changed the title WIP Port IndexState and IndexOffset Jan 25, 2022
@schmidt-sebastian schmidt-sebastian marked this pull request as ready for review January 25, 2022 01:03
Copy link

@thebrianchen thebrianchen left a comment

Choose a reason for hiding this comment

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

lgtm

return primitiveComparator(left.kind, right.kind);
}

/** Stores the "high water mark" that indicates how updated the Index is for the current user. */

Choose a reason for hiding this comment

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

ubernit: line wrap

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

(options.fields ?? []).map(
entry => new IndexSegment(field(entry[0]), entry[1])
),
new IndexState(-1, options.offset ?? IndexOffset.min())

Choose a reason for hiding this comment

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

nit: pref using global const for -1

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

}

for (
let i = 0;

Choose a reason for hiding this comment

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

optional: if the left and right segments don't match in length, we can exit early rather than comparing, but i can also see how this code is less verbose

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That works for equals, but not here since "b,c" sorts after "a".

}

/** Creates a new offset based on the provided document. */
export function newIndexOffsetFromDocument(document: Document): IndexOffset {

Choose a reason for hiding this comment

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

Just double checking that you plan on adding another method to create a new index offset with a specified largest batch id.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The equivalent for Web is just calling the constructor of IndexOffset.

Base automatically changed from mrschmidt/readtime to master January 28, 2022 18:25
@schmidt-sebastian schmidt-sebastian merged commit 6555aa7 into master Jan 28, 2022
@schmidt-sebastian schmidt-sebastian deleted the mrschmidt/fieldindex branch January 28, 2022 19:56
@firebase firebase locked and limited conversation to collaborators Feb 28, 2022
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.

3 participants