Skip to content

Make FirestoreClient tree-shakeable #3983

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 3 commits into from
Oct 27, 2020

Conversation

schmidt-sebastian
Copy link
Contributor

@schmidt-sebastian schmidt-sebastian commented Oct 22, 2020

This is a mechanical refactor. The next PR will use these change to introduce the firestore-exp components to FirestoreClient.

@changeset-bot
Copy link

changeset-bot bot commented Oct 22, 2020

⚠️ No Changeset found

Latest commit: fb0adf4

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-oss-bot
Copy link
Contributor

google-oss-bot commented Oct 22, 2020

Binary Size Report

Affected SDKs

  • @firebase/firestore

    Type Base (a9ba7ba) Head (7f29e34) Diff
    browser 238 kB 238 kB -472 B (-0.2%)
    esm2017 190 kB 189 kB -149 B (-0.1%)
    main 470 kB 471 kB +688 B (+0.1%)
    module 238 kB 238 kB -472 B (-0.2%)
    react-native 190 kB 189 kB -149 B (-0.1%)
  • @firebase/firestore/memory

    Type Base (a9ba7ba) Head (7f29e34) Diff
    browser 176 kB 176 kB -472 B (-0.3%)
    esm2017 140 kB 139 kB -149 B (-0.1%)
    main 342 kB 343 kB +688 B (+0.2%)
    module 176 kB 176 kB -472 B (-0.3%)
    react-native 140 kB 139 kB -149 B (-0.1%)
  • firebase

    Type Base (a9ba7ba) Head (7f29e34) Diff
    firebase-firestore.js 277 kB 277 kB -504 B (-0.2%)
    firebase-firestore.memory.js 217 kB 216 kB -504 B (-0.2%)
    firebase.js 820 kB 819 kB -504 B (-0.1%)

Test Logs

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Oct 22, 2020

Size Analysis Report

Affected Products

No changes between base commit (541944b) and head commit (86b08ce).

Test Logs

Copy link
Contributor

@wilhuff wilhuff left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -676,7 +693,9 @@ export class Firestore implements PublicFirestore, FirebaseService {
runTransaction<T>(
updateFunction: (transaction: PublicTransaction) => Promise<T>
): Promise<T> {
return this.ensureClientConfigured().transaction(
this.ensureClientConfigured();
Copy link
Contributor

Choose a reason for hiding this comment

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

Assign to a temporary rather than referring to this._firestoreClient!?

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

@wilhuff wilhuff assigned schmidt-sebastian and unassigned wilhuff Oct 26, 2020
@schmidt-sebastian schmidt-sebastian merged commit ab0f643 into master Oct 27, 2020
@schmidt-sebastian schmidt-sebastian deleted the mrschmidt/treeshakeablefirestoreclient branch November 9, 2020 22:36
@firebase firebase locked and limited conversation to collaborators Nov 27, 2020
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