Skip to content

feat: upgrade firebase to v10 #600

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
12.11.1
Copy link
Author

@imcvampire imcvampire Jul 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All workflows are using v18 now

18.18.1
26 changes: 13 additions & 13 deletions docs/reference/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

430 changes: 104 additions & 326 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@
"docs:fork": "typedoc --options typedoc.json --gitRemote upstream && markdown-toc -i docs/use.md"
},
"peerDependencies": {
"firebase": "^9.0.0 || next",
"firebase": "^9.0.0 || ^10.0.0",
"react": ">=16 || experimental"
},
"husky": {
@@ -87,7 +87,7 @@
"eslint-plugin-no-only-tests": "^3.1.0",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"firebase": "^9.23.0",
"firebase": "^10.0.0",
"firebase-tools": "^12.4.0",
"globalthis": "^1.0.3",
"husky": "^8.0.3",
@@ -107,7 +107,7 @@
"vitest": "^0.32.2"
},
"dependencies": {
"rxfire": "^6.0.3",
"rxfire": "^6.0.4",
"rxjs": "^6.6.3 || ^7.0.1",
"use-sync-external-store": "^1.2.0"
}
4 changes: 2 additions & 2 deletions src/firestore.tsx
Original file line number Diff line number Diff line change
@@ -59,7 +59,7 @@ export function useFirestoreDocOnce<T = DocumentData>(ref: DocumentReference<T>,
/**
* Subscribe to Firestore Document changes and unwrap the document into a plain object
*/
export function useFirestoreDocData<T = unknown>(ref: DocumentReference<T>, options?: ReactFireOptions<T>): ObservableStatus<T> {
export function useFirestoreDocData<T = unknown>(ref: DocumentReference<T>, options?: ReactFireOptions<T>): ObservableStatus<T | undefined> {
const idField = options ? checkIdField(options) : 'NO_ID_FIELD';

const observableId = `firestore:docData:${ref.firestore.app.name}:${ref.path}:idField=${idField}`;
@@ -71,7 +71,7 @@ export function useFirestoreDocData<T = unknown>(ref: DocumentReference<T>, opti
/**
* Get a Firestore document, unwrap the document into a plain object, and don't subscribe to changes
*/
export function useFirestoreDocDataOnce<T = unknown>(ref: DocumentReference<T>, options?: ReactFireOptions<T>): ObservableStatus<T> {
export function useFirestoreDocDataOnce<T = unknown>(ref: DocumentReference<T>, options?: ReactFireOptions<T>): ObservableStatus<T | undefined> {
const idField = options ? checkIdField(options) : 'NO_ID_FIELD';

const observableId = `firestore:docDataOnce:${ref.firestore.app.name}:${ref.path}:idField=${idField}`;