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

Remove app-compat from peerDependencies in database-compat #6319

Merged
merged 3 commits into from
Jun 6, 2022

Conversation

hsubox76
Copy link
Contributor

This prevents admin-node users from seeing a warning message during npm/yarn install:
firebase/firebase-admin-node#1656

We're taking the same approach as #2082 in that admin-node users don't need that dep at all, and client JS SDK users of the database-compat package ought to be installing the firebase umbrella package and should never need to worry about @firebase/app-compat not being installed.

@changeset-bot
Copy link

changeset-bot bot commented May 31, 2022

🦋 Changeset detected

Latest commit: 8fc79ff

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@firebase/database-compat Patch
firebase 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

@github-actions
Copy link
Contributor

github-actions bot commented May 31, 2022

Changeset File Check ✅

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

@google-oss-bot
Copy link
Contributor

google-oss-bot commented May 31, 2022

Size Report 1

Affected Products

  • @firebase/app

    TypeBase (19e37af)Merge (3e56114)Diff
    browser13.8 kB13.9 kB+84 B (+0.6%)
    esm518.0 kB18.1 kB+84 B (+0.5%)
    main19.0 kB19.1 kB+84 B (+0.4%)
    module13.8 kB13.9 kB+84 B (+0.6%)
  • @firebase/app-check

    TypeBase (19e37af)Merge (3e56114)Diff
    browser25.2 kB25.3 kB+122 B (+0.5%)
    esm529.8 kB29.9 kB+122 B (+0.4%)
    main31.0 kB31.1 kB+122 B (+0.4%)
    module25.2 kB25.3 kB+122 B (+0.5%)
  • @firebase/auth

    TypeBase (19e37af)Merge (3e56114)Diff
    browser?155 kB? (?)
    cordova?183 kB? (?)
    esm5?202 kB? (?)
    main?148 kB? (?)
    module?155 kB? (?)
    react-native?168 kB? (?)
  • @firebase/messaging

    TypeBase (19e37af)Merge (3e56114)Diff
    browser20.8 kB21.1 kB+289 B (+1.4%)
    esm526.2 kB26.5 kB+289 B (+1.1%)
    main26.9 kB27.2 kB+289 B (+1.1%)
    module20.8 kB21.1 kB+289 B (+1.4%)
  • @firebase/messaging-sw

    TypeBase (19e37af)Merge (3e56114)Diff
    main29.6 kB29.9 kB+289 B (+1.0%)
    module22.9 kB23.2 kB+289 B (+1.3%)
  • @firebase/remote-config

    TypeBase (19e37af)Merge (3e56114)Diff
    browser18.8 kB19.2 kB+331 B (+1.8%)
    esm523.7 kB24.0 kB+331 B (+1.4%)
    main24.9 kB25.2 kB+331 B (+1.3%)
    module18.8 kB19.2 kB+331 B (+1.8%)
  • @firebase/storage

    TypeBase (19e37af)Merge (3e56114)Diff
    main57.3 kB57.4 kB+84 B (+0.1%)
  • bundle

    43 size changes

    TypeBase (19e37af)Merge (3e56114)Diff
    analytics (logEvent)41.5 kB41.6 kB+76 B (+0.2%)
    app-check (CustomProvider)35.2 kB35.4 kB+186 B (+0.5%)
    app-check (ReCaptchaEnterpriseProvider)37.4 kB37.6 kB+186 B (+0.5%)
    app-check (ReCaptchaV3Provider)37.4 kB37.5 kB+186 B (+0.5%)
    auth (Anonymous)66.1 kB66.1 kB+76 B (+0.1%)
    auth (EmailAndPassword)70.2 kB70.2 kB+76 B (+0.1%)
    auth (GoogleFBTwitterGitHubPopup)90.0 kB90.1 kB+76 B (+0.1%)
    auth (GooglePopup)89.7 kB89.8 kB+76 B (+0.1%)
    auth (GoogleRedirect)89.9 kB90.0 kB+76 B (+0.1%)
    auth (Phone)76.1 kB76.2 kB+76 B (+0.1%)
    database (Append to a list of data)145 kB145 kB+76 B (+0.1%)
    database (Filtering data)144 kB144 kB+76 B (+0.1%)
    database (Listen for child events)160 kB160 kB+76 B (+0.0%)
    database (Listen for value events + Detach listeners)160 kB160 kB+76 B (+0.0%)
    database (Listen for value events)160 kB160 kB+76 B (+0.0%)
    database (Read data once)152 kB152 kB+76 B (+0.1%)
    database (Save data as transactions)162 kB162 kB+76 B (+0.0%)
    database (Sort data)146 kB146 kB+76 B (+0.1%)
    database (Write data)144 kB144 kB+76 B (+0.1%)
    firestore (Persistence)269 kB269 kB+76 B (+0.0%)
    firestore (Query Cursors)208 kB208 kB+76 B (+0.0%)
    firestore (Query)209 kB209 kB+76 B (+0.0%)
    firestore (Read data once)197 kB197 kB+76 B (+0.0%)
    firestore (Realtime updates)200 kB200 kB+76 B (+0.0%)
    firestore (Transaction)181 kB181 kB+76 B (+0.0%)
    firestore (Write data)181 kB181 kB+76 B (+0.0%)
    firestore-lite (Query Cursors)67.8 kB208 kB+140 kB (+206.6%)
    firestore-lite (Query)71.0 kB208 kB+137 kB (+192.6%)
    firestore-lite (Read data once)55.4 kB197 kB+142 kB (+256.6%)
    firestore-lite (Transaction)80.0 kB181 kB+101 kB (+126.8%)
    firestore-lite (Write data)65.2 kB181 kB+116 kB (+177.7%)
    functions (call)29.1 kB29.2 kB+76 B (+0.3%)
    messaging (send + receive)44.7 kB45.0 kB+303 B (+0.7%)
    performance (trace)49.5 kB49.6 kB+76 B (+0.2%)
    remote-config (getAndFetch)43.9 kB44.2 kB+375 B (+0.9%)
    storage (getBytes)37.4 kB37.5 kB+76 B (+0.2%)
    storage (getDownloadURL)39.5 kB39.6 kB+76 B (+0.2%)
    storage (getMetadata)39.0 kB39.0 kB+76 B (+0.2%)
    storage (list + listAll)38.4 kB38.4 kB+76 B (+0.2%)
    storage (updateMetadata)39.2 kB39.3 kB+76 B (+0.2%)
    storage (uploadBytes)43.8 kB43.8 kB+76 B (+0.2%)
    storage (uploadBytesResumable)53.2 kB53.3 kB+76 B (+0.1%)
    storage (uploadString)44.0 kB44.0 kB+76 B (+0.2%)

  • firebase

    14 size changes

    TypeBase (19e37af)Merge (3e56114)Diff
    firebase-app-check-compat.js22.7 kB22.8 kB+84 B (+0.4%)
    firebase-app-check.js90.0 kB90.2 kB+175 B (+0.2%)
    firebase-app-compat.js27.6 kB27.7 kB+56 B (+0.2%)
    firebase-app.js87.4 kB87.6 kB+120 B (+0.1%)
    firebase-compat.js787 kB788 kB+787 B (+0.1%)
    firebase-firestore-lite.js267 kB837 kB+570 kB (+213.3%)
    firebase-firestore.js837 kB837 kB+92 B (+0.0%)
    firebase-messaging-compat.js37.5 kB37.9 kB+420 B (+1.1%)
    firebase-messaging-sw.js107 kB107 kB+467 B (+0.4%)
    firebase-messaging.js105 kB106 kB+467 B (+0.4%)
    firebase-performance-standalone-compat.es2017.js87.4 kB87.5 kB+76 B (+0.1%)
    firebase-performance-standalone-compat.js65.3 kB65.3 kB+76 B (+0.1%)
    firebase-remote-config-compat.js27.1 kB27.3 kB+227 B (+0.8%)
    firebase-remote-config.js112 kB113 kB+491 B (+0.4%)

Test Logs

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

@google-oss-bot
Copy link
Contributor

google-oss-bot commented May 31, 2022

Size Analysis Report 1

This report is too large (126,731 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

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

@maneesht
Copy link
Contributor

Looks like in packages/database-compat/src/index.node.ts we're using @firebase/app-compat, is that from the symlinked package then?

@hsubox76
Copy link
Contributor Author

hsubox76 commented Jun 2, 2022

Yes, it's used by both index.node.ts and index.ts. However I'm proposing that it's safe (if a little incorrect) to leave it out of peerDependencies because anyone using builds from index.node.ts or index.ts will be a client-side JS SDK consumer, and they'll already have it installed because npm installing firebase installs everything, including app-compat. Or if they're using it from the CDN, they'll have to have added the app-compat.js script before adding any other products.

Same rationale as outlined in #2082 (where we did the same thing, pre v9).

I've now added an eslint-disable comment in index.node.ts (same as was already in index.ts) to avoid the eslint error from this.

Copy link
Member

@lahirumaramba lahirumaramba left a comment

Choose a reason for hiding this comment

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

Thank you, Christina! LGTM!

@hsubox76 hsubox76 requested a review from egilmorez as a code owner June 3, 2022 17:13
@hsubox76 hsubox76 merged commit 497d34c into master Jun 6, 2022
@hsubox76 hsubox76 deleted the ch-peerdep branch June 6, 2022 16:34
@google-oss-bot google-oss-bot mentioned this pull request Jun 9, 2022
@firebase firebase locked and limited conversation to collaborators Jul 7, 2022
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.

None yet

4 participants