Merge v14 branch to main#3162
Merged
Merged
Conversation
* 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
* update dependencies for v14 * replace upstream import of DEFAULT_DATABASE_ID with local constant
* bump jwks-rsa to 4.0.1 * drop Node 18 from test matrix for testing
* build(deps-dev): bump sinon from 18.0.1 to 22.0.0 Bumps [sinon](https://github.com/sinonjs/sinon) from 18.0.1 to 22.0.0. - [Release notes](https://github.com/sinonjs/sinon/releases) - [Changelog](https://github.com/sinonjs/sinon/blob/main/docs/changelog.md) - [Commits](sinonjs/sinon@v18.0.1...v22.0.0) --- updated-dependencies: - dependency-name: sinon dependency-version: 22.0.0 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps-dev): update @types/sinon to 21.0.1 and fix fake timer test leaks --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore: bump eslint to 10.3.0 and migrate to flat config * add missing copyright header * remove extra whitespaces * chore: restrict mocha globals to test files in flat config * unpin eslint * chore: adopt native defineConfig and streamline test globs in flat config
* chore: upgrade nock to v14 and fix api-request unit tests * test: make mockRequestWithError normalization more robust
* chore: Update send-email GHA and remove send-tweet GHA * chore: Update `checkout` and `setup-node` GHAs * chore: Update `setup-java`, `upload-artifact`, and `download-artifact` GHAs * fix: address gemini review
* feat(core): Error Handling Revamp (#3102) * Initial exports and external api changes * Connect response to error info * feat: Revamp error handling to include `httpResponse` and `cause` in `FirebaseAuthError` and `FirebaseAppError`, added sample tests. * more refactoring * refactor: Update all services to use ErrorInfo format * refactor: Update unit tests to verify error cause and httpResponse population. * chore: fix lint * chore: remove debug tests * fix: Ran api documentor and fix some export errors * fix: Removed outdated `__proto__` workaround and updated api doc strings * chore: Fix lint * fix: Used a helper function to map `RequestResponse` to `HttpResponse` * fix: Removed last of the stringified response bodies in response messages * chore: Fix lint * chore: Generate apidocs * fix: Apply revamp changes to pnv * chore: Added review suggestions * feat(error): Decouple public error codes, modularize error files, and enable declaration merging (#3127) * chore(auth): Refactor auth error logic * chore(installations): Refactor installations and instance id error logic * chore(fcm): Refactor fcm error logic * fix(auth): Fix auth error mapping that were not copied correctly * fix(auth): Fixed `INVALID_SERVICE_ACCOUNT` to map to a valid client code * chore(pm): Refactor project management error logic * chore: Fix license year for new files * chore(rtdb): Refactor rtdb error logic * chore(fs): Refactor firestore error logic * chore(app): Refactor app error logic * chore(security-rules): Refactor security rules error logic * chore(app-check): Refactor app check error logic * chore(remote-config): Refactor remote config error logic * chore(functions): Refactor functions error logic * chore(extensions): Refactor extensions error logic * chore(fdc): Refactor data connect error logic * chore(ml): Refactor ml error logic * chore(eventarc): Refactor eventarc error logic * chore(fpnv): Refactor pnv error logic * fix: address gemini review * fix: Use Declaration Merging to expose error code constant mapping along side error code type * fix: Address gemini review * chore: Remove extra whitespace * feat(fcm): Improve HTTP/2 session error handling. (#3126) * feat(messaging): Improve HTTP/2 session error handling. * fix: ensure error causes are not lost * fix: clean up stale tests * fix: address gemini review * fix: address more gemini review * fix: Resolve leftover merge issues * fix: resolve merge conflict * fix: Address gemini review * fix: Address TW review * fix: update `HttpClient` test to check error cause. * fix: Refactor error logic to remove `PrefixedFirebaseError` as a intermediate class (#3159) * fix: Removed `PrefixedFirebaseError` * fix: Replaces uses of base `FirebaseError` with manual prefix with service specific errors * fix: Apply gemini review and update docstring * fix: final pass to verify docs strings are uniform
…new `TOPICS_SUBSCRIPTION_RATE_EXCEEDED` SDK error code (#3148) * fix(fcm): Map `RESOURCE_EXHAUSTED` server code to new `TOPICS_SUBSCRIPTION_RATE_EXCEEDED` SDK error code * fix: Update apidocs * fix: Address gemini review * fix: Apply TW review changes
Contributor
There was a problem hiding this comment.
Code Review
This pull request migrates the SDK to a minimum of Node.js 22, updates ESLint to use flat configs, and refactors error handling across all services to extend a unified FirebaseError class that accepts an ErrorInfo object. It also removes legacy FCM APIs and cleans up old TypeScript workarounds. Review feedback highlights a critical merge conflict in package.json that must be resolved, an opportunity to simplify AggregateError instantiation now that Node 22 is the minimum, and a minor typo in an Eventarc error message.
| 'invalid-argument', "CloudEvent 'tyme' must be in ISO date format."); | ||
| throw new FirebaseEventarcError({ | ||
| code: 'invalid-argument', | ||
| message: "CloudEvent 'tyme' must be in ISO date format." |
Contributor
* bump jwks-rsa to 4.0.1 * drop Node 18 from test matrix for testing
url.parse() is deprecated (DEP0169) and emits warnings on every cold start in serverless runtimes. Migrate the two call sites in BaseRequestConfigImpl.buildUrl() to the WHATWG URL constructor, matching the pattern from #3061. The protected buildUrl() return type changes from url.UrlWithStringQuery to URL. Both call sites are inside the same file. parsed.path is replaced with ${parsed.pathname}${parsed.search} so the request path on the wire stays byte-for-byte identical, and parsed.port is now string (always); the existing if (!port) falsy check still catches the empty case. Fixes #3118.
…3080) - Updated constructors in `AuthResourceUrlBuilder`, `TenantAwareAuthResourceUrlBuilder`, `AuthHttpClient`, and `AbstractAuthRequestHandler` to accept an optional emulator host parameter. - Modified token generation and verification methods in `BaseAuth` to utilize the emulator mode based on the new parameter. - Added tests to ensure correct behavior of emulator settings, including persistence after environment variable changes. - Improved handling of emulator state in `TenantManager` and `TenantAwareAuth` classes.
…lator (#3142) The Auth emulator does not populate the resource `name` field on its /config responses, so getProjectConfig() and updateProjectConfig() throw "INTERNAL ASSERT FAILED: Unable to get/update project config" against the emulator. Skip the assertion in both validators when useEmulator() is true. Production behavior is unchanged — a backend response missing `name` still throws. The guard reuses the existing useEmulator() helper, matching the same dynamic-read pattern AuthResourceUrlBuilder and AuthHttpClient already use to branch on the emulator. Fixes #2461.
* feat: remove legacy namespaces support * test(integration): migrate app-check integration tests to modular API * fix api-extractor --------- Co-authored-by: Jonathan Edey <145066863+jonathanedey@users.noreply.github.com>
* change(instance-id): Remove deprecated Instance ID service * fix: Address formatting and duplicate imports from gemini review
#3167) * fix(functions): store CLOUD_TASKS_EMULATOR_HOST at construction time * fix: address gemini review
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merge v14 branch to main