What's changed
Bug fixes
- #153
initializeFirebaseAppnow returns the correct named Firebase app when one already exists. Previously, calls with a customnameargument silently returned the default app's Firestore instance if any app was already initialized. - #136 Restored timestamps now preserve nanosecond precision.
makeTimereturnsFirestore.Timestampinstead ofDate. - #50, #83
dates,geos, andrefsimport options now correctly traverse arrays of objects at any depth. makeGeoPointno longer returnsnullfor coordinates equal to0(the falsy-coord bug).
New features
- #18 Restore writes are now batched (500 docs per commit) instead of one-at-a-time. 10k-doc restores drop from minutes to seconds.
- #19 New
clearCollectionimport option deletes target collections before restore. - #103 New
includeSubcollectionsexport option (default:true) — set tofalseto skip subcollection traversal. - #121
showLogs: truenow works on export (backup,backups,backupFromDoc). dryRunimport option — preview whatclearCollectionwould delete and how many docs would be written, without touching Firestore.
Internal
restoreServicerewritten from Promise constructor pattern toasync/await.traverseObjectsreplaced with a newapplyToPathhelper that uniformly handles nested objects and arrays.- Updated to firebase-admin v13, Vitest, Vite (already shipped via the modernization PRs).
Acknowledgments
Thanks to @eudanielhenrique for splitting the original mega-PR (#169) into three reviewable chunks and addressing review feedback on console.warn hot-path concerns, recursiveDelete atomicity, and the dryRun mode for clearCollection.
See CHANGELOG.md for the full history.