Skip to content

Commit 4bde672

Browse files
change: Drop support for Node.js 18 and 20 (v14) (#3138)
* chore: drop support for Node.js 18 and 20 * Added Node.js 26.x to CIs * chore: upgrade firebase-tools to 15.17.0 in CI workflows * ci: setup Java 21 for emulator-based integration tests
1 parent 0efb21f commit 4bde672

5 files changed

Lines changed: 21 additions & 9 deletions

File tree

.github/workflows/ci.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,20 @@ jobs:
99

1010
strategy:
1111
matrix:
12-
node-version: [18.x, 20.x, 22.x, 24.x]
12+
node-version: [22.x, 24.x, 26.x]
1313

1414
steps:
1515
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
1616
- name: Set up Node.js ${{ matrix.node-version }}
1717
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
1818
with:
1919
node-version: ${{ matrix.node-version }}
20+
# Java 21 is required by firebase-tools to run emulator-based integration tests
21+
- name: Set up Java
22+
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
23+
with:
24+
distribution: 'temurin'
25+
java-version: '21'
2026
- name: Install and build
2127
run: |
2228
npm ci
@@ -28,6 +34,6 @@ jobs:
2834
run: npm run api-extractor
2935
- name: Run emulator-based integration tests
3036
run: |
31-
npm install -g firebase-tools@11.30.0
37+
npm install -g firebase-tools@15.17.0
3238
firebase emulators:exec --project fake-project-id --only auth,database,firestore \
3339
'npx mocha test/integration/auth.spec.ts test/integration/database.spec.ts test/integration/firestore.spec.ts --slow 5000 --timeout 20000 --require ts-node/register'

.github/workflows/nightly.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,14 @@ jobs:
3636
- name: Set up Node.js
3737
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
3838
with:
39-
node-version: 18.x
39+
node-version: 22.x
40+
41+
# Java 21 is required by firebase-tools to run emulator-based integration tests
42+
- name: Set up Java
43+
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
44+
with:
45+
distribution: 'temurin'
46+
java-version: '21'
4047

4148
- name: Install and build
4249
run: |
@@ -52,7 +59,7 @@ jobs:
5259

5360
- name: Run emulator-based integration tests
5461
run: |
55-
npm install -g firebase-tools@11.30.0
62+
npm install -g firebase-tools@15.17.0
5663
firebase emulators:exec --project fake-project-id --only auth,database,firestore \
5764
'npx mocha test/integration/auth.spec.ts test/integration/database.spec.ts test/integration/firestore.spec.ts --slow 5000 --timeout 20000 --require ts-node/register'
5865

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
- name: Set up Node.js
5252
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
5353
with:
54-
node-version: 18.x
54+
node-version: 22.x
5555

5656
- name: Install and build
5757
run: |
@@ -122,7 +122,7 @@ jobs:
122122
- name: Set up Node.js
123123
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
124124
with:
125-
node-version: 18.x
125+
node-version: 22.x
126126

127127
- name: Publish preflight check
128128
id: preflight

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ requests, code review feedback, and also pull requests.
5959

6060
## Supported Environments
6161

62-
We currently support Node.js 18 and higher, but support for Node.js 18 and Node.js 20 is deprecated. We strongly encourage
63-
you to use Node.js 22 or higher as we will drop support for Node.js 18 and Node.js 20 in the next major version.
62+
We currently support Node.js 22 and higher.
6463

6564
Please also note that the Admin SDK should only
6665
be used in server-side/back-end environments controlled by the app developer.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"license": "Apache-2.0",
77
"homepage": "https://firebase.google.com/",
88
"engines": {
9-
"node": ">=18"
9+
"node": ">=22"
1010
},
1111
"scripts": {
1212
"build": "gulp build",

0 commit comments

Comments
 (0)