Skip to content

Commit 43e68af

Browse files
authored
Allow firebase-admin v10. Add integration tests for Node 16 (#998)
* Allow firebase-admin v10. Add integration tests for Node 16 * Add changelog. Run formatter * rerun formatter
1 parent 11e045a commit 43e68af

File tree

7 files changed

+5875
-71
lines changed

7 files changed

+5875
-71
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
- GCS Enhancement
22
- Add option to allow callable functions to ignore invalid App Check tokens.
3+
- Add firebase-admin v10 as an allowed peer dependency

integration_test/package.json.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
},
77
"dependencies": {
88
"@google-cloud/pubsub": "^2.10.0",
9-
"firebase-admin": "^9.1.0",
9+
"firebase-admin": "__FIREBASE_ADMIN__",
1010
"firebase-functions": "__SDK_TARBALL__",
1111
"lodash": "~4.17.2"
1212
},

integration_test/run_tests.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ function create_package_json {
6868
# backup file called package.json-e that we should clean up afterwards.
6969
sed -i -e "s/__SDK_TARBALL__/firebase-functions-$1.tgz/g" functions/package.json
7070
sed -i -e "s/__NODE_VERSION__/$2/g" functions/package.json
71+
sed -i -e "s/__FIREBASE_ADMIN__/$3/g" functions/package.json
7172
rm -f functions/package.json-e
7273
}
7374

@@ -138,8 +139,13 @@ build_sdk
138139
delete_all_functions
139140
set_region
140141

141-
for version in 10 12 14; do
142-
create_package_json $TIMESTAMP $version
142+
for version in 10 12 14 16; do
143+
if [[ "$version" -eq 10 ]]; then
144+
admin_sdk="^9.12.0"
145+
else
146+
admin_sdk="^10.0.0"
147+
fi
148+
create_package_json $TIMESTAMP $version $admin_sdk
143149
install_deps
144150
announce "Re-deploying the same functions to Node $version runtime ..."
145151
deploy

0 commit comments

Comments
 (0)