Skip to content

Modular Admin Node.js SDK Alpha Preview #1230

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

Closed
hiranya911 opened this issue Apr 19, 2021 · 1 comment
Closed

Modular Admin Node.js SDK Alpha Preview #1230

hiranya911 opened this issue Apr 19, 2021 · 1 comment

Comments

@hiranya911
Copy link
Contributor

Hey everyone,

We are introducing a new version of the Firebase Admin Node.js SDK.

If you are interested in trying it:

  1. Please join our group via this form
  2. Check out our alpha documentation website

The website has a guide on getting started and the API reference. We'll be updating the site soon with a list of common use cases.

We hope you all like the new changes and we also hope to hear feedback from you over in our Admin SDK Discussion Board.

What's new in this version?
Admin SDK currently exposes a single global namespace that houses all other sub-namespaces, types and functions. The new version of the SDK exposes several module entry points, which allows you to import each Firebase product (e.g. Auth, Firestore, RTDB etc) separately.

Is it fully modular like the Beta Web SDK?
Not quite. While we expose different products as separate module entry points, the individual product-level operations are still exposed as methods on an object. In other words, the product-level operations are not treeshakeable. We drew the line here since further modularization does not result in significant gains in terms of import sizes, and also it’s more consistent with the other server-side Node.js libraries shipped by Google Cloud.

Can I use it with native ESM modules?
The Admin SDK is still shipped as a CommonJS (CJS) package, and currently doesn’t provide any ESM entry points. You can still use it with native ESM code (available in Node 12 and up), but you will have to use the ESM-CJS interop mode. This means you will not be able to use named imports. Let us know how important this use case is for your applications, and we can certainly revisit this topic in our next development iterations.

@hiranya911 hiranya911 pinned this issue Apr 19, 2021
@firebase firebase locked and limited conversation to collaborators Apr 19, 2021
@hiranya911
Copy link
Contributor Author

If you had a chance to try our alpha preview, please take 2 minutes to submit some feedback. Survey link available at #1332

@hiranya911 hiranya911 unpinned this issue Sep 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant