reactfire 4.2.1 → 4.2.3-exp.9754f86

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/sdk.d.ts CHANGED
@@ -1,70 +1,70 @@
1
- import * as React from 'react';
2
- import type { AppCheck } from 'firebase/app-check';
3
- import type { Auth } from 'firebase/auth';
4
- import type { Analytics } from 'firebase/analytics';
5
- import type { Database } from 'firebase/database';
6
- import type { Firestore } from 'firebase/firestore';
7
- import type { Functions } from 'firebase/functions';
8
- import type { FirebasePerformance } from 'firebase/performance';
9
- import type { FirebaseStorage } from 'firebase/storage';
10
- import type { RemoteConfig } from 'firebase/remote-config';
11
- import { FirebaseApp } from 'firebase/app';
12
- import { ObservableStatus } from './useObservable';
13
- import { ReactFireOptions } from '.';
14
- export declare const AppCheckSdkContext: React.Context<AppCheck | undefined>;
15
- export declare const AuthSdkContext: React.Context<Auth | undefined>;
16
- export declare const AnalyticsSdkContext: React.Context<Analytics | undefined>;
17
- export declare const DatabaseSdkContext: React.Context<Database | undefined>;
18
- export declare const FirestoreSdkContext: React.Context<Firestore | undefined>;
19
- export declare const FunctionsSdkContext: React.Context<Functions | undefined>;
20
- export declare const StorageSdkContext: React.Context<FirebaseStorage | undefined>;
21
- export declare const PerformanceSdkContext: React.Context<FirebasePerformance | undefined>;
22
- export declare const RemoteConfigSdkContext: React.Context<RemoteConfig | undefined>;
23
- declare type FirebaseSdks = Analytics | AppCheck | Auth | Database | Firestore | FirebasePerformance | FirebaseStorage | Functions | RemoteConfig;
24
- export declare const AppCheckProvider: (props: React.PropsWithChildren<{
25
- sdk: AppCheck;
26
- }>) => JSX.Element;
27
- export declare const AuthProvider: (props: React.PropsWithChildren<{
28
- sdk: Auth;
29
- }>) => JSX.Element;
30
- export declare const AnalyticsProvider: (props: React.PropsWithChildren<{
31
- sdk: Analytics;
32
- }>) => JSX.Element;
33
- export declare const DatabaseProvider: (props: React.PropsWithChildren<{
34
- sdk: Database;
35
- }>) => JSX.Element;
36
- export declare const FirestoreProvider: (props: React.PropsWithChildren<{
37
- sdk: Firestore;
38
- }>) => JSX.Element;
39
- export declare const FunctionsProvider: (props: React.PropsWithChildren<{
40
- sdk: Functions;
41
- }>) => JSX.Element;
42
- export declare const PerformanceProvider: (props: React.PropsWithChildren<{
43
- sdk: FirebasePerformance;
44
- }>) => JSX.Element;
45
- export declare const StorageProvider: (props: React.PropsWithChildren<{
46
- sdk: FirebaseStorage;
47
- }>) => JSX.Element;
48
- export declare const RemoteConfigProvider: (props: React.PropsWithChildren<{
49
- sdk: RemoteConfig;
50
- }>) => JSX.Element;
51
- export declare const useAppCheck: () => AppCheck;
52
- export declare const useAuth: () => Auth;
53
- export declare const useAnalytics: () => Analytics;
54
- export declare const useDatabase: () => Database;
55
- export declare const useFirestore: () => Firestore;
56
- export declare const useFunctions: () => Functions;
57
- export declare const usePerformance: () => FirebasePerformance;
58
- export declare const useStorage: () => FirebaseStorage;
59
- export declare const useRemoteConfig: () => RemoteConfig;
60
- declare type InitSdkHook<Sdk extends FirebaseSdks> = (initializer: (firebaseApp: FirebaseApp) => Promise<Sdk>, options?: ReactFireOptions<Sdk>) => ObservableStatus<Sdk>;
61
- export declare const useInitAppCheck: InitSdkHook<AppCheck>;
62
- export declare const useInitAuth: InitSdkHook<Auth>;
63
- export declare const useInitAnalytics: InitSdkHook<Analytics>;
64
- export declare const useInitDatabase: InitSdkHook<Database>;
65
- export declare const useInitFirestore: InitSdkHook<Firestore>;
66
- export declare const useInitFunctions: InitSdkHook<Functions>;
67
- export declare const useInitPerformance: InitSdkHook<FirebasePerformance>;
68
- export declare const useInitRemoteConfig: InitSdkHook<RemoteConfig>;
69
- export declare const useInitStorage: InitSdkHook<FirebaseStorage>;
70
- export {};
1
+ import * as React from 'react';
2
+ import type { AppCheck } from 'firebase/app-check';
3
+ import type { Auth } from 'firebase/auth';
4
+ import type { Analytics } from 'firebase/analytics';
5
+ import type { Database } from 'firebase/database';
6
+ import type { Firestore } from 'firebase/firestore';
7
+ import type { Functions } from 'firebase/functions';
8
+ import type { FirebasePerformance } from 'firebase/performance';
9
+ import type { FirebaseStorage } from 'firebase/storage';
10
+ import type { RemoteConfig } from 'firebase/remote-config';
11
+ import { FirebaseApp } from 'firebase/app';
12
+ import { ObservableStatus } from './useObservable';
13
+ import { ReactFireOptions } from '.';
14
+ export declare const AppCheckSdkContext: React.Context<AppCheck | undefined>;
15
+ export declare const AuthSdkContext: React.Context<Auth | undefined>;
16
+ export declare const AnalyticsSdkContext: React.Context<Analytics | undefined>;
17
+ export declare const DatabaseSdkContext: React.Context<Database | undefined>;
18
+ export declare const FirestoreSdkContext: React.Context<Firestore | undefined>;
19
+ export declare const FunctionsSdkContext: React.Context<Functions | undefined>;
20
+ export declare const StorageSdkContext: React.Context<FirebaseStorage | undefined>;
21
+ export declare const PerformanceSdkContext: React.Context<FirebasePerformance | undefined>;
22
+ export declare const RemoteConfigSdkContext: React.Context<RemoteConfig | undefined>;
23
+ declare type FirebaseSdks = Analytics | AppCheck | Auth | Database | Firestore | FirebasePerformance | FirebaseStorage | Functions | RemoteConfig;
24
+ export declare const AppCheckProvider: (props: React.PropsWithChildren<{
25
+ sdk: AppCheck;
26
+ }>) => JSX.Element;
27
+ export declare const AuthProvider: (props: React.PropsWithChildren<{
28
+ sdk: Auth;
29
+ }>) => JSX.Element;
30
+ export declare const AnalyticsProvider: (props: React.PropsWithChildren<{
31
+ sdk: Analytics;
32
+ }>) => JSX.Element;
33
+ export declare const DatabaseProvider: (props: React.PropsWithChildren<{
34
+ sdk: Database;
35
+ }>) => JSX.Element;
36
+ export declare const FirestoreProvider: (props: React.PropsWithChildren<{
37
+ sdk: Firestore;
38
+ }>) => JSX.Element;
39
+ export declare const FunctionsProvider: (props: React.PropsWithChildren<{
40
+ sdk: Functions;
41
+ }>) => JSX.Element;
42
+ export declare const PerformanceProvider: (props: React.PropsWithChildren<{
43
+ sdk: FirebasePerformance;
44
+ }>) => JSX.Element;
45
+ export declare const StorageProvider: (props: React.PropsWithChildren<{
46
+ sdk: FirebaseStorage;
47
+ }>) => JSX.Element;
48
+ export declare const RemoteConfigProvider: (props: React.PropsWithChildren<{
49
+ sdk: RemoteConfig;
50
+ }>) => JSX.Element;
51
+ export declare const useAppCheck: () => AppCheck;
52
+ export declare const useAuth: () => Auth;
53
+ export declare const useAnalytics: () => Analytics;
54
+ export declare const useDatabase: () => Database;
55
+ export declare const useFirestore: () => Firestore;
56
+ export declare const useFunctions: () => Functions;
57
+ export declare const usePerformance: () => FirebasePerformance;
58
+ export declare const useStorage: () => FirebaseStorage;
59
+ export declare const useRemoteConfig: () => RemoteConfig;
60
+ declare type InitSdkHook<Sdk extends FirebaseSdks> = (initializer: (firebaseApp: FirebaseApp) => Promise<Sdk>, options?: ReactFireOptions<Sdk>) => ObservableStatus<Sdk>;
61
+ export declare const useInitAppCheck: InitSdkHook<AppCheck>;
62
+ export declare const useInitAuth: InitSdkHook<Auth>;
63
+ export declare const useInitAnalytics: InitSdkHook<Analytics>;
64
+ export declare const useInitDatabase: InitSdkHook<Database>;
65
+ export declare const useInitFirestore: InitSdkHook<Firestore>;
66
+ export declare const useInitFunctions: InitSdkHook<Functions>;
67
+ export declare const useInitPerformance: InitSdkHook<FirebasePerformance>;
68
+ export declare const useInitRemoteConfig: InitSdkHook<RemoteConfig>;
69
+ export declare const useInitStorage: InitSdkHook<FirebaseStorage>;
70
+ export {};
package/dist/storage.d.ts CHANGED
@@ -1,26 +1,26 @@
1
- import * as React from 'react';
2
- import { ReactFireOptions, ObservableStatus } from './';
3
- import type { UploadTask, UploadTaskSnapshot, StorageReference, FirebaseStorage } from 'firebase/storage';
4
- /**
5
- * Subscribe to the progress of a storage task
6
- *
7
- * @param task - the task you want to listen to
8
- * @param ref - reference to the blob the task is acting on
9
- * @param options
10
- */
11
- export declare function useStorageTask<T = unknown>(task: UploadTask, ref: StorageReference, options?: ReactFireOptions<T>): ObservableStatus<UploadTaskSnapshot | T>;
12
- /**
13
- * Subscribe to a storage ref's download URL
14
- *
15
- * @param ref - reference to the blob you want to download
16
- * @param options
17
- */
18
- export declare function useStorageDownloadURL<T = string>(ref: StorageReference, options?: ReactFireOptions<T>): ObservableStatus<string | T>;
19
- declare type StorageImageProps = {
20
- storagePath: string;
21
- storage?: FirebaseStorage;
22
- suspense?: boolean;
23
- placeHolder?: JSX.Element;
24
- };
25
- export declare function StorageImage(props: StorageImageProps & React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>): JSX.Element;
26
- export {};
1
+ import * as React from 'react';
2
+ import { ReactFireOptions, ObservableStatus } from './';
3
+ import type { UploadTask, UploadTaskSnapshot, StorageReference, FirebaseStorage } from 'firebase/storage';
4
+ /**
5
+ * Subscribe to the progress of a storage task
6
+ *
7
+ * @param task - the task you want to listen to
8
+ * @param ref - reference to the blob the task is acting on
9
+ * @param options
10
+ */
11
+ export declare function useStorageTask<T = unknown>(task: UploadTask, ref: StorageReference, options?: ReactFireOptions<T>): ObservableStatus<UploadTaskSnapshot | T>;
12
+ /**
13
+ * Subscribe to a storage ref's download URL
14
+ *
15
+ * @param ref - reference to the blob you want to download
16
+ * @param options
17
+ */
18
+ export declare function useStorageDownloadURL<T = string>(ref: StorageReference, options?: ReactFireOptions<T>): ObservableStatus<string | T>;
19
+ declare type StorageImageProps = {
20
+ storagePath: string;
21
+ storage?: FirebaseStorage;
22
+ suspense?: boolean;
23
+ placeHolder?: JSX.Element;
24
+ };
25
+ export declare function StorageImage(props: StorageImageProps & React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>): JSX.Element;
26
+ export {};
@@ -1,41 +1,41 @@
1
- import { Observable } from 'rxjs';
2
- import { SuspenseSubject } from './SuspenseSubject';
3
- import { ReactFireOptions } from './';
4
- export declare function preloadObservable<T>(source: Observable<T>, id: string): SuspenseSubject<T>;
5
- export interface ObservableStatus<T> {
6
- /**
7
- * The loading status.
8
- *
9
- * - `loading`: Waiting for the first value from an observable
10
- * - `error`: Something went wrong. Check `ObservableStatus.error` for more details
11
- * - `success`: The hook has emitted at least one value
12
- *
13
- * If `initialData` is passed in, this will skip `loading` and go straight to `success`.
14
- */
15
- status: 'loading' | 'error' | 'success';
16
- /**
17
- * Indicates whether the hook has emitted a value at some point
18
- *
19
- * If `initialData` is passed in, this will be `true`.
20
- */
21
- hasEmitted: boolean;
22
- /**
23
- * If this is `true`, the hook will be emitting no further items.
24
- */
25
- isComplete: boolean;
26
- /**
27
- * The most recent value.
28
- *
29
- * If `initialData` is passed in, the first value of `data` will be the valuea provided in `initialData` **UNLESS** the underlying observable is ready, in which case it will skip `initialData`.
30
- */
31
- data: T;
32
- /**
33
- * Any error that may have occurred in the underlying observable
34
- */
35
- error: Error | undefined;
36
- /**
37
- * Promise that resolves after first emit from observable
38
- */
39
- firstValuePromise: Promise<void>;
40
- }
41
- export declare function useObservable<T = unknown>(observableId: string, source: Observable<T>, config?: ReactFireOptions): ObservableStatus<T>;
1
+ import { Observable } from 'rxjs';
2
+ import { SuspenseSubject } from './SuspenseSubject';
3
+ import { ReactFireOptions } from './';
4
+ export declare function preloadObservable<T>(source: Observable<T>, id: string): SuspenseSubject<T>;
5
+ export interface ObservableStatus<T> {
6
+ /**
7
+ * The loading status.
8
+ *
9
+ * - `loading`: Waiting for the first value from an observable
10
+ * - `error`: Something went wrong. Check `ObservableStatus.error` for more details
11
+ * - `success`: The hook has emitted at least one value
12
+ *
13
+ * If `initialData` is passed in, this will skip `loading` and go straight to `success`.
14
+ */
15
+ status: 'loading' | 'error' | 'success';
16
+ /**
17
+ * Indicates whether the hook has emitted a value at some point
18
+ *
19
+ * If `initialData` is passed in, this will be `true`.
20
+ */
21
+ hasEmitted: boolean;
22
+ /**
23
+ * If this is `true`, the hook will be emitting no further items.
24
+ */
25
+ isComplete: boolean;
26
+ /**
27
+ * The most recent value.
28
+ *
29
+ * If `initialData` is passed in, the first value of `data` will be the valuea provided in `initialData` **UNLESS** the underlying observable is ready, in which case it will skip `initialData`.
30
+ */
31
+ data: T;
32
+ /**
33
+ * Any error that may have occurred in the underlying observable
34
+ */
35
+ error: Error | undefined;
36
+ /**
37
+ * Promise that resolves after first emit from observable
38
+ */
39
+ firstValuePromise: Promise<void>;
40
+ }
41
+ export declare function useObservable<T = unknown>(observableId: string, source: Observable<T>, config?: ReactFireOptions): ObservableStatus<T>;
package/package.json CHANGED
@@ -1,27 +1,35 @@
1
1
  {
2
- "version": "4.2.1",
2
+ "version": "4.2.3-exp.9754f86",
3
3
  "license": "MIT",
4
- "main": "dist/index.js",
4
+ "type": "module",
5
+ "main": "dist/index.umd.cjs",
6
+ "exports": {
7
+ ".": {
8
+ "import": "./dist/index.js",
9
+ "require": "./dist/index.umd.cjs"
10
+ }
11
+ },
5
12
  "typings": "dist/index.d.ts",
6
13
  "files": [
7
14
  "dist",
8
15
  "src"
9
16
  ],
10
17
  "engines": {
11
- "node": ">=10"
18
+ "node": ">=14"
12
19
  },
13
20
  "scripts": {
14
- "start": "tsdx watch",
15
- "build": "tsdx build",
16
- "test:tsdx": "tsdx test",
17
- "test": "firebase emulators:exec --project=rxfire-525a3 \"tsdx test\"",
18
- "test:firestore": "firebase emulators:exec --only firestore --project=rxfire-525a3 \"tsdx test firestore --verbose\"",
19
- "test:database": "firebase emulators:exec --only database --project=rxfire-525a3 \"tsdx test database --verbose\"",
20
- "test:auth": "firebase emulators:exec --only auth --project=rxfire-525a3 \"tsdx test auth --verbose\"",
21
- "test:functions": "firebase emulators:exec --only functions --project=rxfire-525a3 \"tsdx test functions --verbose\"",
22
- "test:storage": "firebase emulators:exec --only storage --project=rxfire-525a3 \"tsdx test storage --verbose\"",
23
- "test:useObservable": "tsdx test useObservable --verbose",
24
- "lint": "tsdx lint src test",
21
+ "start": "firebase emulators:exec --project=rxfire-525a3 \"vitest --ui\"",
22
+ "build": "tsc && vite build && npm run docs",
23
+ "test": "firebase emulators:exec --project=rxfire-525a3 \"vitest\"",
24
+ "test:firestore": "firebase emulators:exec --only firestore --ui --project=rxfire-525a3 \"vitest firestore\"",
25
+ "test:database": "firebase emulators:exec --only database --project=rxfire-525a3 \"vitest database\"",
26
+ "test:auth": "firebase emulators:exec --only auth --project=rxfire-525a3 \"vitest auth\"",
27
+ "test:functions": "firebase emulators:exec --only functions --project=rxfire-525a3 \"vitest functions\"",
28
+ "test:storage": "firebase emulators:exec --only storage --project=rxfire-525a3 \"vitest storage\"",
29
+ "test:useObservable": "vitest useObservable",
30
+ "test:firebaseApp": "vitest firebaseApp",
31
+ "format": "prettier src test vite.config.ts -w",
32
+ "lint": "eslint src/* test/* vite.config.ts",
25
33
  "size": "size-limit",
26
34
  "analyze": "size-limit --why",
27
35
  "docs": "typedoc --options typedoc.json && markdown-toc -i docs/use.md",
@@ -33,18 +41,9 @@
33
41
  },
34
42
  "husky": {
35
43
  "hooks": {
36
- "pre-commit": "yarn lint"
44
+ "pre-commit": "npm run lint"
37
45
  }
38
46
  },
39
- "eslint": {
40
- "rules": {
41
- "react-hooks/rules-of-hooks": "error",
42
- "no-only-tests/no-only-tests": "error"
43
- },
44
- "plugins": [
45
- "no-only-tests"
46
- ]
47
- },
48
47
  "prettier": {
49
48
  "singleQuote": true,
50
49
  "printWidth": 160
@@ -60,7 +59,7 @@
60
59
  "url": "https://github.com/Firebase/reactfire/issues"
61
60
  },
62
61
  "homepage": "https://firebaseopensource.com/projects/firebaseextended/reactfire/",
63
- "module": "dist/reactfire.esm.js",
62
+ "module": "./dist/index.js",
64
63
  "size-limit": [
65
64
  {
66
65
  "path": "dist/reactfire.cjs.production.min.js",
@@ -72,42 +71,43 @@
72
71
  }
73
72
  ],
74
73
  "devDependencies": {
75
- "@babel/core": "^7.11.6",
76
- "@size-limit/preset-small-lib": "^4.6.0",
77
- "@testing-library/jest-dom": "^5.11.4",
78
- "@testing-library/react": "^11.2.6",
79
- "@testing-library/react-hooks": "^5.1.1",
80
- "@types/node-fetch": "^2.5.7",
81
- "@types/react": "^17.0.15",
82
- "@types/react-dom": "^17.0.9",
83
- "babel-jest": "^26.6.3",
84
- "babel-plugin-minify-replace": "^0.5.0",
74
+ "@rollup/plugin-typescript": "^8.3.4",
75
+ "@size-limit/preset-small-lib": "^7.0.8",
76
+ "@testing-library/jest-dom": "^5.16.4",
77
+ "@testing-library/react": "^12.1.5",
78
+ "@testing-library/react-hooks": "^8.0.1",
79
+ "@types/react": "^17.0.2",
80
+ "@types/react-dom": "^17.0.2",
81
+ "@typescript-eslint/eslint-plugin": "^5.32.0",
82
+ "@typescript-eslint/parser": "^5.32.0",
83
+ "@vitejs/plugin-react": "^2.0.0",
84
+ "@vitest/ui": "^0.20.3",
85
+ "cross-fetch": "^3.1.5",
86
+ "eslint": "^8.20.0",
85
87
  "eslint-plugin-no-only-tests": "^2.6.0",
86
- "firebase": "^9.0.1",
87
- "firebase-tools": "^9.16.0",
88
- "globalthis": "^1.0.1",
89
- "husky": "^4.3.0",
90
- "jest-environment-jsdom": "^26.6.2",
88
+ "eslint-plugin-react": "^7.30.1",
89
+ "eslint-plugin-react-hooks": "^4.6.0",
90
+ "firebase": "^9.9.0",
91
+ "firebase-tools": "^11.3.0",
92
+ "globalthis": "^1.0.3",
93
+ "husky": "^8.0.1",
94
+ "jest-environment-jsdom": "^28.1.3",
95
+ "jsdom": "^20.0.0",
91
96
  "markdown-toc": "^1.2.0",
92
- "node-fetch": "^2.6.1",
97
+ "prettier": "^2.7.1",
93
98
  "react": "^17.0.2",
94
99
  "react-dom": "^17.0.2",
95
100
  "react-test-renderer": "^17.0.2",
96
- "size-limit": "^4.6.0",
97
- "tsdx": "^0.14.1",
98
- "tslib": "^2.2.0",
99
- "typedoc": "^0.21.2",
100
- "typedoc-plugin-markdown": "^3.6.1",
101
- "typescript": "^4.2.4"
101
+ "rollup-plugin-visualizer": "^5.7.1",
102
+ "size-limit": "^7.0.8",
103
+ "typedoc": "^0.23.8",
104
+ "typedoc-plugin-markdown": "^3.13.3",
105
+ "typescript": "^4.7.4",
106
+ "vite": "^3.0.2",
107
+ "vitest": "^0.18.1"
102
108
  },
103
109
  "dependencies": {
104
- "rxfire": "^6.0.2",
110
+ "rxfire": "^6.0.3",
105
111
  "rxjs": "^6.6.3 || ^7.0.1"
106
- },
107
- "resolutions": {
108
- "tsdx/**/jest": "^26.6.3",
109
- "tsdx/**/ts-jest": "^26.5.5",
110
- "tsdx/**/prettier": "^2.2.1",
111
- "tsdx/**/typescript": "^4.2.4"
112
112
  }
113
113
  }
package/src/auth.tsx CHANGED
@@ -25,14 +25,7 @@ export function useUser<T = unknown>(options?: ReactFireOptions<T>): ObservableS
25
25
  const observableId = `auth:user:${auth.name}`;
26
26
  const observable$ = user(auth);
27
27
 
28
- let currentUser = auth.currentUser;
29
-
30
- // Only use options.initialData if auth.currentUser is unavailable
31
- if (!currentUser && (options?.initialData ?? options?.startWithValue)) {
32
- currentUser = options.initialData ?? options.startWithValue;
33
- }
34
-
35
- return useObservable(observableId, observable$, { ...options, initialData: currentUser });
28
+ return useObservable(observableId, observable$, options);
36
29
  }
37
30
 
38
31
  export function useIdTokenResult(user: User, forceRefresh: boolean = false, options?: ReactFireOptions<IdTokenResult>): ObservableStatus<IdTokenResult> {
@@ -117,15 +110,15 @@ export interface SignInCheckOptionsClaimsValidator extends SignInCheckOptionsBas
117
110
  *
118
111
  * ```ts
119
112
  * // pass in an object describing the custom claims a user must have
120
- * const {status, data: signInCheckResult} = useSignInCheck({requiredClaims: {admin: true}});
113
+ * const {status, data: signInCheckResult} = useSigninCheck({requiredClaims: {admin: true}});
121
114
  *
122
115
  * // pass in a custom claims validator function
123
- * const {status, data: signInCheckResult} = useSignInCheck({validateCustomClaims: (userClaims) => {
116
+ * const {status, data: signInCheckResult} = useSigninCheck({validateCustomClaims: (userClaims) => {
124
117
  * // custom validation logic...
125
118
  * }});
126
119
  *
127
120
  * // You can optionally force-refresh the token
128
- * const {status, data: signInCheckResult} = useSignInCheck({forceRefresh: true, requiredClaims: {admin: true}});
121
+ * const {status, data: signInCheckResult} = useSigninCheck({forceRefresh: true, requiredClaims: {admin: true}});
129
122
  * ```
130
123
  */
131
124
  export function useSigninCheck(
@@ -201,7 +194,7 @@ function getClaimsObjectValidator(requiredClaims: Claims): ClaimsValidator {
201
194
  }
202
195
 
203
196
  /**
204
- * @deprecated Use `useSignInCheck` instead
197
+ * @deprecated Use `useSigninCheck` instead
205
198
  *
206
199
  * Conditionally render children based on [custom claims](https://firebase.google.com/docs/auth/admin/custom-claims).
207
200
  *
@@ -238,7 +231,7 @@ export function ClaimsCheck({ user, fallback, children, requiredClaims }: Claims
238
231
  }
239
232
 
240
233
  /**
241
- * @deprecated Use `useSignInCheck` instead
234
+ * @deprecated Use `useSigninCheck` instead
242
235
  *
243
236
  * Conditionally render children based on signed-in status and [custom claims](https://firebase.google.com/docs/auth/admin/custom-claims).
244
237
  *
@@ -16,8 +16,8 @@ interface FirebaseAppProviderProps {
16
16
  suspense?: boolean;
17
17
  }
18
18
 
19
- // @ts-expect-error: "__REACTFIRE_VERSION__" is replaced with actual ReactFire version (see babel.config.js)
20
- export const version = __REACTFIRE_VERSION__;
19
+ // REACTFIRE_VERSION is automatically pulled in from `package.json` by Vite
20
+ export const version = process.env.REACTFIRE_VERSION as string;
21
21
 
22
22
  const shallowEq = (a: { [key: string]: any }, b: { [key: string]: any }) => a === b || [...Object.keys(a), ...Object.keys(b)].every((key) => a[key] === b[key]);
23
23