diff --git a/firestore-bigquery-export/CHANGELOG.md b/firestore-bigquery-export/CHANGELOG.md index f7b9f8951..0107ac4fe 100644 --- a/firestore-bigquery-export/CHANGELOG.md +++ b/firestore-bigquery-export/CHANGELOG.md @@ -1,3 +1,7 @@ +## Version 0.1.37 + +fix - serialize timestamps to date string + ## Version 0.1.36 build - updated depenencies diff --git a/firestore-bigquery-export/extension.yaml b/firestore-bigquery-export/extension.yaml index 737d660b8..27dceb48f 100644 --- a/firestore-bigquery-export/extension.yaml +++ b/firestore-bigquery-export/extension.yaml @@ -13,7 +13,7 @@ # limitations under the License. name: firestore-bigquery-export -version: 0.1.36 +version: 0.1.37 specVersion: v1beta displayName: Stream Firestore to BigQuery diff --git a/firestore-bigquery-export/firestore-bigquery-change-tracker/package.json b/firestore-bigquery-export/firestore-bigquery-change-tracker/package.json index b42b027ea..809ff83c8 100644 --- a/firestore-bigquery-export/firestore-bigquery-change-tracker/package.json +++ b/firestore-bigquery-export/firestore-bigquery-change-tracker/package.json @@ -5,7 +5,7 @@ "url": "github.com/firebase/extensions.git", "directory": "firestore-bigquery-export/firestore-bigquery-change-tracker" }, - "version": "1.1.27", + "version": "1.1.28", "description": "Core change-tracker library for Cloud Firestore Collection BigQuery Exports", "main": "./lib/index.js", "scripts": { diff --git a/firestore-bigquery-export/firestore-bigquery-change-tracker/src/bigquery/index.ts b/firestore-bigquery-export/firestore-bigquery-change-tracker/src/bigquery/index.ts index b71ed08da..3e64df4c5 100644 --- a/firestore-bigquery-export/firestore-bigquery-change-tracker/src/bigquery/index.ts +++ b/firestore-bigquery-export/firestore-bigquery-change-tracker/src/bigquery/index.ts @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - +import * as admin from "firebase-admin"; import * as bigquery from "@google-cloud/bigquery"; import { DocumentReference } from "firebase-admin/firestore"; import * as traverse from "traverse"; @@ -155,6 +155,9 @@ export class FirestoreBigQueryEventHistoryTracker if (property.constructor.name === DocumentReference.name) { this.update(property.path); } + if (property instanceof admin.firestore.Timestamp) { + this.update(property.toDate()); + } } }); diff --git a/firestore-bigquery-export/functions/package-lock.json b/firestore-bigquery-export/functions/package-lock.json index a61996f26..a44c7b2ce 100644 --- a/firestore-bigquery-export/functions/package-lock.json +++ b/firestore-bigquery-export/functions/package-lock.json @@ -485,8 +485,9 @@ }, "node_modules/@firebaseextensions/firestore-bigquery-change-tracker": { "version": "1.1.27", - "resolved": "https://registry.npmjs.org/@firebaseextensions/firestore-bigquery-change-tracker/-/firestore-bigquery-change-tracker-1.1.27.tgz", - "integrity": "sha512-yyVo6qRvTZ/8pd/+czJgaIXv6bi6tRPscXiZYn2AoIgwwuAvtS6gr9oQ+tJOqhd65idbeBYPvS8kI3CYE22IIQ==", + "resolved": "file:firebaseextensions-firestore-bigquery-change-tracker-1.1.27.tgz", + "integrity": "sha512-NjQOKHNGIBO1JKxvurkjY/1AKwHuRj2SnKUrYQ7M5lwwlCQPTLh/A0L328li3iI0hgZQjHIDhwSHwgZjslw9Yw==", + "license": "Apache-2.0", "dependencies": { "@google-cloud/bigquery": "^4.7.0", "@google-cloud/resource-manager": "^3.0.0", @@ -11064,8 +11065,7 @@ }, "@firebaseextensions/firestore-bigquery-change-tracker": { "version": "1.1.27", - "resolved": "https://registry.npmjs.org/@firebaseextensions/firestore-bigquery-change-tracker/-/firestore-bigquery-change-tracker-1.1.27.tgz", - "integrity": "sha512-yyVo6qRvTZ/8pd/+czJgaIXv6bi6tRPscXiZYn2AoIgwwuAvtS6gr9oQ+tJOqhd65idbeBYPvS8kI3CYE22IIQ==", + "integrity": "sha512-NjQOKHNGIBO1JKxvurkjY/1AKwHuRj2SnKUrYQ7M5lwwlCQPTLh/A0L328li3iI0hgZQjHIDhwSHwgZjslw9Yw==", "requires": { "@google-cloud/bigquery": "^4.7.0", "@google-cloud/resource-manager": "^3.0.0", diff --git a/firestore-bigquery-export/functions/package.json b/firestore-bigquery-export/functions/package.json index 776f8216a..c1af64e7f 100644 --- a/firestore-bigquery-export/functions/package.json +++ b/firestore-bigquery-export/functions/package.json @@ -13,7 +13,7 @@ "author": "Jan Wyszynski ", "license": "Apache-2.0", "dependencies": { - "@firebaseextensions/firestore-bigquery-change-tracker": "^1.1.27", + "@firebaseextensions/firestore-bigquery-change-tracker": "^1.1.28", "@google-cloud/bigquery": "^4.7.0", "@types/chai": "^4.1.6", "@types/express-serve-static-core": "4.17.30",