From ce299a5f5b5fae435c8923234de6044a4d7bac90 Mon Sep 17 00:00:00 2001 From: Anatoly Pulyaevskiy Date: Thu, 4 Oct 2018 19:04:18 -0700 Subject: [PATCH] Upgraded to latest dependencies and firebase-functions 2.0.0 --- CHANGELOG.md | 5 +++++ README.md | 12 ++++++++---- analysis_options.yaml | 1 - example/package.json | 6 +++--- functions/build.yaml | 4 ++-- functions/package.json | 6 +++--- functions/pubspec.yaml | 4 ++-- package.json | 6 +++--- pubspec.yaml | 4 ++-- 9 files changed, 28 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 80bc4ed..8f92fa6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 1.0.0-dev.10.0 + +- Breaking change: upgraded to JS module firebase-functions `v2.0.5` which introduced breaking + changes in `DocumentSnapshot.createTime`, `DocumentSnapshot.updateTime` + ## 1.0.0-dev.9.0 - Fixed: EventContext.resource type changed from String to object. diff --git a/README.md b/README.md index 9ebcb66..efe41fe 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,10 @@ development preview, open-source project. [UPGRADING.md]: https://github.com/pulyaevskiy/firebase-functions-interop/blob/master/UPGRADING.md +> From version `1.0.0-dev.10.0` this library depends on the official Functions SDK version +> `2.0.0` or higher which introduced **breaking changes** in how `createTime` and `updateTime` +> are handled on `DocumentSnapshot` (returned as instances of new `Timestamp` type). + ## What is this? `firebase_functions_interop` provides interoperability layer for @@ -82,7 +86,7 @@ description: My project functions version: 0.0.1 environment: - sdk: '>=2.0.0-dev <2.0.0' + sdk: '>=2.0.0-dev <3.0.0' dependencies: # Firebase Functions bindings @@ -90,8 +94,8 @@ dependencies: dev_dependencies: # Needed to compile Dart to valid Node.js module. - build_runner: ^0.7.9 - build_node_compilers: ^0.1.0 + build_runner: ^1.0.0 + build_node_compilers: ^0.2.0 ``` Then run `pub get` to install dependencies. @@ -139,7 +143,7 @@ targets: compiler: dart2js # List any dart2js specific args here, or omit it. dart2js_args: - - --checked + - --minify ``` > By default `build_runner` compiles with DDC which is not supported by this diff --git a/analysis_options.yaml b/analysis_options.yaml index 77b6c54..effae00 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -1,5 +1,4 @@ analyzer: - strong-mode: true exclude: - functions/build/** diff --git a/example/package.json b/example/package.json index b02ff82..b237daf 100644 --- a/example/package.json +++ b/example/package.json @@ -14,9 +14,9 @@ "logs": "firebase functions:log" }, "dependencies": { - "firebase-admin": "5.12.0", - "firebase-functions": "1.0.1", - "@google-cloud/firestore": "0.13.1" + "firebase-admin": "6.0.0", + "firebase-functions": "2.0.5", + "@google-cloud/firestore": "0.16.0" }, "private": true } diff --git a/functions/build.yaml b/functions/build.yaml index a258d38..d60d863 100644 --- a/functions/build.yaml +++ b/functions/build.yaml @@ -10,5 +10,5 @@ targets: options: compiler: dart2js # List any dart2js specific args here, or omit it. - dart2js_args: - - --preview-dart-2 +# dart2js_args: +# - --preview-dart-2 diff --git a/functions/package.json b/functions/package.json index 711bd40..1b3b016 100644 --- a/functions/package.json +++ b/functions/package.json @@ -14,9 +14,9 @@ "logs": "firebase functions:log" }, "dependencies": { - "firebase-admin": "5.12.0", - "firebase-functions": "1.0.1", - "@google-cloud/firestore": "0.13.1" + "firebase-admin": "6.0.0", + "firebase-functions": "2.0.5", + "@google-cloud/firestore": "0.16.0" }, "private": true } diff --git a/functions/pubspec.yaml b/functions/pubspec.yaml index 4e01f9c..c25d3ad 100644 --- a/functions/pubspec.yaml +++ b/functions/pubspec.yaml @@ -12,5 +12,5 @@ dependencies: path: ../ dev_dependencies: - build_runner: ^0.10.1 - build_node_compilers: ^0.1.12 + build_runner: ^1.0.0 + build_node_compilers: ^0.2.0 diff --git a/package.json b/package.json index 0a9b953..31bb5cb 100644 --- a/package.json +++ b/package.json @@ -2,9 +2,9 @@ "name": "functions", "description": "Cloud Functions for Firebase", "dependencies": { - "firebase-admin": "5.12.0", - "firebase-functions": "1.0.1", - "@google-cloud/firestore": "0.13.0" + "firebase-admin": "6.0.0", + "firebase-functions": "2.0.5", + "@google-cloud/firestore": "0.16.0" }, "private": true } diff --git a/pubspec.yaml b/pubspec.yaml index c6b476c..b1a6087 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: firebase_functions_interop description: JS interop library which allows writing Firebase Cloud Functions in Dart. -version: 1.0.0-dev.9.0 +version: 1.0.0-dev.10.0 homepage: https://www.github.com/pulyaevskiy/firebase-functions-interop author: Anatoly Pulyaevskiy @@ -13,7 +13,7 @@ dependencies: node_interop: ^1.0.0-dev node_io: ^1.0.0-dev node_http: ^1.0.0-dev - firebase_admin_interop: ^1.0.0-dev + firebase_admin_interop: ^1.0.0-dev.20.0 dev_dependencies: test: ^1.0.0