Skip to content
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

Fix internal assertion encountered when testing with jsdom. #8142

Merged
merged 5 commits into from
Apr 9, 2024

Conversation

MarkDuckworth
Copy link
Contributor

@MarkDuckworth MarkDuckworth commented Apr 8, 2024

Proposed fix for #8137, #6684, #6931, #3096, #3653

@MarkDuckworth MarkDuckworth requested review from a team as code owners April 8, 2024 20:45
Copy link

changeset-bot bot commented Apr 8, 2024

🦋 Changeset detected

Latest commit: 33227de

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 Patch
firebase Patch
@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

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Apr 8, 2024

Size Report 1

Affected Products

  • @firebase/firestore

    TypeBase (fe09d83)Merge (fdd6d9e)Diff
    browser376 kB377 kB+21 B (+0.0%)
    esm5362 kB362 kB+21 B (+0.0%)
    main580 kB580 kB+25 B (+0.0%)
    module376 kB377 kB+21 B (+0.0%)
    react-native377 kB377 kB+21 B (+0.0%)
  • @firebase/messaging

    TypeBase (fe09d83)Merge (fdd6d9e)Diff
    browser21.4 kB21.3 kB-37 B (-0.2%)
    esm526.8 kB26.8 kB-58 B (-0.2%)
    main27.5 kB27.4 kB-58 B (-0.2%)
    module21.4 kB21.3 kB-37 B (-0.2%)
  • @firebase/messaging-sw

    TypeBase (fe09d83)Merge (fdd6d9e)Diff
    main30.5 kB30.4 kB-58 B (-0.2%)
    module23.6 kB23.6 kB-37 B (-0.2%)
  • bundle

    TypeBase (fe09d83)Merge (fdd6d9e)Diff
    firestore (Persistence)303 kB303 kB+21 B (+0.0%)
    firestore (Query Cursors)247 kB247 kB+21 B (+0.0%)
    firestore (Query)245 kB245 kB+21 B (+0.0%)
    firestore (Read data once)233 kB233 kB+21 B (+0.0%)
    firestore (Read Write w Persistence)323 kB323 kB+21 B (+0.0%)
    firestore (Realtime updates)235 kB235 kB+21 B (+0.0%)
    messaging (send + receive)47.2 kB46.8 kB-395 B (-0.8%)
  • firebase

    TypeBase (fe09d83)Merge (fdd6d9e)Diff
    firebase-compat.js786 kB786 kB-3 B (-0.0%)
    firebase-firestore-compat.js342 kB342 kB+21 B (+0.0%)
    firebase-firestore.js436 kB436 kB+21 B (+0.0%)
    firebase-messaging-compat.js38.4 kB38.4 kB-24 B (-0.1%)
    firebase-messaging-sw.js30.2 kB30.2 kB-29 B (-0.1%)
    firebase-messaging.js28.8 kB28.7 kB-29 B (-0.1%)

Test Logs

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

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Apr 8, 2024

Size Analysis Report 1

Affected Products

  • @firebase/firestore

    • enableMultiTabIndexedDbPersistence

      Size

      TypeBase (fe09d83)Merge (fdd6d9e)Diff
      size222 kB222 kB+21 B (+0.0%)
      size-with-ext-deps295 kB295 kB+21 B (+0.0%)
    • getDoc

      Size

      TypeBase (fe09d83)Merge (fdd6d9e)Diff
      size151 kB151 kB+21 B (+0.0%)
      size-with-ext-deps223 kB223 kB+21 B (+0.0%)
    • getDocFromServer

      Size

      TypeBase (fe09d83)Merge (fdd6d9e)Diff
      size151 kB151 kB+21 B (+0.0%)
      size-with-ext-deps223 kB223 kB+21 B (+0.0%)
    • getDocs

      Size

      TypeBase (fe09d83)Merge (fdd6d9e)Diff
      size153 kB153 kB+21 B (+0.0%)
      size-with-ext-deps225 kB225 kB+21 B (+0.0%)
    • getDocsFromServer

      Size

      TypeBase (fe09d83)Merge (fdd6d9e)Diff
      size152 kB152 kB+21 B (+0.0%)
      size-with-ext-deps225 kB225 kB+21 B (+0.0%)
    • onSnapshot

      Size

      TypeBase (fe09d83)Merge (fdd6d9e)Diff
      size153 kB153 kB+21 B (+0.0%)
      size-with-ext-deps226 kB226 kB+21 B (+0.0%)
    • onSnapshotsInSync

      Size

      TypeBase (fe09d83)Merge (fdd6d9e)Diff
      size142 kB142 kB+21 B (+0.0%)
      size-with-ext-deps215 kB215 kB+21 B (+0.0%)
    • persistentMultipleTabManager

      Size

      TypeBase (fe09d83)Merge (fdd6d9e)Diff
      size219 kB219 kB+21 B (+0.0%)
      size-with-ext-deps291 kB291 kB+21 B (+0.0%)
  • @firebase/messaging

    • deleteToken

      Size

      TypeBase (fe09d83)Merge (fdd6d9e)Diff
      size12.8 kB12.7 kB-11 B (-0.1%)
      size-with-ext-deps39.3 kB39.3 kB-12 B (-0.0%)
    • getMessaging

      Size

      TypeBase (fe09d83)Merge (fdd6d9e)Diff
      size13.2 kB12.8 kB-389 B (-2.9%)
      size-with-ext-deps46.9 kB46.5 kB-395 B (-0.8%)

      Dependency

      TypeBase (fe09d83)Merge (fdd6d9e)Diff
      functions

      39 dependencies

      _mergeStrings
      arrayToBase64
      base64ToArray
      checkTokenDetails
      dbGet
      dbRemove
      dbSet
      deleteTokenInternal
      externalizePayload
      extractAppConfig
      getBody
      getDbPromise
      getEndpoint
      getEventType
      getHeaders
      getKey
      getMessagingInWindow
      getMissingValueError
      getNewToken
      getPushSubscription
      getToken$1
      getTokenInternal
      isConsoleMessage
      isTokenValid
      isWindowSupported
      logToScion
      messageEventListener
      migrateOldDatabase
      propagateDataPayload
      propagateFcmOptions
      propagateNotificationPayload
      registerDefaultSw
      registerMessagingInWindow
      requestDeleteToken
      requestGetToken
      requestUpdateToken
      updateSwReg
      updateToken
      updateVapidKey

      37 dependencies

      _mergeStrings
      arrayToBase64
      base64ToArray
      checkTokenDetails
      dbGet
      dbSet
      externalizePayload
      extractAppConfig
      getBody
      getDbPromise
      getEndpoint
      getEventType
      getHeaders
      getKey
      getMessagingInWindow
      getMissingValueError
      getNewToken
      getPushSubscription
      getToken$1
      getTokenInternal
      isConsoleMessage
      isTokenValid
      isWindowSupported
      logToScion
      messageEventListener
      migrateOldDatabase
      propagateDataPayload
      propagateFcmOptions
      propagateNotificationPayload
      registerDefaultSw
      registerMessagingInWindow
      requestDeleteToken
      requestGetToken
      requestUpdateToken
      updateSwReg
      updateToken
      updateVapidKey

      - dbRemove
      - deleteTokenInternal

    • getToken

      Size

      TypeBase (fe09d83)Merge (fdd6d9e)Diff
      size12.6 kB12.2 kB-391 B (-3.1%)
      size-with-ext-deps39.2 kB38.8 kB-395 B (-1.0%)

      Dependency

      TypeBase (fe09d83)Merge (fdd6d9e)Diff
      functions

      38 dependencies

      _mergeStrings
      arrayToBase64
      base64ToArray
      checkTokenDetails
      dbGet
      dbRemove
      dbSet
      deleteTokenInternal
      externalizePayload
      extractAppConfig
      getBody
      getDbPromise
      getEndpoint
      getEventType
      getHeaders
      getKey
      getMissingValueError
      getNewToken
      getPushSubscription
      getToken
      getToken$1
      getTokenInternal
      isConsoleMessage
      isTokenValid
      logToScion
      messageEventListener
      migrateOldDatabase
      propagateDataPayload
      propagateFcmOptions
      propagateNotificationPayload
      registerDefaultSw
      registerMessagingInWindow
      requestDeleteToken
      requestGetToken
      requestUpdateToken
      updateSwReg
      updateToken
      updateVapidKey

      36 dependencies

      _mergeStrings
      arrayToBase64
      base64ToArray
      checkTokenDetails
      dbGet
      dbSet
      externalizePayload
      extractAppConfig
      getBody
      getDbPromise
      getEndpoint
      getEventType
      getHeaders
      getKey
      getMissingValueError
      getNewToken
      getPushSubscription
      getToken
      getToken$1
      getTokenInternal
      isConsoleMessage
      isTokenValid
      logToScion
      messageEventListener
      migrateOldDatabase
      propagateDataPayload
      propagateFcmOptions
      propagateNotificationPayload
      registerDefaultSw
      registerMessagingInWindow
      requestDeleteToken
      requestGetToken
      requestUpdateToken
      updateSwReg
      updateToken
      updateVapidKey

      - dbRemove
      - deleteTokenInternal

    • isSupported

      Size

      TypeBase (fe09d83)Merge (fdd6d9e)Diff
      size13.0 kB12.6 kB-390 B (-3.0%)
      size-with-ext-deps39.5 kB39.1 kB-395 B (-1.0%)

      Dependency

      TypeBase (fe09d83)Merge (fdd6d9e)Diff
      functions

      38 dependencies

      _mergeStrings
      arrayToBase64
      base64ToArray
      checkTokenDetails
      dbGet
      dbRemove
      dbSet
      deleteTokenInternal
      externalizePayload
      extractAppConfig
      getBody
      getDbPromise
      getEndpoint
      getEventType
      getHeaders
      getKey
      getMissingValueError
      getNewToken
      getPushSubscription
      getToken$1
      getTokenInternal
      isConsoleMessage
      isTokenValid
      isWindowSupported
      logToScion
      messageEventListener
      migrateOldDatabase
      propagateDataPayload
      propagateFcmOptions
      propagateNotificationPayload
      registerDefaultSw
      registerMessagingInWindow
      requestDeleteToken
      requestGetToken
      requestUpdateToken
      updateSwReg
      updateToken
      updateVapidKey

      36 dependencies

      _mergeStrings
      arrayToBase64
      base64ToArray
      checkTokenDetails
      dbGet
      dbSet
      externalizePayload
      extractAppConfig
      getBody
      getDbPromise
      getEndpoint
      getEventType
      getHeaders
      getKey
      getMissingValueError
      getNewToken
      getPushSubscription
      getToken$1
      getTokenInternal
      isConsoleMessage
      isTokenValid
      isWindowSupported
      logToScion
      messageEventListener
      migrateOldDatabase
      propagateDataPayload
      propagateFcmOptions
      propagateNotificationPayload
      registerDefaultSw
      registerMessagingInWindow
      requestDeleteToken
      requestGetToken
      requestUpdateToken
      updateSwReg
      updateToken
      updateVapidKey

      - dbRemove
      - deleteTokenInternal

    • onMessage

      Size

      TypeBase (fe09d83)Merge (fdd6d9e)Diff
      size12.8 kB12.4 kB-391 B (-3.1%)
      size-with-ext-deps39.3 kB38.9 kB-395 B (-1.0%)

      Dependency

      TypeBase (fe09d83)Merge (fdd6d9e)Diff
      functions

      39 dependencies

      _mergeStrings
      arrayToBase64
      base64ToArray
      checkTokenDetails
      dbGet
      dbRemove
      dbSet
      deleteTokenInternal
      externalizePayload
      extractAppConfig
      getBody
      getDbPromise
      getEndpoint
      getEventType
      getHeaders
      getKey
      getMissingValueError
      getNewToken
      getPushSubscription
      getToken$1
      getTokenInternal
      isConsoleMessage
      isTokenValid
      logToScion
      messageEventListener
      migrateOldDatabase
      onMessage
      onMessage$1
      propagateDataPayload
      propagateFcmOptions
      propagateNotificationPayload
      registerDefaultSw
      registerMessagingInWindow
      requestDeleteToken
      requestGetToken
      requestUpdateToken
      updateSwReg
      updateToken
      updateVapidKey

      37 dependencies

      _mergeStrings
      arrayToBase64
      base64ToArray
      checkTokenDetails
      dbGet
      dbSet
      externalizePayload
      extractAppConfig
      getBody
      getDbPromise
      getEndpoint
      getEventType
      getHeaders
      getKey
      getMissingValueError
      getNewToken
      getPushSubscription
      getToken$1
      getTokenInternal
      isConsoleMessage
      isTokenValid
      logToScion
      messageEventListener
      migrateOldDatabase
      onMessage
      onMessage$1
      propagateDataPayload
      propagateFcmOptions
      propagateNotificationPayload
      registerDefaultSw
      registerMessagingInWindow
      requestDeleteToken
      requestGetToken
      requestUpdateToken
      updateSwReg
      updateToken
      updateVapidKey

      - dbRemove
      - deleteTokenInternal

Test Logs

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

Copy link
Contributor

@tom-andersen tom-andersen left a comment

Choose a reason for hiding this comment

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

LGTM

@MarkDuckworth MarkDuckworth requested a review from a team as a code owner April 9, 2024 15:29
Copy link
Contributor

@dconeybe dconeybe left a comment

Choose a reason for hiding this comment

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

LGTM, with a minor suggestion to reword the inline comment. Nice fix!

@MarkDuckworth MarkDuckworth merged commit a6fa544 into master Apr 9, 2024
44 checks passed
@MarkDuckworth MarkDuckworth deleted the markduckworth/jsdom-internal-assertion-fix branch April 9, 2024 18:52
@google-oss-bot google-oss-bot mentioned this pull request Apr 10, 2024
@firebase firebase locked and limited conversation to collaborators May 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants