Skip to content

Commit

Permalink
chore(firestore-counter): migration to Node.js v14 (firebase#664)
Browse files Browse the repository at this point in the history
* chore(firestore-counter): migration to Node.js v12

* Updated engine to node14, build fixes and updated target lib
  • Loading branch information
dackers86 authored Jun 16, 2021
1 parent 42af0d2 commit cf992e6
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion firestore-counter/PREINSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ To install an extension, your project must be on the [Blaze (pay as you go) plan
- You will be charged a small amount (typically around $0.01/month) for the Firebase resources required by this extension (even if it is not used).
- This extension uses other Firebase and Google Cloud Platform services, which have associated charges if you exceed the service’s free tier:
- Cloud Firestore
- Cloud Functions (Node.js 10+ runtime. [See FAQs](https://firebase.google.com/support/faq#expandable-24))
- Cloud Functions (Node.js 10+ runtime. [See FAQs](https://firebase.google.com/support/faq#extensions-pricing))
2 changes: 1 addition & 1 deletion firestore-counter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ To install an extension, your project must be on the [Blaze (pay as you go) plan
- You will be charged a small amount (typically around $0.01/month) for the Firebase resources required by this extension (even if it is not used).
- This extension uses other Firebase and Google Cloud Platform services, which have associated charges if you exceed the service’s free tier:
- Cloud Firestore
- Cloud Functions (Node.js 10+ runtime. [See FAQs](https://firebase.google.com/support/faq#expandable-24))
- Cloud Functions (Node.js 10+ runtime. [See FAQs](https://firebase.google.com/support/faq#extensions-pricing))



Expand Down
6 changes: 3 additions & 3 deletions firestore-counter/extension.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ resources:
description: This scheduled function either aggregates shards itself, or it schedules and monitors workers to aggregate shards.
properties:
location: ${param:LOCATION}
runtime: nodejs10
runtime: nodejs14
maxInstances: 1
scheduleTrigger:
schedule: "every ${param:SCHEDULE_FREQUENCY} minutes"
Expand All @@ -60,7 +60,7 @@ resources:
description: Listens for changes on counter shards that may need aggregating. This function is limited to max 1 instance.
properties:
location: ${param:LOCATION}
runtime: nodejs10
runtime: nodejs14
maxInstances: 1
timeout: 120s
eventTrigger:
Expand All @@ -74,7 +74,7 @@ resources:
The controllerCore function is responsible for scheduling and monitoring these workers.
properties:
location: ${param:LOCATION}
runtime: nodejs10
runtime: nodejs14
eventTrigger:
eventType: providers/cloud.firestore/eventTypes/document.write
resource: projects/${param:PROJECT_ID}/databases/(default)/documents/${param:INTERNAL_STATE_PATH}/workers/{workerId}
Expand Down
2 changes: 1 addition & 1 deletion firestore-counter/functions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"dependencies": {
"deep-equal": "^1.0.1",
"firebase-admin": "^8.3.0",
"firebase-functions": "^3.9.0",
"firebase-functions": "^3.13.2",
"uuid": "^3.3.2"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions firestore-counter/functions/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"target": "es2018",
"lib": ["es2018"],
"target": "ES2020",
"lib": ["ES2020"],
"outDir": "lib",
"types": ["node", "mocha", "chai"]
},
Expand Down

0 comments on commit cf992e6

Please sign in to comment.