@upstash/react-redis-browser 0.1.7 → 0.1.8

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 CHANGED
@@ -3065,7 +3065,7 @@ var FETCH_KEYS_QUERY_KEY = "use-fetch-keys";
3065
3065
  var KeysProvider = ({ children }) => {
3066
3066
  const { search } = useDatabrowserStore();
3067
3067
  const cleanSearchKey = search.key.replace("*", "");
3068
- const { data: exactMatchType } = useFetchKeyType(cleanSearchKey);
3068
+ const { data: exactMatchType, isFetching, isLoading } = useFetchKeyType(cleanSearchKey);
3069
3069
  const { fetchKeys, resetCache } = useFetchKeys(search);
3070
3070
  const pageRef = _react.useRef.call(void 0, 0);
3071
3071
  const query = _reactquery.useInfiniteQuery.call(void 0, {
@@ -3080,6 +3080,7 @@ var KeysProvider = ({ children }) => {
3080
3080
  getNextPageParam: (lastPage, __, lastPageIndex) => {
3081
3081
  return lastPage.hasNextPage ? lastPageIndex + 1 : void 0;
3082
3082
  },
3083
+ enabled: !isFetching,
3083
3084
  refetchOnMount: false
3084
3085
  });
3085
3086
  const refetch = _react.useCallback.call(void 0, () => {
@@ -3105,7 +3106,12 @@ var KeysProvider = ({ children }) => {
3105
3106
  {
3106
3107
  value: {
3107
3108
  keys,
3108
- query,
3109
+ // @ts-expect-error Ignore the error with spread syntax
3110
+ query: {
3111
+ ...query,
3112
+ isLoading: isLoading || query.isLoading,
3113
+ isFetching: isFetching || query.isFetching
3114
+ },
3109
3115
  refetch
3110
3116
  },
3111
3117
  children
package/dist/index.mjs CHANGED
@@ -3065,7 +3065,7 @@ var FETCH_KEYS_QUERY_KEY = "use-fetch-keys";
3065
3065
  var KeysProvider = ({ children }) => {
3066
3066
  const { search } = useDatabrowserStore();
3067
3067
  const cleanSearchKey = search.key.replace("*", "");
3068
- const { data: exactMatchType } = useFetchKeyType(cleanSearchKey);
3068
+ const { data: exactMatchType, isFetching, isLoading } = useFetchKeyType(cleanSearchKey);
3069
3069
  const { fetchKeys, resetCache } = useFetchKeys(search);
3070
3070
  const pageRef = useRef2(0);
3071
3071
  const query = useInfiniteQuery({
@@ -3080,6 +3080,7 @@ var KeysProvider = ({ children }) => {
3080
3080
  getNextPageParam: (lastPage, __, lastPageIndex) => {
3081
3081
  return lastPage.hasNextPage ? lastPageIndex + 1 : void 0;
3082
3082
  },
3083
+ enabled: !isFetching,
3083
3084
  refetchOnMount: false
3084
3085
  });
3085
3086
  const refetch = useCallback2(() => {
@@ -3105,7 +3106,12 @@ var KeysProvider = ({ children }) => {
3105
3106
  {
3106
3107
  value: {
3107
3108
  keys,
3108
- query,
3109
+ // @ts-expect-error Ignore the error with spread syntax
3110
+ query: {
3111
+ ...query,
3112
+ isLoading: isLoading || query.isLoading,
3113
+ isFetching: isFetching || query.isFetching
3114
+ },
3109
3115
  refetch
3110
3116
  },
3111
3117
  children
package/package.json CHANGED
@@ -1 +1 @@
1
- { "name": "@upstash/react-redis-browser", "version": "v0.1.7", "main": "./dist/index.js", "types": "./dist/index.d.ts", "license": "MIT", "private": false, "publishConfig": { "access": "public" }, "bugs": { "url": "https://github.com/upstash/react-redis-browser/issues" }, "homepage": "https://github.com/upstash/react-redis-browser", "files": [ "./dist/**" ], "scripts": { "build": "tsup", "dev": "vite", "lint": "tsc && eslint", "fmt": "prettier --write ./src" }, "lint-staged": { "**/*.{js,ts,tsx}": [ "prettier --write", "eslint --fix" ] }, "dependencies": { "@ianvs/prettier-plugin-sort-imports": "^4.4.0", "@monaco-editor/react": "^4.6.0", "@radix-ui/react-alert-dialog": "^1.0.5", "@radix-ui/react-context-menu": "^2.2.2", "@radix-ui/react-dialog": "^1.0.5", "@radix-ui/react-dropdown-menu": "^2.1.2", "@radix-ui/react-icons": "1.3.0", "@radix-ui/react-popover": "^1.0.7", "@radix-ui/react-portal": "^1.1.2", "@radix-ui/react-scroll-area": "^1.0.3", "@radix-ui/react-select": "^2.0.0", "@radix-ui/react-slot": "^1.0.2", "@radix-ui/react-toast": "^1.1.5", "@radix-ui/react-tooltip": "^1.0.7", "@tabler/icons-react": "^3.19.0", "@tanstack/react-query": "^5.32.0", "@types/bytes": "^3.1.4", "@upstash/redis": "^1.34.8", "bytes": "^3.1.2", "react-hook-form": "^7.53.0", "react-resizable-panels": "^2.1.4", "zustand": "5.0.0" }, "devDependencies": { "postcss-prefix-selector": "^2.1.0", "@types/node": "^22.8.4", "@types/react": "^18.3.12", "@types/react-dom": "^18.3.1", "@typescript-eslint/eslint-plugin": "8.4.0", "@typescript-eslint/parser": "8.4.0", "@vitejs/plugin-react": "^4.1.0", "autoprefixer": "^10.4.14", "class-variance-authority": "^0.7.0", "clsx": "^2.0.0", "eslint": "9.10.0", "eslint-plugin-unicorn": "55.0.0", "postcss": "^8.4.31", "prettier": "^3.0.3", "prettier-plugin-tailwindcss": "^0.5.5", "react": "^18.3.1", "react-dom": "^18.3.1", "tailwind-merge": "^2.5.4", "tailwindcss": "^3.4.14", "tailwindcss-animate": "^1.0.7", "tsup": "^8.3.5", "typescript": "^5.0.4", "vite": "^5.4.10", "vite-tsconfig-paths": "^5.0.1" }, "peerDependencies": { "react": "^18.2.0 || ^19", "react-dom": "^18.2.0 || ^19" } }
1
+ { "name": "@upstash/react-redis-browser", "version": "v0.1.8", "main": "./dist/index.js", "types": "./dist/index.d.ts", "license": "MIT", "private": false, "publishConfig": { "access": "public" }, "bugs": { "url": "https://github.com/upstash/react-redis-browser/issues" }, "homepage": "https://github.com/upstash/react-redis-browser", "files": [ "./dist/**" ], "scripts": { "build": "tsup", "dev": "vite", "lint": "tsc && eslint", "fmt": "prettier --write ./src" }, "lint-staged": { "**/*.{js,ts,tsx}": [ "prettier --write", "eslint --fix" ] }, "dependencies": { "@ianvs/prettier-plugin-sort-imports": "^4.4.0", "@monaco-editor/react": "^4.6.0", "@radix-ui/react-alert-dialog": "^1.0.5", "@radix-ui/react-context-menu": "^2.2.2", "@radix-ui/react-dialog": "^1.0.5", "@radix-ui/react-dropdown-menu": "^2.1.2", "@radix-ui/react-icons": "1.3.0", "@radix-ui/react-popover": "^1.0.7", "@radix-ui/react-portal": "^1.1.2", "@radix-ui/react-scroll-area": "^1.0.3", "@radix-ui/react-select": "^2.0.0", "@radix-ui/react-slot": "^1.0.2", "@radix-ui/react-toast": "^1.1.5", "@radix-ui/react-tooltip": "^1.0.7", "@tabler/icons-react": "^3.19.0", "@tanstack/react-query": "^5.32.0", "@types/bytes": "^3.1.4", "@upstash/redis": "^1.34.8", "bytes": "^3.1.2", "react-hook-form": "^7.53.0", "react-resizable-panels": "^2.1.4", "zustand": "5.0.0" }, "devDependencies": { "postcss-prefix-selector": "^2.1.0", "@types/node": "^22.8.4", "@types/react": "^18.3.12", "@types/react-dom": "^18.3.1", "@typescript-eslint/eslint-plugin": "8.4.0", "@typescript-eslint/parser": "8.4.0", "@vitejs/plugin-react": "^4.1.0", "autoprefixer": "^10.4.14", "class-variance-authority": "^0.7.0", "clsx": "^2.0.0", "eslint": "9.10.0", "eslint-plugin-unicorn": "55.0.0", "postcss": "^8.4.31", "prettier": "^3.0.3", "prettier-plugin-tailwindcss": "^0.5.5", "react": "^18.3.1", "react-dom": "^18.3.1", "tailwind-merge": "^2.5.4", "tailwindcss": "^3.4.14", "tailwindcss-animate": "^1.0.7", "tsup": "^8.3.5", "typescript": "^5.0.4", "vite": "^5.4.10", "vite-tsconfig-paths": "^5.0.1" }, "peerDependencies": { "react": "^18.2.0 || ^19", "react-dom": "^18.2.0 || ^19" } }