diff --git a/package-lock.json b/package-lock.json index ac2e2e7..dd6e237 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,13 +10,13 @@ "license": "MIT", "devDependencies": { "@laverve/eslint-utils": "^5.1.1", - "@react-native-firebase/analytics": "^21.0.0", - "@react-native-firebase/app": "^21.0.0", - "@react-native-firebase/auth": "^21.0.0", - "@react-native-firebase/crashlytics": "^21.0.0", - "@react-native-firebase/firestore": "^21.0.0", - "@react-native-firebase/installations": "^21.0.0", - "@react-native-firebase/remote-config": "^21.0.0", + "@react-native-firebase/analytics": "^22.1.0", + "@react-native-firebase/app": "^22.1.0", + "@react-native-firebase/auth": "^22.1.0", + "@react-native-firebase/crashlytics": "^22.1.0", + "@react-native-firebase/firestore": "^22.1.0", + "@react-native-firebase/installations": "^22.1.0", + "@react-native-firebase/remote-config": "^22.1.0", "@types/react": "^19.0.2", "firebase": "^11.0.1", "husky": "^9.1.1", @@ -30,13 +30,13 @@ "vitepress": "^1.5.0" }, "peerDependencies": { - "@react-native-firebase/analytics": "^21.0.0", - "@react-native-firebase/app": "^21.0.0", - "@react-native-firebase/auth": "^21.0.0", - "@react-native-firebase/crashlytics": "^21.0.0", - "@react-native-firebase/firestore": "^21.0.0", - "@react-native-firebase/installations": "^21.0.0", - "@react-native-firebase/remote-config": "^21.0.0", + "@react-native-firebase/analytics": "^22.1.0", + "@react-native-firebase/app": "^22.1.0", + "@react-native-firebase/auth": "^22.1.0", + "@react-native-firebase/crashlytics": "^22.1.0", + "@react-native-firebase/firestore": "^22.1.0", + "@react-native-firebase/installations": "^22.1.0", + "@react-native-firebase/remote-config": "^22.1.0", "@tanstack/react-query": "^5.0.0", "firebase": "^11.0.0", "react": "^18.0.0 || ^19.0.0" @@ -2996,9 +2996,9 @@ "license": "Apache-2.0" }, "node_modules/@firebase/app": { - "version": "0.11.4", - "resolved": "https://registry.npmjs.org/@firebase/app/-/app-0.11.4.tgz", - "integrity": "sha512-GPREsZjfSaHzwyC6cI/Cqvzf6zxqMzya+25tSpUstdqC2w0IdfxEfOMjfdW7bDfVEf4Rb4Nb6gfoOAgVSp4c4g==", + "version": "0.11.5", + "resolved": "https://registry.npmjs.org/@firebase/app/-/app-0.11.5.tgz", + "integrity": "sha512-uNp8/Rv12GrrM/dfyqzZCftA2i/5X9axmiEtUDmyQw+0S17EV5s9gudOgdIIGr849LmbAk3At2CBZMqiQJVwNw==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -3067,13 +3067,13 @@ "license": "Apache-2.0" }, "node_modules/@firebase/app-compat": { - "version": "0.2.53", - "resolved": "https://registry.npmjs.org/@firebase/app-compat/-/app-compat-0.2.53.tgz", - "integrity": "sha512-vDeZSit0q4NyaDIVcaiJF3zhLgguP6yc0JwQAfpTyllgt8XMtkMFyY/MxJtFrK2ocpQX/yCbV2DXwvpY2NVuJw==", + "version": "0.2.54", + "resolved": "https://registry.npmjs.org/@firebase/app-compat/-/app-compat-0.2.54.tgz", + "integrity": "sha512-Vwf29tV/5bHEnp+VPgNWOFMbFG+RSur2ntmzZ19Plp5dJOtoo2nQS817COALLaHlebG/Xf/P5PVHyeQNcSVCqQ==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@firebase/app": "0.11.4", + "@firebase/app": "0.11.5", "@firebase/component": "0.6.13", "@firebase/logger": "0.4.4", "@firebase/util": "1.11.0", @@ -3091,9 +3091,9 @@ "license": "Apache-2.0" }, "node_modules/@firebase/auth": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/@firebase/auth/-/auth-1.10.0.tgz", - "integrity": "sha512-S7SqBsN7sIQsftNE3bitLlK+4bWrTHY+Rx2JFlNitgVYu2nK8W8ZQrkG8GCEwiFPq0B2vZ9pO5kVTFfq2sP96A==", + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/@firebase/auth/-/auth-1.10.1.tgz", + "integrity": "sha512-YsCppueiV4AsMTf4oQ49KiADvtqKnG5j9Q4mBv7xGa0hnSTAX3jpdwlTluU3n0JxUT2tbPkeOESJmF4a9GWlMQ==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -3116,13 +3116,13 @@ } }, "node_modules/@firebase/auth-compat": { - "version": "0.5.20", - "resolved": "https://registry.npmjs.org/@firebase/auth-compat/-/auth-compat-0.5.20.tgz", - "integrity": "sha512-8FwODTSBnaqGQbKfML7LcpzGGPyouB7YHg3dZq+CZMziVc7oBY1jJeNvpnM1hAQoVuTjWPXoRrCltdGeOlkKfQ==", + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/@firebase/auth-compat/-/auth-compat-0.5.21.tgz", + "integrity": "sha512-FrUEcqLEWVA3mGyq96wWVxXzEIWTrdBctgQuC4MVuCyH5rJZu1kPsLKdeCYuYbqTz7i94DNuGxMNIW3Y5eFqaQ==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@firebase/auth": "1.10.0", + "@firebase/auth": "1.10.1", "@firebase/auth-types": "0.13.0", "@firebase/component": "0.6.13", "@firebase/util": "1.11.0", @@ -3168,9 +3168,9 @@ } }, "node_modules/@firebase/data-connect": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@firebase/data-connect/-/data-connect-0.3.3.tgz", - "integrity": "sha512-JsgppNX1wcQYP5bg4Sg6WTS7S0XazklSjr1fG3ox9DHtt4LOQwJ3X1/c81mKMIZxocV22ujiwLYQWG6Y9D1FiQ==", + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/@firebase/data-connect/-/data-connect-0.3.4.tgz", + "integrity": "sha512-Clt0bHoth4N60RmzTdCaw20S5Eeg5PhjbsxP7tIB9FQlP9qm9pS25WW9v4C3gj9DugrBrJ8d/gh/e+H5+F276Q==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -3233,9 +3233,9 @@ } }, "node_modules/@firebase/firestore": { - "version": "4.7.10", - "resolved": "https://registry.npmjs.org/@firebase/firestore/-/firestore-4.7.10.tgz", - "integrity": "sha512-6nKsyo2U+jYSCcSE5sjMdDNA23DMUvYPUvsYGg09CNvcTO8GGKsPs7SpOhspsB91mbacq+u627CDAx3FUhPSSQ==", + "version": "4.7.11", + "resolved": "https://registry.npmjs.org/@firebase/firestore/-/firestore-4.7.11.tgz", + "integrity": "sha512-Ve9Q1YZKgG7Of8jhwPCy43CLe0Oi62clCDYLNYs0Rz08U75caIFZyASRmz+2FZWdMt8fLGmRLDNd0KfX16zMvA==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -3255,14 +3255,14 @@ } }, "node_modules/@firebase/firestore-compat": { - "version": "0.3.45", - "resolved": "https://registry.npmjs.org/@firebase/firestore-compat/-/firestore-compat-0.3.45.tgz", - "integrity": "sha512-uRvi7AYPmsDl7UZwPyV7jgDGYusEZ2+U2g7MndbQHKIA8fNHpYC6QrzMs58+/IjX+kF/lkUn67Vrr0AkVjlY+Q==", + "version": "0.3.46", + "resolved": "https://registry.npmjs.org/@firebase/firestore-compat/-/firestore-compat-0.3.46.tgz", + "integrity": "sha512-wwcs1aexd46z/SYHRV9ICOU3nzugSsMGdLAerInswy1SYjiilEq5jubb5KxZZk60jvirGKRbZUbTEhx7FsUkOw==", "dev": true, "license": "Apache-2.0", "dependencies": { "@firebase/component": "0.6.13", - "@firebase/firestore": "4.7.10", + "@firebase/firestore": "4.7.11", "@firebase/firestore-types": "3.0.3", "@firebase/util": "1.11.0", "tslib": "^2.1.0" @@ -4162,22 +4162,22 @@ "license": "BSD-3-Clause" }, "node_modules/@react-native-firebase/analytics": { - "version": "21.14.0", - "resolved": "https://registry.npmjs.org/@react-native-firebase/analytics/-/analytics-21.14.0.tgz", - "integrity": "sha512-hWzb/mMCw9DHu3y8tYlSFTcG6cpUNTbnOO8CDKxjmkCRlryU/sU+dT3ih3NlJXiuI6W9wSUy4qigA0SEBCiQlQ==", + "version": "22.1.0", + "resolved": "https://registry.npmjs.org/@react-native-firebase/analytics/-/analytics-22.1.0.tgz", + "integrity": "sha512-ANZGYW9/GG+inJgba0yQC2f3ucwFul+fDiehYHPE2NeDbqucIc8zkp5GjXkdh9rQdgdJS5XjwL+TbYuUXFyvFg==", "dev": true, "license": "Apache-2.0", "dependencies": { "superstruct": "^2.0.2" }, "peerDependencies": { - "@react-native-firebase/app": "21.14.0" + "@react-native-firebase/app": "22.1.0" } }, "node_modules/@react-native-firebase/app": { - "version": "21.14.0", - "resolved": "https://registry.npmjs.org/@react-native-firebase/app/-/app-21.14.0.tgz", - "integrity": "sha512-vBNfn7PoQrZfANLJnJiWZSHVu7WG6hjM5w3MDfmG8DLdr8VsAVBUgsn8lGpqobSuno1vTgwDIhR8PYZjMGsuvg==", + "version": "22.1.0", + "resolved": "https://registry.npmjs.org/@react-native-firebase/app/-/app-22.1.0.tgz", + "integrity": "sha512-s01yjF92Fpre7Ff5UzNpVE4q25x2eF+nD8SGzZzBp7nTQjK+4U+VllJ3ajvbjJkfIyMYNBowM135iK/DO5cwDA==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -4727,16 +4727,16 @@ } }, "node_modules/@react-native-firebase/auth": { - "version": "21.14.0", - "resolved": "https://registry.npmjs.org/@react-native-firebase/auth/-/auth-21.14.0.tgz", - "integrity": "sha512-m4BFrq/pC4OlPPLZJjDu0n/3QHM+pE5KlYc7dvnE8zavtlqKclvZ6cchcfm4DsPVqmuQOJ1QQqrYdOfRm3hsHA==", + "version": "22.1.0", + "resolved": "https://registry.npmjs.org/@react-native-firebase/auth/-/auth-22.1.0.tgz", + "integrity": "sha512-MOYNCMPGWKkSHQauurFjikFMcnEHpPPdXFylPhLYjodDgmHjbIkbCm82GBhgzKbQR5LDFWUGkq2CE8Hw59VyNw==", "dev": true, "license": "Apache-2.0", "dependencies": { "plist": "^3.1.0" }, "peerDependencies": { - "@react-native-firebase/app": "21.14.0", + "@react-native-firebase/app": "22.1.0", "expo": ">=47.0.0" }, "peerDependenciesMeta": { @@ -4746,16 +4746,16 @@ } }, "node_modules/@react-native-firebase/crashlytics": { - "version": "21.14.0", - "resolved": "https://registry.npmjs.org/@react-native-firebase/crashlytics/-/crashlytics-21.14.0.tgz", - "integrity": "sha512-w51Huoyg3iWgS0UfiozBqofnIaG2ZY8pdVI8iEMRAD82PKYCxFABH7WqSZOefJHvYuqip02DCmEZ9Q0b3lpBug==", + "version": "22.1.0", + "resolved": "https://registry.npmjs.org/@react-native-firebase/crashlytics/-/crashlytics-22.1.0.tgz", + "integrity": "sha512-fuDKFpXzytE/K7xKrgqEGT3E4995PBUJKmvuRTOawVIP8XRhAop2yC8L4mUZVW72MUJSG8c4oexYYA8IGKdzow==", "dev": true, "license": "Apache-2.0", "dependencies": { "stacktrace-js": "^2.0.2" }, "peerDependencies": { - "@react-native-firebase/app": "21.14.0", + "@react-native-firebase/app": "22.1.0", "expo": ">=47.0.0" }, "peerDependenciesMeta": { @@ -4765,34 +4765,34 @@ } }, "node_modules/@react-native-firebase/firestore": { - "version": "21.14.0", - "resolved": "https://registry.npmjs.org/@react-native-firebase/firestore/-/firestore-21.14.0.tgz", - "integrity": "sha512-nk8i4le8uQeydRo1JymUCUOWprVK8FUlgtjG0ZG3ne7qt7NvmzgoK59KGwP+G5e8th2wWgACDHmvRrQK6ctXlA==", + "version": "22.1.0", + "resolved": "https://registry.npmjs.org/@react-native-firebase/firestore/-/firestore-22.1.0.tgz", + "integrity": "sha512-jiizCp+XGMDy7FjuuSAOhjp6dgkFOgZZRoWnSYAOxo9kHJKkJqwtXTO3Bmc94nTGudQGoRVFWG2D8CPv+Cj7hA==", "dev": true, "license": "Apache-2.0", "peerDependencies": { - "@react-native-firebase/app": "21.14.0" + "@react-native-firebase/app": "22.1.0" } }, "node_modules/@react-native-firebase/installations": { - "version": "21.14.0", - "resolved": "https://registry.npmjs.org/@react-native-firebase/installations/-/installations-21.14.0.tgz", - "integrity": "sha512-XQ5cLzF0YmRszCpQ0CzDeRtLldvzdVbX0vGC2SUVLF4o046Em93rXvgQjNcgdztwpmS2n7xZoWZOQg4ldW0UDA==", + "version": "22.1.0", + "resolved": "https://registry.npmjs.org/@react-native-firebase/installations/-/installations-22.1.0.tgz", + "integrity": "sha512-w4I6u3iwigJRc8pLHlv2RZNSzlFXDYQ2b+C9ZjDTk6SS1VtDEKVjIYmvsJAiPd+ITHJYmawT2hF93YXd+16zCA==", "dev": true, "license": "Apache-2.0", "peerDependencies": { - "@react-native-firebase/app": "21.14.0" + "@react-native-firebase/app": "22.1.0" } }, "node_modules/@react-native-firebase/remote-config": { - "version": "21.14.0", - "resolved": "https://registry.npmjs.org/@react-native-firebase/remote-config/-/remote-config-21.14.0.tgz", - "integrity": "sha512-Zl7ltvDf4oBz3ftb16k6iH98wGfg2852mIzS1ctpL2vZXWnalVmTJW7ct1Hbx7HV+Y07sYzaBTmEUagf9vBY4Q==", + "version": "22.1.0", + "resolved": "https://registry.npmjs.org/@react-native-firebase/remote-config/-/remote-config-22.1.0.tgz", + "integrity": "sha512-AjBCndzX4gbaWLNWkpcsknXC5lK9thhxesHI/Cf0sPVmgZo2Gvbi9mPJwNUl6JfGPrvIBASAHn4wDUIJdJrwDQ==", "dev": true, "license": "Apache-2.0", "peerDependencies": { - "@react-native-firebase/analytics": "21.14.0", - "@react-native-firebase/app": "21.14.0" + "@react-native-firebase/analytics": "22.1.0", + "@react-native-firebase/app": "22.1.0" } }, "node_modules/@react-native/assets-registry": { @@ -8387,26 +8387,26 @@ } }, "node_modules/firebase": { - "version": "11.6.0", - "resolved": "https://registry.npmjs.org/firebase/-/firebase-11.6.0.tgz", - "integrity": "sha512-Xqm6j6zszIEmI5nW1MPR8yTafoRTSrW3mWG9Lk9elCJtQDQSiTEkKZiNtUm9y6XfOPl8xoF1TNpxZe8HjgA0Og==", + "version": "11.6.1", + "resolved": "https://registry.npmjs.org/firebase/-/firebase-11.6.1.tgz", + "integrity": "sha512-aF00ZR+ziiq5/vxamCKpY1I0LA/ungG2qrsQIDibT+xqdvz8MaMnN0aHU4LIxxTx+Dbga/KlUXeklidRJahgHg==", "dev": true, "license": "Apache-2.0", "dependencies": { "@firebase/analytics": "0.10.12", "@firebase/analytics-compat": "0.2.18", - "@firebase/app": "0.11.4", + "@firebase/app": "0.11.5", "@firebase/app-check": "0.8.13", "@firebase/app-check-compat": "0.3.20", - "@firebase/app-compat": "0.2.53", + "@firebase/app-compat": "0.2.54", "@firebase/app-types": "0.9.3", - "@firebase/auth": "1.10.0", - "@firebase/auth-compat": "0.5.20", - "@firebase/data-connect": "0.3.3", + "@firebase/auth": "1.10.1", + "@firebase/auth-compat": "0.5.21", + "@firebase/data-connect": "0.3.4", "@firebase/database": "1.0.14", "@firebase/database-compat": "2.0.5", - "@firebase/firestore": "4.7.10", - "@firebase/firestore-compat": "0.3.45", + "@firebase/firestore": "4.7.11", + "@firebase/firestore-compat": "0.3.46", "@firebase/functions": "0.12.3", "@firebase/functions-compat": "0.3.20", "@firebase/installations": "0.6.13", @@ -13266,9 +13266,9 @@ } }, "node_modules/typedoc": { - "version": "0.28.3", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.28.3.tgz", - "integrity": "sha512-5svOCTfXvVSh6zbZKSQluZhR8yN2tKpTeHZxlmWpE6N5vc3R8k/jhg9nnD6n5tN9/ObuQTojkONrOxFdUFUG9w==", + "version": "0.28.4", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.28.4.tgz", + "integrity": "sha512-xKvKpIywE1rnqqLgjkoq0F3wOqYaKO9nV6YkkSat6IxOWacUCc/7Es0hR3OPmkIqkPoEn7U3x+sYdG72rstZQA==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -13290,9 +13290,9 @@ } }, "node_modules/typedoc-plugin-markdown": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/typedoc-plugin-markdown/-/typedoc-plugin-markdown-4.6.2.tgz", - "integrity": "sha512-JVCIoK7FDN3t3PSLkwDyrBFyjtDznqDCJotP9evxhLyb6bEZTqhAGB0tPy1RmgHuY2WoAONMrsWs8LfLsD+A6A==", + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/typedoc-plugin-markdown/-/typedoc-plugin-markdown-4.6.3.tgz", + "integrity": "sha512-86oODyM2zajXwLs4Wok2mwVEfCwCnp756QyhLGX2IfsdRYr1DXLCgJgnLndaMUjJD7FBhnLk2okbNE9PdLxYRw==", "dev": true, "license": "MIT", "engines": { diff --git a/package.json b/package.json index 219cbd6..ba5b600 100644 --- a/package.json +++ b/package.json @@ -5,13 +5,13 @@ "url": "https://github.com/vpishuk/react-query-firebase/issues" }, "peerDependencies": { - "@react-native-firebase/analytics": "^21.0.0", - "@react-native-firebase/app": "^21.0.0", - "@react-native-firebase/auth": "^21.0.0", - "@react-native-firebase/crashlytics": "^21.0.0", - "@react-native-firebase/firestore": "^21.0.0", - "@react-native-firebase/installations": "^21.0.0", - "@react-native-firebase/remote-config": "^21.0.0", + "@react-native-firebase/analytics": "^22.1.0", + "@react-native-firebase/app": "^22.1.0", + "@react-native-firebase/auth": "^22.1.0", + "@react-native-firebase/crashlytics": "^22.1.0", + "@react-native-firebase/firestore": "^22.1.0", + "@react-native-firebase/installations": "^22.1.0", + "@react-native-firebase/remote-config": "^22.1.0", "@tanstack/react-query": "^5.0.0", "firebase": "^11.0.0", "react": "^18.0.0 || ^19.0.0" @@ -22,13 +22,13 @@ "description": "This module offers react hooks to work with Firebase on react-native and web platforms", "devDependencies": { "@laverve/eslint-utils": "^5.1.1", - "@react-native-firebase/analytics": "^21.0.0", - "@react-native-firebase/app": "^21.0.0", - "@react-native-firebase/auth": "^21.0.0", - "@react-native-firebase/crashlytics": "^21.0.0", - "@react-native-firebase/firestore": "^21.0.0", - "@react-native-firebase/installations": "^21.0.0", - "@react-native-firebase/remote-config": "^21.0.0", + "@react-native-firebase/analytics": "^22.1.0", + "@react-native-firebase/app": "^22.1.0", + "@react-native-firebase/auth": "^22.1.0", + "@react-native-firebase/crashlytics": "^22.1.0", + "@react-native-firebase/firestore": "^22.1.0", + "@react-native-firebase/installations": "^22.1.0", + "@react-native-firebase/remote-config": "^22.1.0", "@types/react": "^19.0.2", "husky": "^9.1.1", "lint-staged": "^15.1.0", diff --git a/react-native/firestore/useEnsureDoc.ts b/react-native/firestore/useEnsureDoc.ts index 28e7a71..f536e6e 100644 --- a/react-native/firestore/useEnsureDoc.ts +++ b/react-native/firestore/useEnsureDoc.ts @@ -60,7 +60,7 @@ export const useEnsureDoc = ({ queryFn: async () => { const existingDocSnap = await getDocSnap({ db, path, pathSegments, reference }); - if (existingDocSnap?.exists) { + if (existingDocSnap?.exists()) { return { ...(existingDocSnap.data() as AppModelType), uid: existingDocSnap.id }; } diff --git a/react-native/firestore/utils/getDocData.ts b/react-native/firestore/utils/getDocData.ts index 5da69b8..8e81138 100644 --- a/react-native/firestore/utils/getDocData.ts +++ b/react-native/firestore/utils/getDocData.ts @@ -25,7 +25,7 @@ export const getDocData = async ({ }: GetDocDataOptions) => { const docSnap = await getDocSnap({ db, reference, path, pathSegments }); - if (docSnap && docSnap?.exists) { + if (docSnap && docSnap?.exists()) { return { ...docSnap.data(), uid: docSnap.id } as AppModelType; } diff --git a/web/firestore/useEnsureDoc.ts b/web/firestore/useEnsureDoc.ts index 1d8b6ae..743dfc7 100644 --- a/web/firestore/useEnsureDoc.ts +++ b/web/firestore/useEnsureDoc.ts @@ -74,7 +74,7 @@ export const useEnsureDoc = ({ try { const existingDocSnap = await getDocSnap({ db, path, pathSegments, reference }); - if (existingDocSnap?.exists) { + if (existingDocSnap?.exists()) { return { ...(existingDocSnap.data() as AppModelType), uid: existingDocSnap.id }; }