@tatsuokaniwa/swr-firestore 2.0.5 → 2.0.6
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/index.js +2 -2
- package/dist/index.umd.cjs +2 -2
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -76,7 +76,7 @@ const useCollectionCount = (params, swrOptions) => {
|
|
|
76
76
|
const sn = await getCountFromServer(q);
|
|
77
77
|
return sn.data().count;
|
|
78
78
|
};
|
|
79
|
-
return useSWR({ ...params, count: true }, fetcher, {
|
|
79
|
+
return useSWR(params != null && { ...params, count: true }, fetcher, {
|
|
80
80
|
...swrOptions,
|
|
81
81
|
use: [serializeMiddleware, ...(swrOptions == null ? void 0 : swrOptions.use) ?? []]
|
|
82
82
|
});
|
|
@@ -121,7 +121,7 @@ const useCollectionGroupCount = (params, swrOptions) => {
|
|
|
121
121
|
const sn = await getCountFromServer(q);
|
|
122
122
|
return sn.data().count;
|
|
123
123
|
};
|
|
124
|
-
return useSWR({ ...params, count: true }, fetcher, {
|
|
124
|
+
return useSWR(params != null && { ...params, count: true }, fetcher, {
|
|
125
125
|
...swrOptions,
|
|
126
126
|
use: [serializeMiddleware, ...(swrOptions == null ? void 0 : swrOptions.use) ?? []]
|
|
127
127
|
});
|
package/dist/index.umd.cjs
CHANGED
|
@@ -78,7 +78,7 @@ const useCollectionCount = (params, swrOptions) => {
|
|
|
78
78
|
const sn = await firestore.getCountFromServer(q);
|
|
79
79
|
return sn.data().count;
|
|
80
80
|
};
|
|
81
|
-
return useSWR({ ...params, count: true }, fetcher, {
|
|
81
|
+
return useSWR(params != null && { ...params, count: true }, fetcher, {
|
|
82
82
|
...swrOptions,
|
|
83
83
|
use: [serializeMiddleware, ...(swrOptions == null ? void 0 : swrOptions.use) ?? []]
|
|
84
84
|
});
|
|
@@ -123,7 +123,7 @@ const useCollectionGroupCount = (params, swrOptions) => {
|
|
|
123
123
|
const sn = await firestore.getCountFromServer(q);
|
|
124
124
|
return sn.data().count;
|
|
125
125
|
};
|
|
126
|
-
return useSWR({ ...params, count: true }, fetcher, {
|
|
126
|
+
return useSWR(params != null && { ...params, count: true }, fetcher, {
|
|
127
127
|
...swrOptions,
|
|
128
128
|
use: [serializeMiddleware, ...(swrOptions == null ? void 0 : swrOptions.use) ?? []]
|
|
129
129
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tatsuokaniwa/swr-firestore",
|
|
3
3
|
"description": "React Hooks library for Firestore using SWR's subscription feature.",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.6",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/t-k/swr-firestore.git"
|
|
@@ -66,22 +66,22 @@
|
|
|
66
66
|
"@types/lodash-es": "^4.17.7",
|
|
67
67
|
"@types/react": "^18.0.28",
|
|
68
68
|
"@types/react-dom": "^18.0.11",
|
|
69
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
69
|
+
"@typescript-eslint/eslint-plugin": "^6.1.0",
|
|
70
70
|
"@vitejs/plugin-react": "^4.0.0",
|
|
71
|
-
"@vitest/coverage-c8": "^0.
|
|
71
|
+
"@vitest/coverage-c8": "^0.33.0",
|
|
72
72
|
"c8": "^8.0.0",
|
|
73
73
|
"eslint": "^8.36.0",
|
|
74
74
|
"eslint-plugin-react": "^7.25.3",
|
|
75
75
|
"firebase": ">=9.11.0",
|
|
76
76
|
"firebase-admin": "^11.0.0 <12.0.0",
|
|
77
77
|
"jsdom": "^22.0.0",
|
|
78
|
-
"prettier": "^
|
|
78
|
+
"prettier": "^3.0.0",
|
|
79
79
|
"react": "^18.2.0",
|
|
80
80
|
"rollup-plugin-typescript-paths": "^1.4.0",
|
|
81
81
|
"swr": "^2.1.0 <3.0.0",
|
|
82
82
|
"typescript": "^5.0.2",
|
|
83
83
|
"vite-tsconfig-paths": "^4.0.7",
|
|
84
|
-
"vitest": "^0.
|
|
84
|
+
"vitest": "^0.33.0"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
87
|
"firebase": ">=9.11.0",
|