Repository: firebase/firebase-tools
Pull request #1478 (2019-07-08 21:04:08)

Update templates to latest functions SDK
We are releasing functions SDK v3.1.0, so updating the templates in the init portion of the functions to use latest version.

coveralls: 
[![Coverage Status](https://coveralls.io/builds/24436526/badge)](https://coveralls.io/builds/24436526)

Coverage remained the same at 61.644% when pulling **936923abb46103b51ad2fcfedec2d773a2411f79 on dt-functions-3.1.0** into **838f1a28db46e4d252a9c3b66522cebcaf547131 on master**.

thechenky: I'm really not understanding why the tests keep failing, this is cosmetic change
samtstern: @thechenky the hosting functional test has been really flaky today due to some 500s coming from production.  I got the same error you got on a totally unrelated PR:
```
Error: HTTP Error: 500, Request '/ApiKeys.ListApiKeys' from role 'mobilesdk-devrel-frontend' throttled: Service is overloaded (too-many-retries) go/tr-o.
```
thechenky: @samtstern thanks for the context! 
bkendall: I updated your branch, so you may have to pull...
thechenky: Got it, thanks! This should be good to go now, we released 3.1.0 earlier today.

Patch:
diff --git a/changelog.txt b/changelog.txt
index b808e6bcb..e1e14f20c 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -5,3 +5,4 @@
 * Allow the Firestore emulator to give more information about invalid rulesets.
 * Hot reload firestore rules on change.
 * Upgrade archiver dependency to 3.0.0.
+* Update functions init templates to `v3.1.0`
diff --git a/templates/init/functions/javascript/package.lint.json b/templates/init/functions/javascript/package.lint.json
index fa96a336a..de5f03d70 100644
--- a/templates/init/functions/javascript/package.lint.json
+++ b/templates/init/functions/javascript/package.lint.json
@@ -14,7 +14,7 @@
   },
   "dependencies": {
     "firebase-admin": "^8.0.0",
-    "firebase-functions": "^3.0.0"
+    "firebase-functions": "^3.1.0"
   },
   "devDependencies": {
     "eslint": "^5.12.0",
diff --git a/templates/init/functions/javascript/package.nolint.json b/templates/init/functions/javascript/package.nolint.json
index 5f51182a3..c7b054f71 100644
--- a/templates/init/functions/javascript/package.nolint.json
+++ b/templates/init/functions/javascript/package.nolint.json
@@ -13,7 +13,7 @@
   },
   "dependencies": {
     "firebase-admin": "^8.0.0",
-    "firebase-functions": "^3.0.0"
+    "firebase-functions": "^3.1.0"
   },
   "devDependencies": {
     "firebase-functions-test": "^0.1.6"
diff --git a/templates/init/functions/typescript/package.lint.json b/templates/init/functions/typescript/package.lint.json
index eff974304..9257187bb 100644
--- a/templates/init/functions/typescript/package.lint.json
+++ b/templates/init/functions/typescript/package.lint.json
@@ -15,7 +15,7 @@
   "main": "lib/index.js",
   "dependencies": {
     "firebase-admin": "^8.0.0",
-    "firebase-functions": "^3.0.0"
+    "firebase-functions": "^3.1.0"
   },
   "devDependencies": {
     "tslint": "^5.12.0",
diff --git a/templates/init/functions/typescript/package.nolint.json b/templates/init/functions/typescript/package.nolint.json
index c51fc1d97..904206626 100644
--- a/templates/init/functions/typescript/package.nolint.json
+++ b/templates/init/functions/typescript/package.nolint.json
@@ -14,7 +14,7 @@
   "main": "lib/index.js",
   "dependencies": {
     "firebase-admin": "^8.0.0",
-    "firebase-functions": "^3.0.0"
+    "firebase-functions": "^3.1.0"
   },
   "devDependencies": {
     "typescript": "^3.2.2"


Test patch:
diff --git a/scripts/triggers-end-to-end-tests/functions/package.json b/scripts/triggers-end-to-end-tests/functions/package.json
index 5f51182a3..c7b054f71 100644
--- a/scripts/triggers-end-to-end-tests/functions/package.json
+++ b/scripts/triggers-end-to-end-tests/functions/package.json
@@ -13,7 +13,7 @@
   },
   "dependencies": {
     "firebase-admin": "^8.0.0",
-    "firebase-functions": "^3.0.0"
+    "firebase-functions": "^3.1.0"
   },
   "devDependencies": {
     "firebase-functions-test": "^0.1.6"