firebase-functions-test icon indicating copy to clipboard operation
firebase-functions-test copied to clipboard

Support `firebase-admin` v11.0 / npm peer dependency warning after upgrade of `firebase-admin`

Open sceee opened this issue 3 years ago • 1 comments
trafficstars

Version info

firebase-functions-test: 2.2.0

firebase-functions: 3.21.2

firebase-admin: 11.0.0

Test case

n/a, peer dependency warning emitted by npm 8. Relates to https://github.com/firebase/firebase-functions/issues/1147 .

Steps to reproduce

Update firebase-admin to v11 using the above mentioned versions for firebase-functions-test and firebase-functions.

The following peer dependency warning is emitted by npm:

npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: functions@undefined
npm WARN Found: [email protected]
npm WARN node_modules/firebase-admin
npm WARN   firebase-admin@"^11.0.0" from the root project
npm WARN   2 more (firebase-functions, firebase-functions-test)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer firebase-admin@"^8.0.0 || ^9.0.0 || ^10.0.0" from [email protected]
npm WARN node_modules/firebase-functions
npm WARN   firebase-functions@"^3.21.2" from the root project
npm WARN   1 more (firebase-functions-test)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: functions@undefined
npm WARN Found: [email protected]
npm WARN node_modules/firebase-admin
npm WARN   firebase-admin@"^11.0.0" from the root project
npm WARN   2 more (firebase-functions, firebase-functions-test)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer firebase-admin@"^8.0.0 || ^9.0.0 || ^10.0.0" from [email protected]
npm WARN node_modules/firebase-functions
npm WARN   firebase-functions@"^3.21.2" from the root project
npm WARN   1 more (firebase-functions-test)

Expected behavior

firebase-functions-test is compatible with firebase-admin v11 and npm does not emit the peer dependency warning.

Actual behavior

See above.

sceee avatar Jun 20 '22 09:06 sceee

Note that using this package with firebase-admin 11 also breaks, Timestamp instances are not recognized anymore:

Cannot encode 063776714400.000000000to a Firestore Value. Local testing does not yet support objects of type Timestamp.

mpsq avatar Jun 28 '22 12:06 mpsq

@sceee

Thank you for the bug report! This should be fixed with [email protected] with https://github.com/firebase/firebase-functions/pull/1151.

Please let me know if you're seeing the issue given [email protected].

@mpsq

Is this still reproducible with the latest version of firebase-function? Do you have an example repo I could take a look at?

TheIronDev avatar Aug 29 '22 19:08 TheIronDev

@TheIronDev Thanks, I can confirm this was resolved in the meantime as you mentioned.

sceee avatar Aug 30 '22 08:08 sceee

@TheIronDev This is now fixed ;) issue was on my side.

mpsq avatar Sep 20 '22 15:09 mpsq

@sceee @mpsq

Thank you for checking again!!

TheIronDev avatar Oct 01 '22 02:10 TheIronDev