diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 36bf48432f..392a035606 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ jobs: strategy: matrix: - node-version: [18.x, 20.x, 22.x, 24.x] + node-version: [22.x, 24.x, 26.x] steps: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 @@ -17,6 +17,12 @@ jobs: uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: ${{ matrix.node-version }} + # Java 21 is required by firebase-tools to run emulator-based integration tests + - name: Set up Java + uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1 + with: + distribution: 'temurin' + java-version: '21' - name: Install and build run: | npm ci @@ -28,6 +34,6 @@ jobs: run: npm run api-extractor - name: Run emulator-based integration tests run: | - npm install -g firebase-tools@11.30.0 + npm install -g firebase-tools@15.17.0 firebase emulators:exec --project fake-project-id --only auth,database,firestore \ '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' diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 8f4e36bbfb..031f36e27d 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -36,7 +36,14 @@ jobs: - name: Set up Node.js uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: - node-version: 18.x + node-version: 22.x + + # Java 21 is required by firebase-tools to run emulator-based integration tests + - name: Set up Java + uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1 + with: + distribution: 'temurin' + java-version: '21' - name: Install and build run: | @@ -52,7 +59,7 @@ jobs: - name: Run emulator-based integration tests run: | - npm install -g firebase-tools@11.30.0 + npm install -g firebase-tools@15.17.0 firebase emulators:exec --project fake-project-id --only auth,database,firestore \ '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' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 88bf8a28ba..0664d18af7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -51,7 +51,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: - node-version: 18.x + node-version: 22.x - name: Install and build run: | @@ -122,7 +122,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: - node-version: 18.x + node-version: 22.x - name: Publish preflight check id: preflight diff --git a/README.md b/README.md index 73c5fe9a21..bb8905d932 100644 --- a/README.md +++ b/README.md @@ -59,8 +59,7 @@ requests, code review feedback, and also pull requests. ## Supported Environments -We currently support Node.js 18 and higher, but support for Node.js 18 and Node.js 20 is deprecated. We strongly encourage -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. +We currently support Node.js 22 and higher. Please also note that the Admin SDK should only be used in server-side/back-end environments controlled by the app developer. diff --git a/package.json b/package.json index b88901e6e2..e86f53c1ae 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "license": "Apache-2.0", "homepage": "https://firebase.google.com/", "engines": { - "node": ">=18" + "node": ">=22" }, "scripts": { "build": "gulp build",