-
Notifications
You must be signed in to change notification settings - Fork 945
console build for rtdb #3709
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
console build for rtdb #3709
Conversation
💥 No ChangesetLatest commit: 42c0025 Merging this PR will not cause any packages to be released. If these changes should not cause updates to packages in this repo, this is fine 🙂 If these changes should be published to npm, you need to add a changeset. This PR includes no changesetsWhen 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 |
Size Analysis ReportAffected ProductsNo changes between base commit (ff66d8c) and head commit (96420d8). Test Logs
|
export function initStandalone<T>({ | ||
app, | ||
url, | ||
version, | ||
customAuthImpl, | ||
namespace | ||
}: { | ||
app: FirebaseApp; | ||
url: string; | ||
version: string; | ||
customAuthImpl: FirebaseAuthInternal; | ||
namespace: T; | ||
}): { | ||
instance: types.Database; | ||
namespace: T; | ||
} { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not married to the original way this was implemented, but I don't see much benefit of splitting this code across two different functions that are both named the same. Reducing this back down to one method would also remove the options object, which marginally improves readability but adds some duplication to ensure type safety. What do you think of moving this code back?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved it here to make it available via firebase.database.INTERNAL.initStandalone
, so console can consume the normal cdn script without needing a special build target.
https://github.com/firebase/firebase-js-sdk/blob/master/packages/database/index.node.ts#L139
Binary Size ReportAffected SDKs
Test Logs
|
No description provided.