diff --git a/dataconnect-sdk/js/default-connector/package.json b/dataconnect-sdk/js/default-connector/package.json index d77efcc..d436a8a 100644 --- a/dataconnect-sdk/js/default-connector/package.json +++ b/dataconnect-sdk/js/default-connector/package.json @@ -20,6 +20,6 @@ "./package.json": "./package.json" }, "peerDependencies": { - "firebase": "^10.14.0 || ^11.0.0" + "firebase": "^11.1.0" } } \ No newline at end of file diff --git a/package.json b/package.json index 1456275..610844c 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "scripts": { "test": "vitest --dom --coverage", "serve:coverage": "npx serve coverage", - "emulator": "firebase emulators:start --project demo-projectc", + "emulator": "firebase emulators:start --project test-project", "emulator:kill": "lsof -t -i:4001 -i:8080 -i:9000 -i:9099 -i:9199 -i:8085 | xargs kill -9", "check": "pnpm biome check --write ./packages/react/src" }, diff --git a/packages/react/src/auth/useDeleteUserMutation.test.tsx b/packages/react/src/auth/useDeleteUserMutation.test.tsx index 4d16411..fbb1029 100644 --- a/packages/react/src/auth/useDeleteUserMutation.test.tsx +++ b/packages/react/src/auth/useDeleteUserMutation.test.tsx @@ -1,7 +1,7 @@ import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import { act, renderHook, waitFor } from "@testing-library/react"; import { type User, createUserWithEmailAndPassword } from "firebase/auth"; -import type React from "react"; +import React, { type ReactNode } from "react"; import { afterEach, beforeEach, describe, expect, test, vi } from "vitest"; import { auth, wipeAuth } from "~/testing-utils"; import { useDeleteUserMutation } from "./useDeleteUserMutation"; diff --git a/packages/react/src/auth/useReloadMutation.test.tsx b/packages/react/src/auth/useReloadMutation.test.tsx index cb81c42..35368a6 100644 --- a/packages/react/src/auth/useReloadMutation.test.tsx +++ b/packages/react/src/auth/useReloadMutation.test.tsx @@ -5,7 +5,7 @@ import { createUserWithEmailAndPassword, signInWithEmailAndPassword, } from "firebase/auth"; -import type React from "react"; +import React, { type ReactNode } from "react"; import { afterEach, beforeEach, describe, expect, test, vi } from "vitest"; import { auth, wipeAuth } from "~/testing-utils"; import { useReloadMutation } from "./useReloadMutation"; diff --git a/packages/react/src/auth/useSendSignInLinkToEmailMutation.test.tsx b/packages/react/src/auth/useSendSignInLinkToEmailMutation.test.tsx index 2c442ee..e4b3f21 100644 --- a/packages/react/src/auth/useSendSignInLinkToEmailMutation.test.tsx +++ b/packages/react/src/auth/useSendSignInLinkToEmailMutation.test.tsx @@ -1,6 +1,6 @@ import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import { act, renderHook, waitFor } from "@testing-library/react"; -import type React from "react"; +import React, { type ReactNode } from "react"; import { beforeEach, describe, expect, test } from "vitest"; import { auth, wipeAuth } from "~/testing-utils"; import { useSendSignInLinkToEmailMutation } from "./useSendSignInLinkToEmailMutation"; diff --git a/packages/react/src/auth/useSignInAnonymouslyMutation.test.tsx b/packages/react/src/auth/useSignInAnonymouslyMutation.test.tsx index 99ea8d8..600740c 100644 --- a/packages/react/src/auth/useSignInAnonymouslyMutation.test.tsx +++ b/packages/react/src/auth/useSignInAnonymouslyMutation.test.tsx @@ -1,6 +1,6 @@ import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import { act, renderHook, waitFor } from "@testing-library/react"; -import type React from "react"; +import React, { type ReactNode } from "react"; import { type MockInstance, afterEach, diff --git a/packages/react/src/auth/useSignInWithCredentialMutation.test.tsx b/packages/react/src/auth/useSignInWithCredentialMutation.test.tsx index fe3cd49..835daa0 100644 --- a/packages/react/src/auth/useSignInWithCredentialMutation.test.tsx +++ b/packages/react/src/auth/useSignInWithCredentialMutation.test.tsx @@ -2,7 +2,7 @@ import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import { act, renderHook, waitFor } from "@testing-library/react"; import { GoogleAuthProvider } from "firebase/auth"; import jwt from "jsonwebtoken"; -import type React from "react"; +import React, { type ReactNode } from "react"; import { afterEach, beforeEach, describe, expect, test, vi } from "vitest"; import { auth, expectFirebaseError, wipeAuth } from "~/testing-utils"; import { useSignInWithCredentialMutation } from "./useSignInWithCredentialMutation"; diff --git a/packages/react/src/auth/useSignInWithEmailAndPasswordMutation.test.tsx b/packages/react/src/auth/useSignInWithEmailAndPasswordMutation.test.tsx index 17ae089..a9715f0 100644 --- a/packages/react/src/auth/useSignInWithEmailAndPasswordMutation.test.tsx +++ b/packages/react/src/auth/useSignInWithEmailAndPasswordMutation.test.tsx @@ -1,7 +1,7 @@ import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import { act, renderHook, waitFor } from "@testing-library/react"; import { createUserWithEmailAndPassword } from "firebase/auth"; -import type React from "react"; +import React, { type ReactNode } from "react"; import { afterEach, beforeEach, describe, expect, test, vi } from "vitest"; import { auth, wipeAuth } from "~/testing-utils"; import { useSignInWithEmailAndPasswordMutation } from "./useSignInWithEmailAndPasswordMutation"; diff --git a/packages/react/src/auth/useSignOutMutation.test.tsx b/packages/react/src/auth/useSignOutMutation.test.tsx index bc7063a..6a23485 100644 --- a/packages/react/src/auth/useSignOutMutation.test.tsx +++ b/packages/react/src/auth/useSignOutMutation.test.tsx @@ -4,7 +4,7 @@ import { createUserWithEmailAndPassword, signInWithEmailAndPassword, } from "firebase/auth"; -import type React from "react"; +import React, { type ReactNode } from "react"; import { beforeEach, describe, expect, test, vi } from "vitest"; import { auth, wipeAuth } from "~/testing-utils"; import { useSignOutMutation } from "./useSignOutMutation"; diff --git a/packages/react/src/auth/useUpdateCurrentUserMutation.test.tsx b/packages/react/src/auth/useUpdateCurrentUserMutation.test.tsx index d4394db..919ad23 100644 --- a/packages/react/src/auth/useUpdateCurrentUserMutation.test.tsx +++ b/packages/react/src/auth/useUpdateCurrentUserMutation.test.tsx @@ -5,7 +5,7 @@ import { createUserWithEmailAndPassword, signInWithEmailAndPassword, } from "firebase/auth"; -import type React from "react"; +import React, { type ReactNode } from "react"; import { afterEach, beforeEach, describe, expect, test, vi } from "vitest"; import { auth, wipeAuth } from "~/testing-utils"; import { useUpdateCurrentUserMutation } from "./useUpdateCurrentUserMutation"; diff --git a/packages/react/src/auth/useVerifyPasswordResetCodeMutation.test.tsx b/packages/react/src/auth/useVerifyPasswordResetCodeMutation.test.tsx index bf930a4..dc33f33 100644 --- a/packages/react/src/auth/useVerifyPasswordResetCodeMutation.test.tsx +++ b/packages/react/src/auth/useVerifyPasswordResetCodeMutation.test.tsx @@ -4,7 +4,7 @@ import { createUserWithEmailAndPassword, sendPasswordResetEmail, } from "firebase/auth"; -import type React from "react"; +import React, { type ReactNode } from "react"; import { afterEach, beforeEach, describe, expect, test, vi } from "vitest"; import { auth, wipeAuth } from "~/testing-utils"; import { useVerifyPasswordResetCodeMutation } from "./useVerifyPasswordResetCodeMutation"; diff --git a/packages/react/src/firestore/useClearIndexedDbPersistenceMutation.test.tsx b/packages/react/src/firestore/useClearIndexedDbPersistenceMutation.test.tsx index e546a23..bad812c 100644 --- a/packages/react/src/firestore/useClearIndexedDbPersistenceMutation.test.tsx +++ b/packages/react/src/firestore/useClearIndexedDbPersistenceMutation.test.tsx @@ -1,6 +1,6 @@ import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import { act, renderHook, waitFor } from "@testing-library/react"; -import type React from "react"; +import React, { type ReactNode } from "react"; import { beforeEach, describe, expect, test, vi } from "vitest"; import { firestore, wipeFirestore } from "~/testing-utils"; import { useClearIndexedDbPersistenceMutation } from "./useClearIndexedDbPersistenceMutation"; diff --git a/packages/react/src/firestore/useDisableNetworkMutation.test.tsx b/packages/react/src/firestore/useDisableNetworkMutation.test.tsx index d402027..93adae0 100644 --- a/packages/react/src/firestore/useDisableNetworkMutation.test.tsx +++ b/packages/react/src/firestore/useDisableNetworkMutation.test.tsx @@ -1,7 +1,7 @@ import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import { act, renderHook, waitFor } from "@testing-library/react"; import { doc, enableNetwork, getDocFromServer } from "firebase/firestore"; -import type React from "react"; +import React, { type ReactNode } from "react"; import { beforeEach, describe, expect, test, vi } from "vitest"; import { expectFirestoreError, diff --git a/packages/react/src/firestore/useRunTransactionMutation.test.tsx b/packages/react/src/firestore/useRunTransactionMutation.test.tsx index 71d9b1a..7e8b263 100644 --- a/packages/react/src/firestore/useRunTransactionMutation.test.tsx +++ b/packages/react/src/firestore/useRunTransactionMutation.test.tsx @@ -1,7 +1,7 @@ import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import { act, renderHook, waitFor } from "@testing-library/react"; import { type Transaction, doc, getDoc, setDoc } from "firebase/firestore"; -import type React from "react"; +import React, { type ReactNode } from "react"; import { beforeEach, describe, expect, test, vi } from "vitest"; import { firestore, wipeFirestore } from "~/testing-utils"; import { useRunTransactionMutation } from "./useRunTransactionMutation"; @@ -13,7 +13,7 @@ const queryClient = new QueryClient({ }, }); -const wrapper = ({ children }: { children: React.ReactNode }) => ( +const wrapper = ({ children }: { children: ReactNode }) => ( {children} ); diff --git a/packages/react/src/firestore/useWaitForPendingWritesQuery.test.tsx b/packages/react/src/firestore/useWaitForPendingWritesQuery.test.tsx index 5c37874..6cd3054 100644 --- a/packages/react/src/firestore/useWaitForPendingWritesQuery.test.tsx +++ b/packages/react/src/firestore/useWaitForPendingWritesQuery.test.tsx @@ -1,7 +1,7 @@ import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import { act, renderHook, waitFor } from "@testing-library/react"; import { doc, setDoc } from "firebase/firestore"; -import type React from "react"; +import React, { type ReactNode } from "react"; import { beforeEach, describe, expect, test, vi } from "vitest"; import { expectFirestoreError, diff --git a/packages/react/src/firestore/useWriteBatchCommitMutation.test.tsx b/packages/react/src/firestore/useWriteBatchCommitMutation.test.tsx index 9add229..cfafe0d 100644 --- a/packages/react/src/firestore/useWriteBatchCommitMutation.test.tsx +++ b/packages/react/src/firestore/useWriteBatchCommitMutation.test.tsx @@ -1,7 +1,7 @@ import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import { act, renderHook, waitFor } from "@testing-library/react"; import { doc, getDoc, setDoc, writeBatch } from "firebase/firestore"; -import type React from "react"; +import React, { type ReactNode } from "react"; import { beforeEach, describe, expect, test } from "vitest"; import { firestore, wipeFirestore } from "~/testing-utils"; import { useWriteBatchCommitMutation } from "./useWriteBatchCommitMutation"; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index de116c2..b711483 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -103,10 +103,10 @@ importers: packages/react: dependencies: '@tanstack/react-query': - specifier: ^5.55.4 + specifier: ^5 version: 5.56.2(react@19.0.0) firebase: - specifier: ^11.1.0 + specifier: ^11 version: 11.1.0 devDependencies: '@dataconnect/default-connector': diff --git a/vitest/utils.ts b/vitest/utils.ts index c59745d..30c4c58 100644 --- a/vitest/utils.ts +++ b/vitest/utils.ts @@ -13,7 +13,7 @@ import { import { connectorConfig } from "@/dataconnect/default-connector"; const firebaseTestingOptions = { - projectId: "demo-project", + projectId: "test-project", apiKey: "test-api-key", authDomain: "test-auth-domain", }; @@ -38,7 +38,7 @@ if (!firebaseApp) { async function wipeFirestore() { const response = await fetch( - "http://localhost:8080/emulator/v1/projects/demo-project/databases/(default)/documents", + "http://localhost:8080/emulator/v1/projects/test-project/databases/(default)/documents", { method: "DELETE", } @@ -51,7 +51,7 @@ async function wipeFirestore() { async function wipeAuth() { const response = await fetch( - "http://localhost:9099/emulator/v1/projects/demo-project/accounts", + "http://localhost:9099/emulator/v1/projects/test-project/accounts", { method: "DELETE", }