@parca/profile 0.16.221 → 0.16.223

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/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [0.16.223](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.222...@parca/profile@0.16.223) (2023-08-15)
7
+
8
+ **Note:** Version bump only for package @parca/profile
9
+
10
+ ## 0.16.222 (2023-08-10)
11
+
12
+ **Note:** Version bump only for package @parca/profile
13
+
6
14
  ## [0.16.221](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.220...@parca/profile@0.16.221) (2023-08-09)
7
15
 
8
16
  **Note:** Version bump only for package @parca/profile
@@ -5,7 +5,8 @@ interface Props<IRes> {
5
5
  options?: {
6
6
  enabled?: boolean | undefined;
7
7
  staleTime?: number | undefined;
8
+ retry?: number | boolean;
8
9
  };
9
10
  }
10
- declare const useGrpcQuery: <IRes>({ key, queryFn, options: { enabled, staleTime }, }: Props<IRes>) => UseQueryResult<IRes, unknown>;
11
+ declare const useGrpcQuery: <IRes>({ key, queryFn, options: { enabled, staleTime, retry }, }: Props<IRes>) => UseQueryResult<IRes, unknown>;
11
12
  export default useGrpcQuery;
@@ -11,12 +11,13 @@
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
13
  import { useQuery } from '@tanstack/react-query';
14
- const useGrpcQuery = ({ key, queryFn, options: { enabled = true, staleTime } = {}, }) => {
14
+ const useGrpcQuery = ({ key, queryFn, options: { enabled = true, staleTime, retry } = {}, }) => {
15
15
  return useQuery(key, async () => {
16
16
  return await queryFn();
17
17
  }, {
18
18
  enabled,
19
19
  staleTime,
20
+ retry,
20
21
  });
21
22
  };
22
23
  export default useGrpcQuery;
package/dist/useQuery.js CHANGED
@@ -28,6 +28,7 @@ export const useQuery = (client, profileSource, reportType, options) => {
28
28
  return response;
29
29
  },
30
30
  options: {
31
+ retry: false,
31
32
  enabled: !skip,
32
33
  staleTime: 1000 * 60 * 5, // 5 minutes
33
34
  },
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@parca/profile",
3
- "version": "0.16.221",
3
+ "version": "0.16.223",
4
4
  "description": "Profile viewing libraries",
5
5
  "dependencies": {
6
6
  "@parca/client": "^0.16.82",
7
- "@parca/components": "^0.16.176",
7
+ "@parca/components": "^0.16.177",
8
8
  "@parca/dynamicsize": "^0.16.54",
9
9
  "@parca/hooks": "^0.0.17",
10
10
  "@parca/parser": "^0.16.55",
@@ -47,5 +47,5 @@
47
47
  "access": "public",
48
48
  "registry": "https://registry.npmjs.org/"
49
49
  },
50
- "gitHead": "247b54f3d042a88c844577df37b008236028baf3"
50
+ "gitHead": "cd60b3a3a302d6d8ef5783aa65bda15b4c997be2"
51
51
  }
@@ -19,13 +19,14 @@ interface Props<IRes> {
19
19
  options?: {
20
20
  enabled?: boolean | undefined;
21
21
  staleTime?: number | undefined;
22
+ retry?: number | boolean;
22
23
  };
23
24
  }
24
25
 
25
26
  const useGrpcQuery = <IRes>({
26
27
  key,
27
28
  queryFn,
28
- options: {enabled = true, staleTime} = {},
29
+ options: {enabled = true, staleTime, retry} = {},
29
30
  }: Props<IRes>): UseQueryResult<IRes> => {
30
31
  return useQuery<IRes>(
31
32
  key,
@@ -35,6 +36,7 @@ const useGrpcQuery = <IRes>({
35
36
  {
36
37
  enabled,
37
38
  staleTime,
39
+ retry,
38
40
  }
39
41
  );
40
42
  };
package/src/useQuery.tsx CHANGED
@@ -53,6 +53,7 @@ export const useQuery = (
53
53
  return response;
54
54
  },
55
55
  options: {
56
+ retry: false,
56
57
  enabled: !skip,
57
58
  staleTime: 1000 * 60 * 5, // 5 minutes
58
59
  },