From fda68ed923e270ff21b42113a09767dfdbb62a3e Mon Sep 17 00:00:00 2001 From: Simon M Date: Thu, 22 Jan 2026 18:28:40 +0000 Subject: [PATCH 1/4] Remove spurious projectNameAndRootFormat from e2e setup --- e2e/nx-firebase-e2e/jest.globalSetup.js | 1 - 1 file changed, 1 deletion(-) diff --git a/e2e/nx-firebase-e2e/jest.globalSetup.js b/e2e/nx-firebase-e2e/jest.globalSetup.js index bb180e48..57228656 100644 --- a/e2e/nx-firebase-e2e/jest.globalSetup.js +++ b/e2e/nx-firebase-e2e/jest.globalSetup.js @@ -14,7 +14,6 @@ const pluginPath = 'dist/packages/nx-firebase' const workspaceLayout = { appsDir: 'apps', libsDir: 'libs', - projectNameAndRootFormat: 'derived', } module.exports = async function globalSetup() { From 5a1bc175f4307b8556f0c0f771ebfa41edbd8b90 Mon Sep 17 00:00:00 2001 From: Simon M Date: Thu, 22 Jan 2026 18:28:55 +0000 Subject: [PATCH 2/4] Update docs to reflect Nx 20 dropping projectNameAndRootFormat --- docs/nx-firebase-applications.md | 3 +-- docs/nx-firebase-functions.md | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/nx-firebase-applications.md b/docs/nx-firebase-applications.md index 319a9ae6..e4831f17 100644 --- a/docs/nx-firebase-applications.md +++ b/docs/nx-firebase-applications.md @@ -15,9 +15,8 @@ OR | Options | Type | Description | | ----------------- | -------- | ------------------------------------------------------------------ | | `name` | required | the project name for your firebase app | -| `--directory=dir` | optional | the directory this app will be located in | +| `--directory=dir` | optional | the full path where this app will be located (e.g., `apps/my-app`) | | `--project=proj` | optional | the `--project` option that will be used for firebase CLI commands | -| `--projectNameAndRootFormat` | optional | `derived` or `as-provided` see [projectNameAndRootFormat](https://nx.dev/nx-api/node/generators/application#projectnameandrootformat) | ## About Firebase Apps diff --git a/docs/nx-firebase-functions.md b/docs/nx-firebase-functions.md index 1fea17a5..7a13f7eb 100644 --- a/docs/nx-firebase-functions.md +++ b/docs/nx-firebase-functions.md @@ -57,12 +57,11 @@ OR | --------------------------- | ------------- | ---------------------------------------------------------- | | `name` | required | the project name for your function | | `--app=` | required | the firebase app this function will be a dependency of | -| `--directory=dir` | optional | the directory this function will be located in | +| `--directory=dir` | optional | the full path where this function will be located (e.g., `apps/my-function`) | | `--format=<'cjs' or 'esm'>` | default 'esm' | specify if esbuild should generated commonJs or ES6 output | -| `--runTime=` | optional | the nodejs runtime you wish to use for this function - 14, 16, 18, 20 | +| `--runTime=` | optional | the nodejs runtime you wish to use for this function - 18, 20, 22 | | `--tags` | optional | tags to set on the new project | | `--setParserOptionsProject` | optional | set the parserOptions.project in the tsconfig.json file | -| `--projectNameAndRootFormat` | optional | `derived` or `as-provided` (see Nx docs for [projectNameAndRootFormat](https://nx.dev/nx-api/node/generators/application#projectnameandrootformat)) | ## Building a Firebase function From 4661e34e4e64dbc93b8066cbc29fb4b1aa6b4df7 Mon Sep 17 00:00:00 2001 From: Simon M Date: Thu, 22 Jan 2026 18:29:25 +0000 Subject: [PATCH 3/4] Delete FUNDING.yml --- .github/FUNDING.yml | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 7310478e..00000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: simondotm -tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] From 6a57f63431db4b1e873ebcb911e4bdd6a543d68b Mon Sep 17 00:00:00 2001 From: Simon M Date: Thu, 22 Jan 2026 18:35:52 +0000 Subject: [PATCH 4/4] Dropped documentation regarding Firebase SDK versions --- docs/firebase-versions.md | 117 -------------------------------------- docs/nx-migration.md | 9 +-- docs/user-guide.md | 6 -- 3 files changed, 2 insertions(+), 130 deletions(-) delete mode 100644 docs/firebase-versions.md diff --git a/docs/firebase-versions.md b/docs/firebase-versions.md deleted file mode 100644 index ea4e5832..00000000 --- a/docs/firebase-versions.md +++ /dev/null @@ -1,117 +0,0 @@ -# Firebase Versions - -- [Firebase Versions](#firebase-versions) - - [Firebase Node Versions](#firebase-node-versions) - - [Node 18 support](#node-18-support) - - [Node 16 support (Recommended)](#node-16-support-recommended) - - [Node 14 support](#node-14-support) - - [Node 12 support](#node-12-support) - - [Node 10](#node-10) - - [ES Modules Support](#es-modules-support) - - [Firebase Admin SDK Versions](#firebase-admin-sdk-versions) - - [Firebase Functions Versions](#firebase-functions-versions) - - [V2 Cloud Functions](#v2-cloud-functions) - - [Firebase Client SDK](#firebase-client-sdk) - - [Nx-Firebase Plugin Defaults](#nx-firebase-plugin-defaults) - -## Firebase Node Versions - -### Node 18 support - -- Currently in preview only for firebase functions -- The latest Node 18 version is `18.12.1` -- Use functions runtime `nodejs18` -- `firebase-tools` - use [lastest version](https://github.com/firebase/firebase-tools/releases) -- `firebase-functions` - [latest version](https://github.com/firebase/firebase-functions/releases) -- `firebase-admin` - [latest version](https://github.com/firebase/firebase-admin-node/releases) - -### Node 16 support (Recommended) - -- Node 16 is the currently [recommended runtime](https://cloud.google.com/functions/docs/concepts/nodejs-runtime) for firebase functions -- The latest Node 16 version is `16.19.0` -- Use functions runtime `nodejs16` -- `firebase-tools` supports Node 16 as default from [version 10.0.0](https://github.com/firebase/firebase-tools/releases/tag/v10.0.0), recommend minimum [version 10.9.2](https://github.com/firebase/firebase-tools/releases/tag/v10.9.2) -- `firebase-functions` - [latest version](https://github.com/firebase/firebase-functions/releases) -- `firebase-admin` - [latest version](https://github.com/firebase/firebase-admin-node/releases) - -### Node 14 support - -- The latest Node 14 version is `14.21.2` -- Use functions runtime `nodejs14` -- `firebase-tools` - minimum [version 9.23.3](https://github.com/firebase/firebase-tools/releases/tag/v9.23.3) -- `firebase-functions` - [latest version](https://github.com/firebase/firebase-functions/releases) -- `firebase-admin` - [latest version](https://github.com/firebase/firebase-admin-node/releases) -- Node 14 introduces ESM support (see below) - -### Node 12 support - -- Node 12 support was dropped in [version 11.0.0](https://github.com/firebase/firebase-tools/releases/tag/v11.0.0) of the firebase tools. -- Use functions runtime `nodejs12` -- `firebase-tools` supports Node 12 until [version 10.9.2](https://github.com/firebase/firebase-tools/releases/tag/v10.9.2), but note that it is now deprecated. -- `firebase-functions` supports Node 12 upto [version 3.24.1](https://github.com/firebase/firebase-functions/releases/tag/v3.24.1) -- `firebase-admin` supports Node 12 upto [version 10.3.0](https://github.com/firebase/firebase-admin-node/releases/tag/v10.3.0) - -### Node 10 - -Node 10 is no longer supported by firebase or `nx-firebase`. - -## ES Modules Support - -- [ES Modules are supported](https://cloud.google.com/functions/docs/concepts/nodejs-runtime#using_es_modules) in Node 14+ runtimes -- Recommend minimum `firebase-functions` minimum [version 9.16.2+](https://github.com/firebase/firebase-tools/releases/tag/v9.16.2) (which has `@google-cloud/functions-framework@1.9.0`) -- At least [version 9](https://github.com/firebase/firebase-tools/releases/tag/v9.23.3) of `firebase-tools` is necessary, but later versions likely to provide better support - -## Firebase Admin SDK Versions - -- [Latest Github Release](https://github.com/firebase/firebase-admin-node/releases) -- [Version 11.2.0+](https://firebase.google.com/support/release-notes/admin/node#cloud-firestore_2) - - Adds support for `@google-cloud/firestore` v6.4.0 to support `COUNT` queries -- [Version 11.0.0+](https://firebase.google.com/support/release-notes/admin/node#version_1100_-_16_june_2022) - - Drops support for Node 12 - - Upgrades `@google-cloud/firestore` to v5 which may contain breaking changes - - Upgrades `@google-cloud/storage` to v6 which may contain breaking changes -- [Version 10.0.0+](https://firebase.google.com/support/release-notes/admin/node#version_1000_-_14_october_2021) - - Drops support for Node 10 - - Supports ES Modules -- [All Release Notes](https://firebase.google.com/support/release-notes/admin/node) - -## Firebase Functions Versions - -- [Latest Github Release](https://github.com/firebase/firebase-functions/releases) -- [Version 4.0.0+](https://github.com/firebase/firebase-functions/releases/tag/v4.0.0) of `firebase-functions` - - drops support for Node 8, 10, 12 - - drops support for `firebase-admin` versions 8 and 9 - -### V2 Cloud Functions - -A [2nd generation of cloud functions](https://firebase.google.com/docs/functions/beta) became [generally available](https://cloud.google.com/blog/products/serverless/cloud-functions-2nd-generation-now-generally-available) in August 2022 with main differences for v2 functions: - -- Concurrency for function instances -- Now uses Cloud Run for improved efficiency -- New trigger types -- Improved cold-starts, minimum instances etc. - -See also [Cloud Functions version comparison](https://cloud.google.com/functions/docs/concepts/version-comparison). - -The [2nd generation of firebase functions](https://firebase.google.com/docs/functions/beta) is currently in beta preview and it's unclear at this time when that will end. - -Using v2 functions requires `import * as functionsV2 from "firebase-functions/v2"` - -## Firebase Client SDK - -The `nx-firebase` plugin executors focus only on backend deployment and function compilation, so Firebase client SDK version considerations only apply to frontend applications, which doesn't tend to require as much dependency management, unless you are using a client application library such as [Angular/AngularFire](https://github.com/angular/angularfire#angular-and-firebase-versions). - -## Nx-Firebase Plugin Defaults - -`nx-firebase` plugin does not require or enforce any particular versions of firebase packages/cli. - -That said, typically only certain combinations of Nx/Firebase/Node versions make sense and it can be tricky to get versions aligned depending on which workspace configurations are required for a project. - -New applications generated in new Nx workspaces by `@simondotm/nx-firebase` will install: - -- Functions with `nodejs16` runtime enabled -- `firebase-tools` version 11.x -- `firebase-functions` version 4.x -- `firebase-admin` version 11.x - -V2.x of the plugin uses `esbuild` to bundle functions, and **_always_** outputs `esm` format code, so the minimum node runtime requirement is 16. diff --git a/docs/nx-migration.md b/docs/nx-migration.md index 373761b8..c4a2f43f 100644 --- a/docs/nx-migration.md +++ b/docs/nx-migration.md @@ -10,11 +10,6 @@ From here, you can simply `nx build` and `nx deploy` your firebase application & ## Firebase SDK versions -Which version of the Firebase CLI + SDK's you use will depend on your particular project requirements, and although generally the latest SDK's are widely compatible, you may need to experiment to find specific compatible versions: +Which version of the Firebase CLI + SDK's you use will depend on your particular project requirements, and this plugin is not opinionated to any particular Firebase SDK. -- If you are using Angular/AngularFire libraries, depending on your version of Angular -- If you are using older runtimes than Node 16 -- If you are using ES modules or commonjs. -- Use of at least Node 16 functions runtime is required for this plugin - -The `nx-firebase` plugin will install Firebase dependencies in the workspace if they are not already present, but it does not require, enforce or change a specific version beyond that initial setup, so you are free to `npm install` whichever versions of the firebase SDK packages you need. +The `nx-firebase` plugin app generator will install Firebase dependencies in the workspace if they are not already present, but it does not require, enforce or change a specific version beyond that initial setup, so you are free to install whichever versions of the firebase SDK packages you need. diff --git a/docs/user-guide.md b/docs/user-guide.md index 55200e72..e4f052e7 100644 --- a/docs/user-guide.md +++ b/docs/user-guide.md @@ -25,12 +25,6 @@ - [Using Nx Libraries with Firebase Functions](./nx-libraries.md) - [Migrating an existing Firebase project to Nx](./nx-migration.md) -**Version information** - -- [Firebase Versions](./firebase-versions.md) - -_Note: Some of these may not always be upto date - it's hard work keeping track of external releases and compatibilities!_ - **Notes** - [Plugin Development Notes](./nx-plugin-commands.md)