From 0378bc45c2543c57ada8fc7c3198e6b5118a92d8 Mon Sep 17 00:00:00 2001 From: Daniel Lee Date: Mon, 20 Oct 2025 19:36:18 -0700 Subject: [PATCH 1/2] BREAKING: Drop Node.js 14/16 support, require Node.js >=18 - Update package.json engines to require Node.js >=18.0.0 - Upgrade @types/node from v14 to v18 - Update TypeScript target from ES2019 to ES2022 - Add useDefineForClassFields: false for backward compatibility - Update CI/CD workflows to test Node.js 18, 20, 22, and 24 - Set default CI/CD Node.js version to 24 - Update integration test documentation --- .github/workflows/docs.yaml | 2 +- .github/workflows/postmerge.yaml | 2 +- .github/workflows/test.yaml | 4 +++- integration_test/README.md | 2 +- package-lock.json | 20 +++++++++++++++----- package.json | 4 ++-- tsconfig.release.json | 5 +++-- 7 files changed, 26 insertions(+), 13 deletions(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 9ccb3a826..d0e9b406b 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -12,7 +12,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: "20" + node-version: "24" - name: Cache npm uses: actions/cache@v4 with: diff --git a/.github/workflows/postmerge.yaml b/.github/workflows/postmerge.yaml index c67e87cd0..e82d70d65 100644 --- a/.github/workflows/postmerge.yaml +++ b/.github/workflows/postmerge.yaml @@ -30,7 +30,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: 18 + node-version: 24 - uses: google-github-actions/auth@v0 with: diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 75dfe190d..a0efbae32 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -14,7 +14,7 @@ jobs: strategy: matrix: node-version: - - 18.x + - 24.x steps: - uses: actions/checkout@v3 with: @@ -33,6 +33,7 @@ jobs: - 18.x - 20.x - 22.x + - 24.x steps: - uses: actions/checkout@v1 - uses: actions/setup-node@v1 @@ -54,6 +55,7 @@ jobs: - 18.x - 20.x - 22.x + - 24.x steps: - uses: actions/checkout@v1 - uses: actions/setup-node@v1 diff --git a/integration_test/README.md b/integration_test/README.md index 3b0f5413f..a00c1eebc 100644 --- a/integration_test/README.md +++ b/integration_test/README.md @@ -8,7 +8,7 @@ Run the integration test as follows: ./run_tests.sh [] ``` -Test runs cycles of testing, once for Node.js 14 and another for Node.js 16. +Test runs cycles of testing for supported Node.js versions (18, 20, 22, 24). Test uses locally installed firebase to invoke commands for deploying function. The test also requires that you have gcloud CLI installed and authenticated (`gcloud auth login`). diff --git a/package-lock.json b/package-lock.json index ccaba075c..ff2e7f708 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,7 +28,7 @@ "@types/mocha": "^5.2.7", "@types/mock-require": "^2.0.0", "@types/nock": "^10.0.3", - "@types/node": "^14.18.24", + "@types/node": "^18.0.0", "@types/node-fetch": "^3.0.3", "@types/sinon": "^9.0.11", "@typescript-eslint/eslint-plugin": "^5.33.1", @@ -63,7 +63,7 @@ "yargs": "^15.3.1" }, "engines": { - "node": ">=14.10.0" + "node": ">=18.0.0" }, "peerDependencies": { "firebase-admin": "^11.10.0 || ^12.0.0 || ^13.0.0" @@ -2599,9 +2599,13 @@ } }, "node_modules/@types/node": { - "version": "14.18.63", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.63.tgz", - "integrity": "sha512-fAtCfv4jJg+ExtXhvCkCqUKZ+4ok/JQk01qDKhL5BDDoS3AxKXhV5/MAVUZyQnSEd2GT92fkgZl0pz0Q0AzcIQ==" + "version": "18.19.130", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.130.tgz", + "integrity": "sha512-GRaXQx6jGfL8sKfaIDD6OupbIHBr9jv7Jnaml9tB7l4v068PAOXqfcujMMo5PhbIs6ggR1XODELqahT2R8v0fg==", + "license": "MIT", + "dependencies": { + "undici-types": "~5.26.4" + } }, "node_modules/@types/node-fetch": { "version": "3.0.3", @@ -2613,6 +2617,12 @@ "node-fetch": "*" } }, + "node_modules/@types/node/node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "license": "MIT" + }, "node_modules/@types/qs": { "version": "6.9.18", "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.18.tgz", diff --git a/package.json b/package.json index 2fe6cd94f..5a121855f 100644 --- a/package.json +++ b/package.json @@ -286,7 +286,7 @@ "@types/mocha": "^5.2.7", "@types/mock-require": "^2.0.0", "@types/nock": "^10.0.3", - "@types/node": "^14.18.24", + "@types/node": "^18.0.0", "@types/node-fetch": "^3.0.3", "@types/sinon": "^9.0.11", "@typescript-eslint/eslint-plugin": "^5.33.1", @@ -324,6 +324,6 @@ "firebase-admin": "^11.10.0 || ^12.0.0 || ^13.0.0" }, "engines": { - "node": ">=14.10.0" + "node": ">=18.0.0" } } diff --git a/tsconfig.release.json b/tsconfig.release.json index 5d48aa842..e893294f8 100644 --- a/tsconfig.release.json +++ b/tsconfig.release.json @@ -1,13 +1,14 @@ { "compilerOptions": { "declaration": true, - "lib": ["es2019"], + "lib": ["es2022"], "module": "commonjs", "noImplicitAny": false, "noUnusedLocals": true, "outDir": "lib", "stripInternal": true, - "target": "es2019", + "target": "es2022", + "useDefineForClassFields": false, "typeRoots": ["./node_modules/@types"] }, "files": [ From 29b61c3b93cf069d5bdcd264afdf1498f447fed8 Mon Sep 17 00:00:00 2001 From: Daniel Lee Date: Tue, 21 Oct 2025 07:27:46 -0700 Subject: [PATCH 2/2] undo updates to integration_test/README.md --- integration_test/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration_test/README.md b/integration_test/README.md index a00c1eebc..3b0f5413f 100644 --- a/integration_test/README.md +++ b/integration_test/README.md @@ -8,7 +8,7 @@ Run the integration test as follows: ./run_tests.sh [] ``` -Test runs cycles of testing for supported Node.js versions (18, 20, 22, 24). +Test runs cycles of testing, once for Node.js 14 and another for Node.js 16. Test uses locally installed firebase to invoke commands for deploying function. The test also requires that you have gcloud CLI installed and authenticated (`gcloud auth login`).