firebase / firebase-js-sdk

Firebase Javascript SDK
https://firebase.google.com/docs/web/setup
Other
4.74k stars 868 forks source link

Firestore: simple_db.ts: move getAndroidVersion() to a free function #8178

Closed dconeybe closed 1 month ago

dconeybe commented 1 month ago

https://github.com/firebase/firebase-js-sdk/pull/7929 accidentally pulled in the IndexedDB persistence code even in Firestore applications that did not used IndexedDB, unnecessarily increasing the code size by 6.5 kB starting in v10.7.2. This PR fixes this code size increase by moving the getAndroidVersion() function from a static member of the SimpleDB class to a free function to avoid pulling in all of the IndexedDB code.

changeset-bot[bot] commented 1 month ago

🦋 Changeset detected

Latest commit: 8e6bd381944cf062fd6424141bb11c61840a5f09

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](https://github.com/firebase/firebase-js-sdk/new/dconeybe/BundleSizeSimpleDbFix?filename=.changeset/great-elephants-refuse.md&value=---%0A%22%40firebase%2Ffirestore%22%3A%20patch%0A---%0A%0AFirestore%3A%20simple_db.ts%3A%20move%20getAndroidVersion()%20to%20a%20free%20function%0A)

google-oss-bot commented 1 month ago

<!DOCTYPE html>

Size Report 1

Affected Products

Test Logs

google-oss-bot commented 1 month ago

<!DOCTYPE html>

Size Analysis Report 1

This report is too large (567,773 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