Skip to content

Expose static members of public types in ESM2017 build #3259

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
Jun 23, 2020

Conversation

schmidt-sebastian
Copy link
Contributor

makeConstructorPrivate currently does not re-assign static members in the ESM2017 build, which essentially breaks the static methods on Blob, FieldValue and FieldPath.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jun 23, 2020

Binary Size Report

Affected SDKs

  • @firebase/firestore

    Type Base (58e1b6f) Head (3676426) Diff
    browser 249 kB 248 kB -290 B (-0.1%)
    esm2017 194 kB 194 kB -57 B (-0.0%)
    main 492 kB 492 kB -236 B (-0.0%)
    module 246 kB 246 kB -290 B (-0.1%)
  • @firebase/firestore/memory

    Type Base (58e1b6f) Head (3676426) Diff
    browser 186 kB 186 kB +85 B (+0.0%)
    esm2017 145 kB 145 kB +61 B (+0.0%)
    main 362 kB 362 kB +156 B (+0.0%)
    module 184 kB 184 kB +85 B (+0.0%)
  • firebase

    Type Base (58e1b6f) Head (3676426) Diff
    firebase-firestore.js 287 kB 287 kB -285 B (-0.1%)
    firebase-firestore.memory.js 226 kB 226 kB +85 B (+0.0%)
    firebase.js 820 kB 820 kB -285 B (-0.0%)

Test Logs

Comment on lines 48 to 56
// Copy any static methods/members
// Copy instance methods/members
Object.assign(PublicConstructor, cls);
Copy link
Member

Choose a reason for hiding this comment

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

We don't need it anymore since instance methods/members are copied in prototype.

@schmidt-sebastian schmidt-sebastian merged commit 50494ec into master Jun 23, 2020
@schmidt-sebastian schmidt-sebastian deleted the mrschmidt/makeprivate branch July 9, 2020 17:45
@firebase firebase locked and limited conversation to collaborators Jul 24, 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