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

Share code with Admin SDK properly #5537

Merged
merged 6 commits into from
Sep 24, 2021
Merged

Share code with Admin SDK properly #5537

merged 6 commits into from
Sep 24, 2021

Conversation

Feiyang1
Copy link
Member

@Feiyang1 Feiyang1 commented Sep 23, 2021

Share database code with Admin SDK via a dedicated entry point which doesn't depend on @firebase/app.

Admin SDK is currently broken with v9 @firebase/database-compat. After this change is merged, Admin needs to change imports from @firebase/database-compat to @firebase/database-compat/standalone.

@changeset-bot
Copy link

changeset-bot bot commented Sep 23, 2021

🦋 Changeset detected

Latest commit: 7ad9ecd

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

This PR includes changesets to release 3 packages
Name Type
@firebase/database-compat Patch
@firebase/database 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 Sep 23, 2021

Changeset File Check ✅

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

@Feiyang1 Feiyang1 requested a review from egilmorez as a code owner September 23, 2021 22:42
@google-oss-bot
Copy link
Contributor

google-oss-bot commented Sep 23, 2021

Binary Size Report

Affected SDKs

  • @firebase/database-compat

    Type Base (1261137) Head (1af7648) Diff
    browser 18.0 kB 17.9 kB -109 B (-0.6%)
    esm5 21.1 kB 21.0 kB -109 B (-0.5%)
    main 22.9 kB 21.7 kB -1.14 kB (-5.0%)
    module 18.0 kB 17.9 kB -109 B (-0.6%)
  • @firebase/database-compat/standalone

    Type Base (1261137) Head (1af7648) Diff
    main ? 369 kB ? (?)

Test Logs

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Sep 23, 2021

Size Analysis Report

Affected Products

No changes between base commit (1261137) and head commit (1af7648).

Copy link
Contributor

@hiranya911 hiranya911 left a comment

Choose a reason for hiding this comment

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

Looks mostly good (and a lot cleaner). A couple of nits and a question.

packages/database-compat/standalone/package.json Outdated Show resolved Hide resolved
packages/database/src/index.standalone.ts Show resolved Hide resolved
} from './api/test_access';
/* eslint-enable camelcase */
export * from './api.standalone';
export { getDatabase } from './api/Database';
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks!

setWebSocketImpl(Client);

// This entry point should only be consumed by Admin SDK
export * from './api.standalone';
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing empty line.

Copy link
Contributor

@hiranya911 hiranya911 left a comment

Choose a reason for hiding this comment

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

Thanks. LGTM 👍

Does this need any kind of tests?

@Feiyang1
Copy link
Member Author

It might be worth adding a test to make sure that the build for the standalone entry point doesn't pull in @firebase/app. I will add it in a separate PR.

@Feiyang1 Feiyang1 merged commit dfe65ff into master Sep 24, 2021
@Feiyang1 Feiyang1 deleted the fei-admin-share branch September 24, 2021 18:04
@google-oss-bot google-oss-bot mentioned this pull request Sep 24, 2021
@firebase firebase locked and limited conversation to collaborators Oct 25, 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.

4 participants