Skip to content

Commit 3d2d20e

Browse files
committed
feat: 3.2.0
1 parent 754fc21 commit 3d2d20e

File tree

17 files changed

+117
-104
lines changed

17 files changed

+117
-104
lines changed

CHANGELOG.md

Lines changed: 41 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,81 @@
11
# nx-cloud-functions-deployer
22

3-
## 3.0.0 (beta)
3+
## 3.2.0
44

55
### Changes
66

7-
- Upgrade to nx 20
8-
- Upgrade to firebase-functions v6
7+
- Support for node 22
8+
9+
## 3.1.0
10+
11+
### Changes
12+
13+
- Upgrade to nx 20
14+
- Upgrade to firebase-functions v6
15+
16+
## 3.0.0
17+
18+
### Changes
19+
20+
- Upgrade to nx 20
21+
- Upgrade to firebase-functions v6
922

1023
## 2.5.0
1124

1225
### Changes
1326

14-
- Emulate command (can now build all functions and emulate it with one firebase.json file)
15-
- Added auth triggers: onCreate, onDelete, beforeCreate, beforeDelete.
16-
- Added "minify" option to deploy command.
27+
- Emulate command (can now build all functions and emulate it with one firebase.json file)
28+
- Added auth triggers: onCreate, onDelete, beforeCreate, beforeDelete.
29+
- Added "minify" option to deploy command.
1730

1831
## 2.2.0
1932

2033
### Changes
2134

22-
- Made esbuild work on linux
23-
- Added `deleteAll` option to delete all functions in a project.
24-
- Added new executable `read-env` to read the environment variables.
35+
- Made esbuild work on linux
36+
- Added `deleteAll` option to delete all functions in a project.
37+
- Added new executable `read-env` to read the environment variables.
2538

2639
## 2.1.0
2740

2841
### Changes
2942

30-
- Added `pnpmFix` option to fix pnpm install issues with firebase-tools and firebase-functions. It will npm install each functions and use the global firebase-tools to deploy.
31-
- Fix firestore and document function deploy
43+
- Added `pnpmFix` option to fix pnpm install issues with firebase-tools and firebase-functions. It will npm install each functions and use the global firebase-tools to deploy.
44+
- Fix firestore and document function deploy
3245

3346
## 2.0.0
3447

3548
### Changes
3649

37-
- Migrated all functions to v2.
38-
- Now all firestore triggers needs to be under `firestore` folder, `database` folder is not used for real time database triggers.
39-
- Removed v1 support for firebase functions, now only v2 is supported.
50+
- Migrated all functions to v2.
51+
- Now all firestore triggers needs to be under `firestore` folder, `database` folder is not used for real time database triggers.
52+
- Removed v1 support for firebase functions, now only v2 is supported.
4053

4154
## 1.1.0
4255

4356
### Changes
4457

45-
- Added support for AWS SAM deploy and logs
46-
- Removed esbuild-plugin-alias, now esbuild looks directly at tsconfig.json for paths
47-
- Made import paths relative to fix for windows users
48-
- Added CFD_FUNCTION_NAME env to each function, so you can use it in your code, example setting tags to sentry.
58+
- Added support for AWS SAM deploy and logs
59+
- Removed esbuild-plugin-alias, now esbuild looks directly at tsconfig.json for paths
60+
- Made import paths relative to fix for windows users
61+
- Added CFD_FUNCTION_NAME env to each function, so you can use it in your code, example setting tags to sentry.
4962

5063
## 1.0.0
5164

5265
### Changes
5366

54-
- Added support for multiple firebase projects, not just prod and dev
55-
- Updated function cache, the parameters are now a object instead of a string
56-
- It now passes in the flavor
57-
- Removed firebaseProjectProdId, firebaseProjectDevId, prodEnvFileName and devEnvFileName
58-
- Made flavors required
59-
- Renamed dev to development and prod to production
60-
- Renamed functions-config.{flavor}.ts to script.config.{flavor}.ts
61-
- Now scripts can use prompts from the user
62-
- Support node18
67+
- Added support for multiple firebase projects, not just prod and dev
68+
- Updated function cache, the parameters are now a object instead of a string
69+
- It now passes in the flavor
70+
- Removed firebaseProjectProdId, firebaseProjectDevId, prodEnvFileName and devEnvFileName
71+
- Made flavors required
72+
- Renamed dev to development and prod to production
73+
- Renamed functions-config.{flavor}.ts to script.config.{flavor}.ts
74+
- Now scripts can use prompts from the user
75+
- Support node18
6376

6477
## 0.1.0
6578

6679
### Minor Changes
6780

68-
- Initial release
81+
- Initial release

README.md

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -6,48 +6,48 @@ This is a plugin for [Nx](https://nx.dev) that adds support for deploying [Cloud
66

77
From version 2.0.0 this plugin only supports cloud functions v2, if you want v1 support use version 1.2.2.
88

9-
- [Features](#features)
10-
- [Install](#install)
11-
- [Description](#description)
12-
- [Prerequisites](#prerequisites)
13-
- [Helper Functions](#helper-functions)
14-
- [Schedule Example](#schedule-example)
15-
- [Auth Example](#auth-example)
16-
- [Database Example](#database-example)
17-
- [Firestore Example](#firestore-example)
18-
- [Https Example](#https-example)
19-
- [Assets and external dependencies](#assets-and-external-dependencies)
20-
- [Limitations](#limitations)
21-
- [Folder Structure](#folder-structure)
22-
- [Firestore Structure](#firestore-structure)
23-
- [Custom Structure](#custom-structure)
24-
- [Cloud cache](#cloud-cache)
25-
- [Logger](#logger)
26-
- [Executors](#executors)
27-
- [deploy](#deploy) - [deploy options](#deploy-options) - [deploy examples](#deploy-examples)
28-
- [script](#script) - [script options](#script-options) - [script examples](#script-examples)
29-
- [delete](#delete) - [delete options](#delete-options)
30-
- [emulate](#emulate) - [emulate options](#emulate-options)
31-
- [read-env](#read-env) - [read-env options](#read-env-options)
32-
- [rules](#rules)
33-
- [sam](#sam)
9+
- [Features](#features)
10+
- [Install](#install)
11+
- [Description](#description)
12+
- [Prerequisites](#prerequisites)
13+
- [Helper Functions](#helper-functions)
14+
- [Schedule Example](#schedule-example)
15+
- [Auth Example](#auth-example)
16+
- [Database Example](#database-example)
17+
- [Firestore Example](#firestore-example)
18+
- [Https Example](#https-example)
19+
- [Assets and external dependencies](#assets-and-external-dependencies)
20+
- [Limitations](#limitations)
21+
- [Folder Structure](#folder-structure)
22+
- [Firestore Structure](#firestore-structure)
23+
- [Custom Structure](#custom-structure)
24+
- [Cloud cache](#cloud-cache)
25+
- [Logger](#logger)
26+
- [Executors](#executors)
27+
- [deploy](#deploy) - [deploy options](#deploy-options) - [deploy examples](#deploy-examples)
28+
- [script](#script) - [script options](#script-options) - [script examples](#script-examples)
29+
- [delete](#delete) - [delete options](#delete-options)
30+
- [emulate](#emulate) - [emulate options](#emulate-options)
31+
- [read-env](#read-env) - [read-env options](#read-env-options)
32+
- [rules](#rules)
33+
- [sam](#sam)
3434

3535
## Features
3636

37-
- Auto alias support
38-
- Support for multiple [environments](https://firebase.google.com/docs/functions/config-env)
39-
- Esbuild for faster builds
40-
- Detect changes and only deploy changed functions
41-
- No longer export all functions in a index.ts file, but deploy each function individually for smaller bundles
42-
- Configurable deploy options
43-
- Deploy with Node 14/16/18/20 and esm
44-
- Cloud functions v2 support
45-
- Deploy rules and indexes
46-
- Execute scripts locally
47-
- Read env file and copy to clipboard
48-
- Cloud cache support
49-
- Run emulators locally
50-
- AWS SAM: build, deploy and watch logs for lambda functions
37+
- Auto alias support
38+
- Support for multiple [environments](https://firebase.google.com/docs/functions/config-env)
39+
- Esbuild for faster builds
40+
- Detect changes and only deploy changed functions
41+
- No longer export all functions in a index.ts file, but deploy each function individually for smaller bundles
42+
- Configurable deploy options
43+
- Deploy with Node 14/16/18/20/22 and esm
44+
- Cloud functions v2 support
45+
- Deploy rules and indexes
46+
- Execute scripts locally
47+
- Read env file and copy to clipboard
48+
- Cloud cache support
49+
- Run emulators locally
50+
- AWS SAM: build, deploy and watch logs for lambda functions
5151

5252
## Install
5353

@@ -63,7 +63,7 @@ It uses esbuild to bundle your functions and then uses the [firebase-tools](http
6363

6464
## Prerequisites
6565

66-
- You will need to have the [firebase-tools](https://www.npmjs.com/package/firebase-tools) installed. Either globally or locally in your project. If you install it globally you have to set `packageManager` option to `global`.
66+
- You will need to have the [firebase-tools](https://www.npmjs.com/package/firebase-tools) installed. Either globally or locally in your project. If you install it globally you have to set `packageManager` option to `global`.
6767

6868
```bash
6969
pnpm i -D firebase-tools
@@ -257,13 +257,13 @@ It is recommend to have the following folder structure, but it is not required.
257257

258258
The folders in controllers will different deployment types:
259259

260-
- `request` - [HTTP requests](https://firebase.google.com/docs/functions/http-events)
261-
- `callable` - [Callable functions](https://firebase.google.com/docs/functions/callable)
262-
- `firestore` - [Cloud Firestore triggers](https://firebase.google.com/docs/functions/firestore-events)
263-
- `database` - [Cloud Firestore triggers](https://firebase.google.com/docs/functions/firestore-events)
264-
- `schedule` - [Scheduled functions](https://firebase.google.com/docs/functions/schedule-functions)
265-
- `storage` - [Cloud Storage triggers](https://firebase.google.com/docs/functions/gcp-storage-events)
266-
- `auth` - [Auth triggers](https://firebase.google.com/docs/functions/auth-events)
260+
- `request` - [HTTP requests](https://firebase.google.com/docs/functions/http-events)
261+
- `callable` - [Callable functions](https://firebase.google.com/docs/functions/callable)
262+
- `firestore` - [Cloud Firestore triggers](https://firebase.google.com/docs/functions/firestore-events)
263+
- `database` - [Cloud Firestore triggers](https://firebase.google.com/docs/functions/firestore-events)
264+
- `schedule` - [Scheduled functions](https://firebase.google.com/docs/functions/schedule-functions)
265+
- `storage` - [Cloud Storage triggers](https://firebase.google.com/docs/functions/gcp-storage-events)
266+
- `auth` - [Auth triggers](https://firebase.google.com/docs/functions/auth-events)
267267

268268
The default function names will be the path from the `api/callable/database/scheduler` folder to the file. For example, the function `controllers/api/stripe/webhook_endpoint.ts` will be deployed as `stripe_webhook_endpoint`.
269269

build-package.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ const compileTypescriptFiles = async () => {
118118
treeShaking: true,
119119
sourcemap: true,
120120
plugins: [projectAlias, nodeExternalsPlugin()],
121-
target: 'node20',
121+
target: 'node22',
122122
};
123123

124124
await Promise.all([
@@ -206,7 +206,7 @@ const buildProject = async (): Promise<void> => {
206206
};
207207

208208
const addTypescriptDefinitions = async () => {
209-
const { childProcess } = await nvexeca('20', 'pnpm', [
209+
const { childProcess } = await nvexeca('22', 'pnpm', [
210210
'tsc',
211211
'--project',
212212
'./tsconfig.types.json',

eslint.config.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const commonjs = {
4343
files: ['**/*.cjs'],
4444
languageOptions: {
4545
sourceType: 'commonjs',
46-
ecmaVersion: 2020,
46+
ecmaVersion: 2022,
4747
globals: {
4848
module: 'readonly',
4949
require: 'readonly',
@@ -54,28 +54,28 @@ const commonjs = {
5454
export default [
5555
// Add ignores (replacing .eslintignore)
5656
{ ignores },
57-
57+
5858
// Base config for all files
5959
{
6060
languageOptions: {
61-
ecmaVersion: 2020,
61+
ecmaVersion: 2022,
6262
sourceType: 'module',
6363
},
6464
},
65-
65+
6666
// CommonJS specific configuration
6767
commonjs,
68-
68+
6969
// Core ESLint recommended rules
7070
eslint.configs.recommended,
71-
71+
7272
// TypeScript configuration
7373
...typescript,
74-
74+
7575
// Prettier integration
7676
prettierConfig,
7777
prettierPlugin,
78-
78+
7979
// Custom rules for all files
8080
{
8181
rules: {
@@ -89,4 +89,4 @@ export default [
8989
}],
9090
},
9191
},
92-
];
92+
];

example/apps/aws/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "aws",
33
"type": "module",
44
"engines": {
5-
"node": "20"
5+
"node": "22"
66
},
77
"main": "src/index.js",
88
"dependencies": {},

example/apps/frontend/tsconfig.app.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"outDir": "../../dist/out-tsc",
55
"module": "commonjs",
66
"types": ["node"],
7-
"target": "ES2020",
7+
"target": "ES2022",
88
"esModuleInterop": true,
99
"moduleResolution": "node",
1010
"noUnusedLocals": true,
1111
"allowSyntheticDefaultImports": true,
1212
"skipLibCheck": true,
13-
"lib": ["ES2020", "dom"],
13+
"lib": ["ES2022", "dom"],
1414
"forceConsistentCasingInFileNames": true,
1515
"strict": true,
1616
"sourceMap": true

example/apps/functions/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"development": "mailvideo-test",
1111
"production": "example-production"
1212
},
13-
"node": "20",
13+
"node": "22",
1414
"minify": false
1515
}
1616
},

example/apps/functions/tsconfig.app.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"outDir": "../../dist/out-tsc",
55
"module": "esnext",
66
"types": ["node"],
7-
"target": "ES2020",
7+
"target": "ES2022",
88
"esModuleInterop": true,
99
"moduleResolution": "node",
1010
"noUnusedLocals": true,
1111
"allowSyntheticDefaultImports": true,
1212
"skipLibCheck": true,
13-
"lib": ["ES2020", "dom"],
13+
"lib": ["ES2022", "dom"],
1414
"forceConsistentCasingInFileNames": true,
1515
"strict": true,
1616
"sourceMap": true

example/apps/functions/tsconfig.script.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"outDir": "../../dist/out-tsc",
55
"module": "commonjs",
66
"types": ["node"],
7-
"target": "ES2020",
7+
"target": "ES2022",
88
"esModuleInterop": true,
99
"moduleResolution": "node",
1010
"noUnusedLocals": true,
1111
"allowSyntheticDefaultImports": true,
1212
"skipLibCheck": true,
13-
"lib": ["ES2020", "dom"],
13+
"lib": ["ES2022", "dom"],
1414
"forceConsistentCasingInFileNames": true,
1515
"strict": true,
1616
"sourceMap": true

example/eslint.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const typescript = tseslint.config({
5656
const javascript = {
5757
files: ['**/*.js', '**/*.jsx', '**/*.cjs', '**/*.mjs'],
5858
languageOptions: {
59-
ecmaVersion: 2020,
59+
ecmaVersion: 2022,
6060
sourceType: 'module',
6161
globals: {
6262
module: 'readonly',
@@ -84,7 +84,7 @@ export default [
8484
// Base config for all files
8585
{
8686
languageOptions: {
87-
ecmaVersion: 2020,
87+
ecmaVersion: 2022,
8888
sourceType: 'module',
8989
},
9090
},

0 commit comments

Comments
 (0)