chore: update Firebase SDK to v12.6.0 and firebase-admin to v13.6.0 #723
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.
Update Firebase SDK to Latest Versions (v12.6.0 and v13.6.0)
Summary
This PR updates the Firebase JavaScript SDK and Firebase Admin SDK to their latest versions to ensure compatibility with the most recent Firebase features, security patches, and performance improvements.
Changes Made
1. Updated Firebase Dependencies
Main
package.json:firebase:^10.0.0→^12.6.0(devDependency)firebase-admin:~11.4.0→^13.6.0(devDependency)Example
package.json:firebase:9.17.1→^12.6.0firebase-admin:^11.9.0→^13.6.02. Updated Peer Dependencies
Updated peer dependency ranges to support the new Firebase versions:
firebase:>=9.0.0 <12→>=9.0.0 <13firebase-admin:>=10.0.0 <12→>=10.0.0 <14This allows users of the library to use Firebase v12 and firebase-admin v13 while maintaining backward compatibility with existing installations.
3. Fixed Jest Mock for firebase-admin/auth
File:
__mocks__/firebase-admin/auth.tsProblem: The mock was using
jest.requireActual('firebase-admin/auth')which caused test failures with firebase-admin v13+ due to dependencies (likejose) that don't work well in Jest's Node environment.Solution: Replaced
jest.requireActualwith a manual mock implementation that doesn't require loading the actual firebase-admin/auth module during tests.Before:
After:
4. Updated Documentation Comments
Updated the
devDependenciesCommentssection to reflect that the previous Jest test issue with firebase-admin v11.5.0 may be resolved in v13.6.0.Why These Changes Were Made
Testing
All existing tests pass successfully:
Test Results
Compatibility
Migration Notes
For users of this library:
firebaseandfirebase-admindependencies to the latest versionsFiles Changed
package.json- Updated devDependencies and peerDependenciesexample/package.json- Updated Firebase dependencies__mocks__/firebase-admin/auth.ts- Fixed Jest mock implementationyarn.lock- Updated dependency lock fileRelated Issues
This update addresses compatibility with the latest Firebase SDK versions and resolves the Jest test issues that were noted in the previous firebase-admin v11.5.0 comment.
Checklist