Why @google-cloud/storage is listed as an optional dependency?
#1605
-
|
I just wonder why this package is listed as an optional dependency, and not a usual dependency. I suspect that because of this the |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
|
I think it's by design, but have not noticed it being mentioned in the Changelogs (I read them meticulously). It did change, at one point. But about "why"... I don't work for Firebase, but I think the intention is to make also the I generally like the approach. Only it deserves to be documented so that it doesn't cause surprises for us developers. Namely, sometimes the necessary library is brought in other ways, and things seem to work... |
Beta Was this translation helpful? Give feedback.
-
|
@akauppi's answer above is correct. |
Beta Was this translation helpful? Give feedback.
@akauppi's answer above is correct.
@google-cloud/storageand@google-cloud/firestoreare optional by design. Developers relying on other APIs of the SDK can safely remove those dependencies if they are concerned about the SDK size etc. A fresh install offirebase-adminshould pull the latest release (minor or patch version in the major version referenced inpackage.json) of the optional dependencies, but if you already have apackage-lockfile explicitly adding those dependencies or manually upgrading is the way to keep them updated. Just make surefirebase-adminis compatible with the version you use.