Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion integration_test/functions/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions integration_test/package.node6.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "~7.0.0",
"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"
Expand Down
4 changes: 2 additions & 2 deletions integration_test/package.node8.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "~7.0.0",
"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"
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,18 @@
"@types/sinon": "^1.16.29",
"chai": "^3.5.0",
"chai-as-promised": "^5.2.0",
"firebase-admin": "~6.0.0",
"firebase-admin": "~7.0.0",
"istanbul": "^0.4.2",
"mocha": "^5.2.0",
"mock-require": "^2.0.1",
"nock": "^9.0.0",
"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": "~7.0.0"
},
"dependencies": {
"@types/cors": "^2.8.1",
Expand Down
2 changes: 0 additions & 2 deletions src/providers/firestore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down