Closed Salakar closed 4 years ago
Thanks for the fix! there seems to be some TS errors
These are on master too - but I'll look into it, thanks!
@laurenzlong fixed the types issue that was on master - breaking change in the chai
types that was non semver, I've switched the version in package.json
to use approximate versioning.
Came across another issue after though with the dev dependencies; the firebase-admin
SDK was quite far out of date that the native GRPC dep wouldn't compile on the latest stable Node.js version - so I updated to the latest firebase-admin
& firebase-functions
versions. This broke the types as typescript
was too old, updated typescript to fix, that broke mocha types as too old, and so on 😅 - so I've just updated all of the dev dependencies and all is working well now.
I also had to remove Node.js v6 testing from travis - newer firebase-functions
versions uses async/await which isn't available on v6. Also the functions
runtimes now are only v8 & v10 so have updated travis to reflect.
Hope these additional changes to get CI working again are ok?
@Salakar This has now been released in v0.1.7
@laurenzlong Thank you 🎉
Description
I've been working on adding tests to firebase/extensions and when trying to wrap the function handlers used by Extensions (e.g.
functions.handler.firestore.document.onWrite
) it errors withTypeError: Cannot read property 'match' of undefined
as theeventType
key 'does' exist on thedefaultContext
object, but has anundefined
value assigned.This small PR adds an additional
undefined
check.Before:
After:
Code sample
N/A
cc @laurenzlong @karayu