Skip to content

Add bundle definitions and its measurement script. #5706

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 6 commits into from
Nov 12, 2021

Conversation

yifanyang
Copy link
Contributor

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Nov 5, 2021

⚠️ No Changeset found

Latest commit: a6ce26c

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

@google-cla google-cla bot added the cla: yes label Nov 5, 2021
@google-oss-bot
Copy link
Contributor

google-oss-bot commented Nov 5, 2021

Binary Size Report

Affected SDKs

  • @firebase/firestore

    Type Base (3b23a9e) Head (8bc0772) Diff
    browser 225 kB 225 kB +4 B (+0.0%)
    esm5 282 kB 282 kB +4 B (+0.0%)
    main 423 kB 423 kB +4 B (+0.0%)
    module 225 kB 225 kB +4 B (+0.0%)
    react-native 226 kB 226 kB +4 B (+0.0%)
  • @firebase/functions

    Type Base (3b23a9e) Head (8bc0772) Diff
    browser 8.85 kB 8.99 kB +145 B (+1.6%)
    esm5 10.9 kB 11.1 kB +161 B (+1.5%)
    main 11.7 kB 11.8 kB +161 B (+1.4%)
    module 8.85 kB 8.99 kB +145 B (+1.6%)
  • @firebase/storage

    Type Base (3b23a9e) Head (8bc0772) Diff
    browser 52.1 kB 54.5 kB +2.31 kB (+4.4%)
    esm5 57.5 kB 60.5 kB +2.96 kB (+5.2%)
    main 53.7 kB 57.3 kB +3.55 kB (+6.6%)
    module 52.1 kB 54.5 kB +2.31 kB (+4.4%)
  • bundle

    Click to show 34 binary size changes.
    Type Base (3b23a9e) Head (8bc0772) Diff
    analytics (logEvent) ? 34.7 kB ? (?)
    app-check (CustomProvider) ? 26.9 kB ? (?)
    app-check (ReCaptchaEnterpriseProvider) ? 27.8 kB ? (?)
    app-check (ReCaptchaV3Provider) ? 27.8 kB ? (?)
    auth (Anonymous) ? 56.9 kB ? (?)
    auth (EmailAndPassword) ? 61.0 kB ? (?)
    auth (GoogleFBTwitterGitHubPopup) ? 80.7 kB ? (?)
    auth (GooglePopup) ? 80.4 kB ? (?)
    auth (GoogleRedirect) ? 80.6 kB ? (?)
    auth (Phone) ? 66.9 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) ? 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 (Query) ? 188 kB ? (?)
    firestore (Read data once) ? 193 kB ? (?)
    firestore (Realtime updates) ? 179 kB ? (?)
    firestore-lite (Query) ? 58.6 kB ? (?)
    firestore-lite (Read data once) ? 56.4 kB ? (?)
    functions (call) ? 18.3 kB ? (?)
    messaging (send + receive) ? 37.8 kB ? (?)
    performance (trace) ? 42.3 kB ? (?)
    remote-config (getAndFetch) ? 36.7 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

    Type Base (3b23a9e) Head (8bc0772) Diff
    firebase-auth.js 410 kB 410 kB +38 B (+0.0%)
    firebase-compat.js 749 kB 749 kB +319 B (+0.0%)
    firebase-firestore-compat.js 278 kB 278 kB +4 B (+0.0%)
    firebase-firestore.js 763 kB 763 kB +11 B (+0.0%)
    firebase-functions-compat.js 7.86 kB 7.95 kB +83 B (+1.1%)
    firebase-functions.js 30.4 kB 30.9 kB +504 B (+1.7%)
    firebase-storage-compat.js 38.0 kB 38.2 kB +231 B (+0.6%)
    firebase-storage.js 139 kB 145 kB +5.99 kB (+4.3%)

Test Logs

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Nov 5, 2021

Size Analysis Report

Affected Products

  • @firebase/firestore

    • enableIndexedDbPersistence

      Size Table

      TypeBase (3b23a9e)Head (8bc0772)Diff
      size
      139 kB
      139 kB
      +4 B (+0.0%)
      size-with-ext-deps
      188 kB
      188 kB
      +4 B (+0.0%)
    • enableMultiTabIndexedDbPersistence

      Size Table

      TypeBase (3b23a9e)Head (8bc0772)Diff
      size
      171 kB
      171 kB
      +4 B (+0.0%)
      size-with-ext-deps
      220 kB
      220 kB
      +4 B (+0.0%)
  • @firebase/functions

    • httpsCallable

      Size Table

      TypeBase (3b23a9e)Head (8bc0772)Diff
      size
      5.89 kB
      5.98 kB
      +87 B (+1.5%)
      size-with-ext-deps
      11.8 kB
      11.9 kB
      +87 B (+0.7%)
  • @firebase/storage

    • _FbsBlob

      Size Table

      TypeBase (3b23a9e)Head (8bc0772)Diff
      size
      13.9 kB
      13.9 kB
      +58 B (+0.4%)
      size-with-ext-deps
      19.8 kB
      19.9 kB
      +58 B (+0.3%)

      Dependency Table

      TypeBase (3b23a9e)Head (8bc0772)Diff
      functions

      39 dependencies

      addAppCheckHeader_
      addAuthHeader_
      addGmpidHeader_
      addVersionHeader_
      appDeleted
      base64Bytes_
      canceled
      dataFromString
      dataURLBytes_
      dataURLContentType_
      decodeBase64
      endsWith
      extractBucket
      factory
      getBlob
      getBlobBuilder
      invalidArgument
      invalidDefaultBucket
      invalidFormat
      invalidRootOperation
      invalidUrl
      isJustDef
      isNativeBlob
      isNativeBlobDefined
      isString
      lastComponent
      makeQueryString
      makeRequest
      parent
      percentEncodedBytes_
      prependCode
      registerStorage
      retryLimitExceeded
      sliceBlob
      start
      stop
      unknown
      utf8Bytes_
      validateNumber
      

      39 dependencies

      addAppCheckHeader_
      addAuthHeader_
      addGmpidHeader_
      addVersionHeader_
      appDeleted
      base64Bytes_
      canceled
      dataFromString
      dataURLBytes_
      dataURLContentType_
      decodeBase64
      endsWith
      extractBucket
      factory
      getBlob$1
      getBlobBuilder
      invalidArgument
      invalidDefaultBucket
      invalidFormat
      invalidRootOperation
      invalidUrl
      isJustDef
      isNativeBlob
      isNativeBlobDefined
      isString
      lastComponent
      makeQueryString
      makeRequest
      parent
      percentEncodedBytes_
      prependCode
      registerStorage
      retryLimitExceeded
      sliceBlob
      start
      stop
      unknown
      utf8Bytes_
      validateNumber
      

      + getBlob$1
      - getBlob

    • _Location

      Size Table

      TypeBase (3b23a9e)Head (8bc0772)Diff
      size
      9.90 kB
      9.96 kB
      +58 B (+0.6%)
      size-with-ext-deps
      15.8 kB
      15.9 kB
      +58 B (+0.4%)
    • _UploadTask

      Size Table

      TypeBase (3b23a9e)Head (8bc0772)Diff
      size
      28.7 kB
      28.9 kB
      +227 B (+0.8%)
      size-with-ext-deps
      34.7 kB
      34.9 kB
      +228 B (+0.7%)

      Dependency Table

      TypeBase (3b23a9e)Head (8bc0772)Diff
      functions

      <full-list-too-large-to-display>
      <see-test-logs-below-for-details>
      

      <full-list-too-large-to-display>
      <see-test-logs-below-for-details>
      

      + getBlob$1
      + newTextConnection
      - getBlob
      - newConnection

      classes

      16 dependencies

      DataURLParts
      FailRequest
      FbsBlob
      FirebaseStorageImpl
      Location
      Mapping
      NetworkRequest
      Observer
      Reference
      RequestEndStatus
      RequestInfo
      ResumableUploadStatus
      StorageError
      StringData
      UploadTask
      XhrConnection
      

      17 dependencies

      DataURLParts
      FailRequest
      FbsBlob
      FirebaseStorageImpl
      Location
      Mapping
      NetworkRequest
      Observer
      Reference
      RequestEndStatus
      RequestInfo
      ResumableUploadStatus
      StorageError
      StringData
      UploadTask
      XhrConnection
      XhrTextConnection
      

      + XhrTextConnection

    • _dataFromString

      Size Table

      TypeBase (3b23a9e)Head (8bc0772)Diff
      size
      12.1 kB
      12.2 kB
      +58 B (+0.5%)
      size-with-ext-deps
      18.1 kB
      18.1 kB
      +58 B (+0.3%)
    • _getChild

      Size Table

      TypeBase (3b23a9e)Head (8bc0772)Diff
      size
      10.2 kB
      10.2 kB
      +58 B (+0.6%)
      size-with-ext-deps
      16.1 kB
      16.1 kB
      +58 B (+0.4%)
    • _invalidArgument

      Size Table

      TypeBase (3b23a9e)Head (8bc0772)Diff
      size
      9.91 kB
      9.96 kB
      +58 B (+0.6%)
      size-with-ext-deps
      15.8 kB
      15.9 kB
      +58 B (+0.4%)
    • _invalidRootOperation

      Size Table

      TypeBase (3b23a9e)Head (8bc0772)Diff
      size
      9.91 kB
      9.97 kB
      +58 B (+0.6%)
      size-with-ext-deps
      15.8 kB
      15.9 kB
      +58 B (+0.4%)
    • connectStorageEmulator

      Size Table

      TypeBase (3b23a9e)Head (8bc0772)Diff
      size
      10.1 kB
      10.2 kB
      +58 B (+0.6%)
      size-with-ext-deps
      19.7 kB
      19.8 kB
      +58 B (+0.3%)
    • deleteObject

      Size Table

      TypeBase (3b23a9e)Head (8bc0772)Diff
      size
      13.0 kB
      13.3 kB
      +227 B (+1.7%)
      size-with-ext-deps
      19.0 kB
      19.3 kB
      +228 B (+1.2%)

      Dependency Table

      TypeBase (3b23a9e)Head (8bc0772)Diff
      functions

      37 dependencies

      addAppCheckHeader_
      addAuthHeader_
      addGmpidHeader_
      addVersionHeader_
      appDeleted
      canceled
      deleteObject
      deleteObject$1
      deleteObject$2
      extractBucket
      factory
      internalError
      invalidArgument
      invalidDefaultBucket
      invalidRootOperation
      invalidUrl
      isJustDef
      lastComponent
      makeQueryString
      makeRequest
      makeUrl
      newConnection
      objectErrorHandler
      objectNotFound
      parent
      prependCode
      quotaExceeded
      registerStorage
      retryLimitExceeded
      sharedErrorHandler
      start
      stop
      unauthenticated
      unauthorized
      unauthorizedApp
      unknown
      validateNumber
      

      37 dependencies

      addAppCheckHeader_
      addAuthHeader_
      addGmpidHeader_
      addVersionHeader_
      appDeleted
      canceled
      deleteObject
      deleteObject$1
      deleteObject$2
      extractBucket
      factory
      internalError
      invalidArgument
      invalidDefaultBucket
      invalidRootOperation
      invalidUrl
      isJustDef
      lastComponent
      makeQueryString
      makeRequest
      makeUrl
      newTextConnection
      objectErrorHandler
      objectNotFound
      parent
      prependCode
      quotaExceeded
      registerStorage
      retryLimitExceeded
      sharedErrorHandler
      start
      stop
      unauthenticated
      unauthorized
      unauthorizedApp
      unknown
      validateNumber
      

      + newTextConnection
      - newConnection

      classes

      FailRequest
      FirebaseStorageImpl
      Location
      NetworkRequest
      Reference
      RequestEndStatus
      RequestInfo
      StorageError
      XhrConnection
      

      FailRequest
      FirebaseStorageImpl
      Location
      NetworkRequest
      Reference
      RequestEndStatus
      RequestInfo
      StorageError
      XhrConnection
      XhrTextConnection
      

      + XhrTextConnection

    • getBlob

      Size Table

      TypeBase (3b23a9e)Head (8bc0772)Diff
      size
      ?
      13.4 kB
      ? (?)
      size-with-ext-deps
      ?
      19.3 kB
      ? (?)

      Dependency Table

      TypeBase (3b23a9e)Head (8bc0772)Diff
      functions
      ?

      37 dependencies

      addAppCheckHeader_
      addAuthHeader_
      addGmpidHeader_
      addVersionHeader_
      appDeleted
      canceled
      extractBucket
      factory
      getBlob
      getBlobInternal
      getBytes$1
      internalError
      invalidArgument
      invalidDefaultBucket
      invalidRootOperation
      invalidUrl
      isJustDef
      lastComponent
      makeQueryString
      makeRequest
      makeUrl
      newBlobConnection
      objectErrorHandler
      objectNotFound
      parent
      prependCode
      quotaExceeded
      registerStorage
      retryLimitExceeded
      sharedErrorHandler
      start
      stop
      unauthenticated
      unauthorized
      unauthorizedApp
      unknown
      validateNumber
      

      ?
      classes
      ?

      FailRequest
      FirebaseStorageImpl
      Location
      NetworkRequest
      Reference
      RequestEndStatus
      RequestInfo
      StorageError
      XhrBlobConnection
      XhrConnection
      

      ?
      variables
      ?

      CONFIG_STORAGE_BUCKET_KEY
      DEFAULT_HOST
      DEFAULT_MAX_OPERATION_RETRY_TIME
      DEFAULT_MAX_UPLOAD_RETRY_TIME
      ErrorCode
      STORAGE_TYPE
      name
      version
      

      ?
      enums
      ?
      ?

      External Dependency Table

      ModuleBase (3b23a9e)Head (8bc0772)Diff
      @firebase/app
      ?

      SDK_VERSION
      _registerComponent
      registerVersion
      

      ?
      @firebase/util
      ?

      FirebaseError
      getModularInstance
      

      ?
      @firebase/component
      ?

      Component
      

      ?
    • getBytes

      Size Table

      TypeBase (3b23a9e)Head (8bc0772)Diff
      size
      ?
      13.4 kB
      ? (?)
      size-with-ext-deps
      ?
      19.4 kB
      ? (?)

      Dependency Table

      TypeBase (3b23a9e)Head (8bc0772)Diff
      functions
      ?

      37 dependencies

      addAppCheckHeader_
      addAuthHeader_
      addGmpidHeader_
      addVersionHeader_
      appDeleted
      canceled
      extractBucket
      factory
      getBytes
      getBytes$1
      getBytesInternal
      internalError
      invalidArgument
      invalidDefaultBucket
      invalidRootOperation
      invalidUrl
      isJustDef
      lastComponent
      makeQueryString
      makeRequest
      makeUrl
      newBytesConnection
      objectErrorHandler
      objectNotFound
      parent
      prependCode
      quotaExceeded
      registerStorage
      retryLimitExceeded
      sharedErrorHandler
      start
      stop
      unauthenticated
      unauthorized
      unauthorizedApp
      unknown
      validateNumber
      

      ?
      classes
      ?

      FailRequest
      FirebaseStorageImpl
      Location
      NetworkRequest
      Reference
      RequestEndStatus
      RequestInfo
      StorageError
      XhrBytesConnection
      XhrConnection
      

      ?
      variables
      ?

      CONFIG_STORAGE_BUCKET_KEY
      DEFAULT_HOST
      DEFAULT_MAX_OPERATION_RETRY_TIME
      DEFAULT_MAX_UPLOAD_RETRY_TIME
      ErrorCode
      STORAGE_TYPE
      name
      version
      

      ?
      enums
      ?
      ?

      External Dependency Table

      ModuleBase (3b23a9e)Head (8bc0772)Diff
      @firebase/app
      ?

      SDK_VERSION
      _registerComponent
      registerVersion
      

      ?
      @firebase/util
      ?

      FirebaseError
      getModularInstance
      

      ?
      @firebase/component
      ?

      Component
      

      ?
    • getDownloadURL

      Size Table

      TypeBase (3b23a9e)Head (8bc0772)Diff
      size
      15.2 kB
      15.4 kB
      +227 B (+1.5%)
      size-with-ext-deps
      21.2 kB
      21.4 kB
      +228 B (+1.1%)

      Dependency Table

      TypeBase (3b23a9e)Head (8bc0772)Diff
      functions

      50 dependencies

      addAppCheckHeader_
      addAuthHeader_
      addGmpidHeader_
      addRef
      addVersionHeader_
      appDeleted
      canceled
      downloadUrlFromResourceString
      downloadUrlHandler
      extractBucket
      factory
      fromResource
      fromResourceString
      getDownloadURL
      getDownloadURL$1
      getDownloadUrl
      getMappings
      handlerCheck
      internalError
      invalidArgument
      invalidDefaultBucket
      invalidRootOperation
      invalidUrl
      isJustDef
      isNonArrayObject
      isString
      jsonObjectOrNull
      lastComponent
      makeQueryString
      makeRequest
      makeUrl
      newConnection
      noDownloadURL
      noXform_
      objectErrorHandler
      objectNotFound
      parent
      prependCode
      quotaExceeded
      registerStorage
      retryLimitExceeded
      sharedErrorHandler
      start
      stop
      unauthenticated
      unauthorized
      unauthorizedApp
      unknown
      validateNumber
      xformPath
      

      50 dependencies

      addAppCheckHeader_
      addAuthHeader_
      addGmpidHeader_
      addRef
      addVersionHeader_
      appDeleted
      canceled
      downloadUrlFromResourceString
      downloadUrlHandler
      extractBucket
      factory
      fromResource
      fromResourceString
      getDownloadURL
      getDownloadURL$1
      getDownloadUrl
      getMappings
      handlerCheck
      internalError
      invalidArgument
      invalidDefaultBucket
      invalidRootOperation
      invalidUrl
      isJustDef
      isNonArrayObject
      isString
      jsonObjectOrNull
      lastComponent
      makeQueryString
      makeRequest
      makeUrl
      newTextConnection
      noDownloadURL
      noXform_
      objectErrorHandler
      objectNotFound
      parent
      prependCode
      quotaExceeded
      registerStorage
      retryLimitExceeded
      sharedErrorHandler
      start
      stop
      unauthenticated
      unauthorized
      unauthorizedApp
      unknown
      validateNumber
      xformPath
      

      + newTextConnection
      - newConnection

      classes

      FailRequest
      FirebaseStorageImpl
      Location
      Mapping
      NetworkRequest
      Reference
      RequestEndStatus
      RequestInfo
      StorageError
      XhrConnection
      

      11 dependencies

      FailRequest
      FirebaseStorageImpl
      Location
      Mapping
      NetworkRequest
      Reference
      RequestEndStatus
      RequestInfo
      StorageError
      XhrConnection
      XhrTextConnection
      

      + XhrTextConnection

    • getMetadata

      Size Table

      TypeBase (3b23a9e)Head (8bc0772)Diff
      size
      14.6 kB
      14.9 kB
      +227 B (+1.6%)
      size-with-ext-deps
      20.6 kB
      20.9 kB
      +228 B (+1.1%)

      Dependency Table

      TypeBase (3b23a9e)Head (8bc0772)Diff
      functions

      48 dependencies

      addAppCheckHeader_
      addAuthHeader_
      addGmpidHeader_
      addRef
      addVersionHeader_
      appDeleted
      canceled
      extractBucket
      factory
      fromResource
      fromResourceString
      getMappings
      getMetadata
      getMetadata$1
      getMetadata$2
      handlerCheck
      internalError
      invalidArgument
      invalidDefaultBucket
      invalidRootOperation
      invalidUrl
      isJustDef
      isNonArrayObject
      isString
      jsonObjectOrNull
      lastComponent
      makeQueryString
      makeRequest
      makeUrl
      metadataHandler
      newConnection
      noXform_
      objectErrorHandler
      objectNotFound
      parent
      prependCode
      quotaExceeded
      registerStorage
      retryLimitExceeded
      sharedErrorHandler
      start
      stop
      unauthenticated
      unauthorized
      unauthorizedApp
      unknown
      validateNumber
      xformPath
      

      48 dependencies

      addAppCheckHeader_
      addAuthHeader_
      addGmpidHeader_
      addRef
      addVersionHeader_
      appDeleted
      canceled
      extractBucket
      factory
      fromResource
      fromResourceString
      getMappings
      getMetadata
      getMetadata$1
      getMetadata$2
      handlerCheck
      internalError
      invalidArgument
      invalidDefaultBucket
      invalidRootOperation
      invalidUrl
      isJustDef
      isNonArrayObject
      isString
      jsonObjectOrNull
      lastComponent
      makeQueryString
      makeRequest
      makeUrl
      metadataHandler
      newTextConnection
      noXform_
      objectErrorHandler
      objectNotFound
      parent
      prependCode
      quotaExceeded
      registerStorage
      retryLimitExceeded
      sharedErrorHandler
      start
      stop
      unauthenticated
      unauthorized
      unauthorizedApp
      unknown
      validateNumber
      xformPath
      

      + newTextConnection
      - newConnection

      classes

      FailRequest
      FirebaseStorageImpl
      Location
      Mapping
      NetworkRequest
      Reference
      RequestEndStatus
      RequestInfo
      StorageError
      XhrConnection
      

      11 dependencies

      FailRequest
      FirebaseStorageImpl
      Location
      Mapping
      NetworkRequest
      Reference
      RequestEndStatus
      RequestInfo
      StorageError
      XhrConnection
      XhrTextConnection
      

      + XhrTextConnection

    • getStorage

      Size Table

      TypeBase (3b23a9e)Head (8bc0772)Diff
      size
      10.0 kB
      10.1 kB
      +58 B (+0.6%)
      size-with-ext-deps
      16.2 kB
      16.2 kB
      +58 B (+0.4%)
    • getStream

      Size Table

      TypeBase (3b23a9e)Head (8bc0772)Diff
      size
      ?
      10.0 kB
      ? (?)
      size-with-ext-deps
      ?
      16.0 kB
      ? (?)

      Dependency Table

      TypeBase (3b23a9e)Head (8bc0772)Diff
      functions
      ?

      25 dependencies

      addAppCheckHeader_
      addAuthHeader_
      addGmpidHeader_
      addVersionHeader_
      appDeleted
      canceled
      extractBucket
      factory
      getStream
      invalidArgument
      invalidDefaultBucket
      invalidRootOperation
      invalidUrl
      isJustDef
      lastComponent
      makeQueryString
      makeRequest
      parent
      prependCode
      registerStorage
      retryLimitExceeded
      start
      stop
      unknown
      validateNumber
      

      ?
      classes
      ?

      FailRequest
      FirebaseStorageImpl
      Location
      NetworkRequest
      Reference
      RequestEndStatus
      StorageError
      

      ?
      variables
      ?

      CONFIG_STORAGE_BUCKET_KEY
      DEFAULT_HOST
      DEFAULT_MAX_OPERATION_RETRY_TIME
      DEFAULT_MAX_UPLOAD_RETRY_TIME
      ErrorCode
      STORAGE_TYPE
      name
      version
      

      ?
      enums
      ?
      ?

      External Dependency Table

      ModuleBase (3b23a9e)Head (8bc0772)Diff
      @firebase/app
      ?

      SDK_VERSION
      _registerComponent
      registerVersion
      

      ?
      @firebase/util
      ?

      FirebaseError
      

      ?
      @firebase/component
      ?

      Component
      

      ?
    • list

      Size Table

      TypeBase (3b23a9e)Head (8bc0772)Diff
      size
      13.8 kB
      14.0 kB
      +227 B (+1.6%)
      size-with-ext-deps
      19.8 kB
      20.0 kB
      +228 B (+1.2%)

      Dependency Table

      TypeBase (3b23a9e)Head (8bc0772)Diff
      functions

      41 dependencies

      addAppCheckHeader_
      addAuthHeader_
      addGmpidHeader_
      addVersionHeader_
      appDeleted
      canceled
      extractBucket
      factory
      fromBackendResponse
      fromResponseString
      handlerCheck
      internalError
      invalidArgument
      invalidDefaultBucket
      invalidRootOperation
      invalidUrl
      isJustDef
      isNonArrayObject
      jsonObjectOrNull
      lastComponent
      list
      list$1
      list$2
      listHandler
      makeQueryString
      makeRequest
      makeUrl
      newConnection
      parent
      prependCode
      quotaExceeded
      registerStorage
      retryLimitExceeded
      sharedErrorHandler
      start
      stop
      unauthenticated
      unauthorized
      unauthorizedApp
      unknown
      validateNumber
      

      41 dependencies

      addAppCheckHeader_
      addAuthHeader_
      addGmpidHeader_
      addVersionHeader_
      appDeleted
      canceled
      extractBucket
      factory
      fromBackendResponse
      fromResponseString
      handlerCheck
      internalError
      invalidArgument
      invalidDefaultBucket
      invalidRootOperation
      invalidUrl
      isJustDef
      isNonArrayObject
      jsonObjectOrNull
      lastComponent
      list
      list$1
      list$2
      listHandler
      makeQueryString
      makeRequest
      makeUrl
      newTextConnection
      parent
      prependCode
      quotaExceeded
      registerStorage
      retryLimitExceeded
      sharedErrorHandler
      start
      stop
      unauthenticated
      unauthorized
      unauthorizedApp
      unknown
      validateNumber
      

      + newTextConnection
      - newConnection

      classes

      FailRequest
      FirebaseStorageImpl
      Location
      NetworkRequest
      Reference
      RequestEndStatus
      RequestInfo
      StorageError
      XhrConnection
      

      FailRequest
      FirebaseStorageImpl
      Location
      NetworkRequest
      Reference
      RequestEndStatus
      RequestInfo
      StorageError
      XhrConnection
      XhrTextConnection
      

      + XhrTextConnection

    • listAll

      Size Table

      TypeBase (3b23a9e)Head (8bc0772)Diff
      size
      14.0 kB
      14.2 kB
      +227 B (+1.6%)
      size-with-ext-deps
      20.0 kB
      20.2 kB
      +228 B (+1.1%)

      Dependency Table

      TypeBase (3b23a9e)Head (8bc0772)Diff
      functions

      43 dependencies

      addAppCheckHeader_
      addAuthHeader_
      addGmpidHeader_
      addVersionHeader_
      appDeleted
      canceled
      extractBucket
      factory
      fromBackendResponse
      fromResponseString
      handlerCheck
      internalError
      invalidArgument
      invalidDefaultBucket
      invalidRootOperation
      invalidUrl
      isJustDef
      isNonArrayObject
      jsonObjectOrNull
      lastComponent
      list$1
      list$2
      listAll
      listAll$1
      listAllHelper
      listHandler
      makeQueryString
      makeRequest
      makeUrl
      newConnection
      parent
      prependCode
      quotaExceeded
      registerStorage
      retryLimitExceeded
      sharedErrorHandler
      start
      stop
      unauthenticated
      unauthorized
      unauthorizedApp
      unknown
      validateNumber
      

      43 dependencies

      addAppCheckHeader_
      addAuthHeader_
      addGmpidHeader_
      addVersionHeader_
      appDeleted
      canceled
      extractBucket
      factory
      fromBackendResponse
      fromResponseString
      handlerCheck
      internalError
      invalidArgument
      invalidDefaultBucket
      invalidRootOperation
      invalidUrl
      isJustDef
      isNonArrayObject
      jsonObjectOrNull
      lastComponent
      list$1
      list$2
      listAll
      listAll$1
      listAllHelper
      listHandler
      makeQueryString
      makeRequest
      makeUrl
      newTextConnection
      parent
      prependCode
      quotaExceeded
      registerStorage
      retryLimitExceeded
      sharedErrorHandler
      start
      stop
      unauthenticated
      unauthorized
      unauthorizedApp
      unknown
      validateNumber
      

      + newTextConnection
      - newConnection

      classes

      FailRequest
      FirebaseStorageImpl
      Location
      NetworkRequest
      Reference
      RequestEndStatus
      RequestInfo
      StorageError
      XhrConnection
      

      FailRequest
      FirebaseStorageImpl
      Location
      NetworkRequest
      Reference
      RequestEndStatus
      RequestInfo
      StorageError
      XhrConnection
      XhrTextConnection
      

      + XhrTextConnection

    • ref

      Size Table

      TypeBase (3b23a9e)Head (8bc0772)Diff
      size
      10.8 kB
      10.8 kB
      +58 B (+0.5%)
      size-with-ext-deps
      16.7 kB
      16.8 kB
      +58 B (+0.3%)
    • updateMetadata

      Size Table

      TypeBase (3b23a9e)Head (8bc0772)Diff
      size
      14.9 kB
      15.1 kB
      +227 B (+1.5%)
      size-with-ext-deps
      20.9 kB
      21.1 kB
      +228 B (+1.1%)

      Dependency Table

      TypeBase (3b23a9e)Head (8bc0772)Diff
      functions

      49 dependencies

      addAppCheckHeader_
      addAuthHeader_
      addGmpidHeader_
      addRef
      addVersionHeader_
      appDeleted
      canceled
      extractBucket
      factory
      fromResource
      fromResourceString
      getMappings
      handlerCheck
      internalError
      invalidArgument
      invalidDefaultBucket
      invalidRootOperation
      invalidUrl
      isJustDef
      isNonArrayObject
      isString
      jsonObjectOrNull
      lastComponent
      makeQueryString
      makeRequest
      makeUrl
      metadataHandler
      newConnection
      noXform_
      objectErrorHandler
      objectNotFound
      parent
      prependCode
      quotaExceeded
      registerStorage
      retryLimitExceeded
      sharedErrorHandler
      start
      stop
      toResourceString
      unauthenticated
      unauthorized
      unauthorizedApp
      unknown
      updateMetadata
      updateMetadata$1
      updateMetadata$2
      validateNumber
      xformPath
      

      49 dependencies

      addAppCheckHeader_
      addAuthHeader_
      addGmpidHeader_
      addRef
      addVersionHeader_
      appDeleted
      canceled
      extractBucket
      factory
      fromResource
      fromResourceString
      getMappings
      handlerCheck
      internalError
      invalidArgument
      invalidDefaultBucket
      invalidRootOperation
      invalidUrl
      isJustDef
      isNonArrayObject
      isString
      jsonObjectOrNull
      lastComponent
      makeQueryString
      makeRequest
      makeUrl
      metadataHandler
      newTextConnection
      noXform_
      objectErrorHandler
      objectNotFound
      parent
      prependCode
      quotaExceeded
      registerStorage
      retryLimitExceeded
      sharedErrorHandler
      start
      stop
      toResourceString
      unauthenticated
      unauthorized
      unauthorizedApp
      unknown
      updateMetadata
      updateMetadata$1
      updateMetadata$2
      validateNumber
      xformPath
      

      + newTextConnection
      - newConnection

      classes

      FailRequest
      FirebaseStorageImpl
      Location
      Mapping
      NetworkRequest
      Reference
      RequestEndStatus
      RequestInfo
      StorageError
      XhrConnection
      

      11 dependencies

      FailRequest
      FirebaseStorageImpl
      Location
      Mapping
      NetworkRequest
      Reference
      RequestEndStatus
      RequestInfo
      StorageError
      XhrConnection
      XhrTextConnection
      

      + XhrTextConnection

    • uploadBytes

      Size Table

      TypeBase (3b23a9e)Head (8bc0772)Diff
      size
      19.4 kB
      19.7 kB
      +227 B (+1.2%)
      size-with-ext-deps
      25.5 kB
      25.7 kB
      +228 B (+0.9%)

      Dependency Table

      TypeBase (3b23a9e)Head (8bc0772)Diff
      functions

      <full-list-too-large-to-display>
      <see-test-logs-below-for-details>
      

      <full-list-too-large-to-display>
      <see-test-logs-below-for-details>
      

      + getBlob$1
      + newTextConnection
      - getBlob
      - newConnection

      classes

      13 dependencies

      DataURLParts
      FailRequest
      FbsBlob
      FirebaseStorageImpl
      Location
      Mapping
      NetworkRequest
      Reference
      RequestEndStatus
      RequestInfo
      StorageError
      StringData
      XhrConnection
      

      14 dependencies

      DataURLParts
      FailRequest
      FbsBlob
      FirebaseStorageImpl
      Location
      Mapping
      NetworkRequest
      Reference
      RequestEndStatus
      RequestInfo
      StorageError
      StringData
      XhrConnection
      XhrTextConnection
      

      + XhrTextConnection

    • uploadBytesResumable

      Size Table

      TypeBase (3b23a9e)Head (8bc0772)Diff
      size
      28.9 kB
      29.1 kB
      +227 B (+0.8%)
      size-with-ext-deps
      34.9 kB
      35.1 kB
      +228 B (+0.7%)

      Dependency Table

      TypeBase (3b23a9e)Head (8bc0772)Diff
      functions

      <full-list-too-large-to-display>
      <see-test-logs-below-for-details>
      

      <full-list-too-large-to-display>
      <see-test-logs-below-for-details>
      

      + getBlob$1
      + newTextConnection
      - getBlob
      - newConnection

      classes

      16 dependencies

      DataURLParts
      FailRequest
      FbsBlob
      FirebaseStorageImpl
      Location
      Mapping
      NetworkRequest
      Observer
      Reference
      RequestEndStatus
      RequestInfo
      ResumableUploadStatus
      StorageError
      StringData
      UploadTask
      XhrConnection
      

      17 dependencies

      DataURLParts
      FailRequest
      FbsBlob
      FirebaseStorageImpl
      Location
      Mapping
      NetworkRequest
      Observer
      Reference
      RequestEndStatus
      RequestInfo
      ResumableUploadStatus
      StorageError
      StringData
      UploadTask
      XhrConnection
      XhrTextConnection
      

      + XhrTextConnection

    • uploadString

      Size Table

      TypeBase (3b23a9e)Head (8bc0772)Diff
      size
      19.6 kB
      19.9 kB
      +227 B (+1.2%)
      size-with-ext-deps
      25.7 kB
      25.9 kB
      +228 B (+0.9%)

      Dependency Table

      TypeBase (3b23a9e)Head (8bc0772)Diff
      functions

      <full-list-too-large-to-display>
      <see-test-logs-below-for-details>
      

      <full-list-too-large-to-display>
      <see-test-logs-below-for-details>
      

      + getBlob$1
      + newTextConnection
      - getBlob
      - newConnection

      classes

      13 dependencies

      DataURLParts
      FailRequest
      FbsBlob
      FirebaseStorageImpl
      Location
      Mapping
      NetworkRequest
      Reference
      RequestEndStatus
      RequestInfo
      StorageError
      StringData
      XhrConnection
      

      14 dependencies

      DataURLParts
      FailRequest
      FbsBlob
      FirebaseStorageImpl
      Location
      Mapping
      NetworkRequest
      Reference
      RequestEndStatus
      RequestInfo
      StorageError
      StringData
      XhrConnection
      XhrTextConnection
      

      + XhrTextConnection

    • StringFormat

      Size Table

      TypeBase (3b23a9e)Head (8bc0772)Diff
      size
      9.98 kB
      10.0 kB
      +58 B (+0.6%)
      size-with-ext-deps
      15.9 kB
      16.0 kB
      +58 B (+0.4%)
    • _TaskEvent

      Size Table

      TypeBase (3b23a9e)Head (8bc0772)Diff
      size
      9.94 kB
      10.0 kB
      +58 B (+0.6%)
      size-with-ext-deps
      15.9 kB
      15.9 kB
      +58 B (+0.4%)
    • _TaskState

      Size Table

      TypeBase (3b23a9e)Head (8bc0772)Diff
      size
      10.0 kB
      10.1 kB
      +58 B (+0.6%)
      size-with-ext-deps
      15.9 kB
      16.0 kB
      +58 B (+0.4%)

Copy link
Contributor

@hsubox76 hsubox76 left a comment

Choose a reason for hiding this comment

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

Looks good, pending addition of ReCaptchaEnterpriseProvider to app-check.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 9, 2021

Changeset File Check ✅

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

{
"path": "app-check",
"imports": [
"initializeAppCheck",
Copy link
Contributor

Choose a reason for hiding this comment

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

Did these used to include getToken? I thought I remembered seeing them. It makes sense because if app check is being used, getToken() will eventually be called, if not by the user then by another library (storage, functions, etc).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it was there before. I got confused this morning when reading the code sample for App Check Enterprise, which doesn't reference getToken, and I wondered why it was there. I forgot that it was actually Feiyang who added getToken for me in the bundle doc last week. I was actually about to ask you, but got stuck in some changeset warnings in this pull request.

Anyway, I have added it back both in the bundle definition doc and the json files in this pull request. Please take a look. Thanks!

@yifanyang yifanyang requested a review from hsubox76 November 9, 2021 23:34
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.

iiuc this PR doesn't have any direct doc impact. If that's wrong, LMK and I'll take a closer look.

Thanks!

const analyses = JSON.parse(fs.readFileSync(output, { encoding: 'utf-8' }));
const results: Report[] = [];
for (const analysis of analyses) {
const sdk = 'bundle';
Copy link
Member

Choose a reason for hiding this comment

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

What does bundle mean?

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 name we put here will be appear as the name of a new section under "affected sdks" in a PR report. For example, there is another section named "bundle" in the report above in this PR [1]. We can put whatever name we want here.

[1] #5706 (comment)

I suppose it is a limitation of the metric backend at the moment. When the API for receiving size measurements was first designed, the backend only recognizes http requests with a json body strictly in this format:

[
  {
    sdk: <some-string>,
    type: <some-string>,
    value: <some-integer>
  },
  ......
]

Writing a new API in the backend and deploying a new version of the service to GCP can be some work, therefore I'm reusing the API for bundle measurements here, although the semantic of the API doesn't make any sense in the context of "bundle-analysis". What do you think?

Copy link
Member

Choose a reason for hiding this comment

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

I think it's fine. It would be great if you can copy your comment here to the code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added some comment in the code to explain the rationale here.

@@ -0,0 +1,202 @@
[
Copy link
Member

Choose a reason for hiding this comment

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

@sam-gc Can you please take a look at the Auth use cases to see if you want to add anything, or if anything is inaccurate?

For context, each object in the array is a bundle definition for a specific use case. It's basically a list of imports that customers need to import to use a certain feature from our products.

We are setting up a dashboard to continuously track the bundle size for them across versions.

@@ -0,0 +1,256 @@
[
{
"name": "Read data once",
Copy link
Member

Choose a reason for hiding this comment

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

@schmidt-sebastian Can you please take a look at the Database/Firestore/Storage use cases to see if you want to add anything, or if anything is inaccurate?

For context, each object in the array is a bundle definition for a specific use case. It's basically a list of imports that customers need to import to use a certain feature from our products.

We are setting up a dashboard to continuously track the bundle size for them across versions.

@Feiyang1
Copy link
Member

Feiyang1 commented Nov 10, 2021

Thanks for setting up the bundle size tracking! It looks good. It would be great if you can add some comments in repo-scripts/size-analysis/analyze-all-bundles.ts to explain the code, hard coded values and the arguments. E.g. how does theversion argument change the behavior of the code, who should set it, etc.

@yifanyang
Copy link
Contributor Author

Thanks for setting up the bundle size tracking! It looks good. It would be great if you can add some comments in repo-scripts/size-analysis/analyze-all-bundles.ts to explain the code, hard coded values and the arguments. E.g. how does theversion argument change the behavior of the code, who should set it, etc.

I have added some jsdoc on the method. Please take a look.

Comment on lines 41 to 42
* @param {string} [version] - If present, the SDK version to run measurement against
* @returns {Promise<Report[]>} A list of bundle size measurements
Copy link
Member

Choose a reason for hiding this comment

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

We use tsdoc instead of jsdoc. Please update. You can take a look at any of our packages for reference.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is that just a standard of doc format or something I should use to generate the doc?

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. Changed to tsdoc format.

@yifanyang yifanyang merged commit 3a94354 into master Nov 12, 2021
@yifanyang yifanyang deleted the yifany/bundle-size branch November 12, 2021 16:54
@firebase firebase locked and limited conversation to collaborators Dec 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants