From 8be089e4bb794f44b7456eb1710e818fbd0a6fe8 Mon Sep 17 00:00:00 2001 From: Joe Hanley Date: Wed, 30 Jan 2019 09:58:16 -0800 Subject: [PATCH 1/4] updating changelog --- changelog.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index 7f8cac513..c3112d193 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,2 +1,5 @@ feature - support for multiple regions on functions by passing extra region strings to functions.regions() -fixed - validation on instance name for realtime database triggers \ No newline at end of file +fixed - validation on instance name for realtime database triggers +fixed - https functions are now the same type as other functions +fixed - HTTPSError now requires message, to match gcloud standards +fixed - Validation for region and timeout seconds params From 612fb0235edbd6737c84cecd94e9eaad0e060e8c Mon Sep 17 00:00:00 2001 From: Joe Hanley Date: Wed, 30 Jan 2019 13:25:02 -0800 Subject: [PATCH 2/4] updating tsc version --- integration_test/package.node6.json | 4 ++-- integration_test/package.node8.json | 4 ++-- package.json | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/integration_test/package.node6.json b/integration_test/package.node6.json index efc6380a8..fe181f54c 100644 --- a/integration_test/package.node6.json +++ b/integration_test/package.node6.json @@ -8,13 +8,13 @@ "@google-cloud/pubsub": "~0.19.0", "@types/google-cloud__pubsub": "^0.18.0", "@types/lodash": "~4.14.41", - "firebase-admin": "~6.0.0", + "firebase-admin": "./firebase-admin-7.0.0-rc0.tgz", "firebase-functions": "./firebase-functions.tgz", "lodash": "~4.17.2" }, "main": "lib/index.js", "devDependencies": { - "typescript": "~2.8.3" + "typescript": "~3.1.0" }, "engines": { "node": "6" diff --git a/integration_test/package.node8.json b/integration_test/package.node8.json index 0de718c2a..c3d727ccc 100644 --- a/integration_test/package.node8.json +++ b/integration_test/package.node8.json @@ -8,13 +8,13 @@ "@google-cloud/pubsub": "~0.19.0", "@types/google-cloud__pubsub": "^0.18.0", "@types/lodash": "~4.14.41", - "firebase-admin": "~6.0.0", + "firebase-admin": "./firebase-admin-7.0.0-rc0.tgz", "firebase-functions": "./firebase-functions.tgz", "lodash": "~4.17.2" }, "main": "lib/index.js", "devDependencies": { - "typescript": "~2.8.3" + "typescript": "~3.1.0" }, "engines": { "node": "8" diff --git a/package.json b/package.json index f8339ad84..d3a238565 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "@types/sinon": "^1.16.29", "chai": "^3.5.0", "chai-as-promised": "^5.2.0", - "firebase-admin": "~6.0.0", + "firebase-admin": "file:firebase-admin-7.0.0-rc0.tgz", "istanbul": "^0.4.2", "mocha": "^5.2.0", "mock-require": "^2.0.1", @@ -48,10 +48,10 @@ "prettier": "^1.13.7", "sinon": "^1.17.4", "ts-node": "^7.0.1", - "typescript": "~2.8.3" + "typescript": "~3.1.0" }, "peerDependencies": { - "firebase-admin": "~6.0.0" + "firebase-admin": "./firebase-admin-7.0.0-rc0.tgz" }, "dependencies": { "@types/cors": "^2.8.1", From ab1309a6a04e1bfab60270b90c5f1ebb29cbabed Mon Sep 17 00:00:00 2001 From: Joe Hanley Date: Wed, 30 Jan 2019 13:44:38 -0800 Subject: [PATCH 3/4] Remove uneeded firestore.settings calls --- integration_test/functions/src/index.ts | 1 - src/providers/firestore.ts | 2 -- 2 files changed, 3 deletions(-) diff --git a/integration_test/functions/src/index.ts b/integration_test/functions/src/index.ts index 56cbba7f6..dd8b1b4fc 100644 --- a/integration_test/functions/src/index.ts +++ b/integration_test/functions/src/index.ts @@ -19,7 +19,6 @@ const numTests = Object.keys(exports).length; // Assumption: every exported func import 'firebase-functions'; // temporary shim until process.env.FIREBASE_CONFIG available natively in GCF(BUG 63586213) const firebaseConfig = JSON.parse(process.env.FIREBASE_CONFIG); admin.initializeApp(); -admin.firestore().settings({ timestampsInSnapshots: true }); // TODO(klimt): Get rid of this once the JS client SDK supports callable triggers. function callHttpsTrigger(name: string, data: any) { diff --git a/src/providers/firestore.ts b/src/providers/firestore.ts index 7a2931618..20dee281f 100644 --- a/src/providers/firestore.ts +++ b/src/providers/firestore.ts @@ -145,7 +145,6 @@ function _getValueProto(data: any, resource: string, valueFieldName: string) { export function snapshotConstructor(event: Event): DocumentSnapshot { if (!firestoreInstance) { firestoreInstance = firebase.firestore(apps().admin); - firestoreInstance.settings({ timestampsInSnapshots: true }); } let valueProto = _getValueProto( event.data, @@ -161,7 +160,6 @@ export function snapshotConstructor(event: Event): DocumentSnapshot { export function beforeSnapshotConstructor(event: Event): DocumentSnapshot { if (!firestoreInstance) { firestoreInstance = firebase.firestore(apps().admin); - firestoreInstance.settings({ timestampsInSnapshots: true }); } let oldValueProto = _getValueProto( event.data, From 62cbe0ac9f86a29c87862a6fe03901121b0546c0 Mon Sep 17 00:00:00 2001 From: Joe Hanley Date: Thu, 31 Jan 2019 10:17:19 -0800 Subject: [PATCH 4/4] switching to firebase-admin 7.0.0 --- integration_test/package.node6.json | 2 +- integration_test/package.node8.json | 2 +- package.json | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/integration_test/package.node6.json b/integration_test/package.node6.json index fe181f54c..c7397753d 100644 --- a/integration_test/package.node6.json +++ b/integration_test/package.node6.json @@ -8,7 +8,7 @@ "@google-cloud/pubsub": "~0.19.0", "@types/google-cloud__pubsub": "^0.18.0", "@types/lodash": "~4.14.41", - "firebase-admin": "./firebase-admin-7.0.0-rc0.tgz", + "firebase-admin": "~7.0.0", "firebase-functions": "./firebase-functions.tgz", "lodash": "~4.17.2" }, diff --git a/integration_test/package.node8.json b/integration_test/package.node8.json index c3d727ccc..ae861c35b 100644 --- a/integration_test/package.node8.json +++ b/integration_test/package.node8.json @@ -8,7 +8,7 @@ "@google-cloud/pubsub": "~0.19.0", "@types/google-cloud__pubsub": "^0.18.0", "@types/lodash": "~4.14.41", - "firebase-admin": "./firebase-admin-7.0.0-rc0.tgz", + "firebase-admin": "~7.0.0", "firebase-functions": "./firebase-functions.tgz", "lodash": "~4.17.2" }, diff --git a/package.json b/package.json index d3a238565..390f943fd 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "@types/sinon": "^1.16.29", "chai": "^3.5.0", "chai-as-promised": "^5.2.0", - "firebase-admin": "file:firebase-admin-7.0.0-rc0.tgz", + "firebase-admin": "~7.0.0", "istanbul": "^0.4.2", "mocha": "^5.2.0", "mock-require": "^2.0.1", @@ -51,7 +51,7 @@ "typescript": "~3.1.0" }, "peerDependencies": { - "firebase-admin": "./firebase-admin-7.0.0-rc0.tgz" + "firebase-admin": "~7.0.0" }, "dependencies": { "@types/cors": "^2.8.1",