@availity/hooks 3.3.3 → 5.0.0

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
@@ -2,6 +2,35 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ # [5.0.0](https://github.com/Availity/availity-react/compare/@availity/hooks@4.0.0...@availity/hooks@5.0.0) (2023-10-16)
6
+
7
+
8
+ ### Features
9
+
10
+ * **hooks:** upgrade react query to v4 ([9b7b266](https://github.com/Availity/availity-react/commit/9b7b266fbbd880114d162d5a4f89f7a9f34a6a6f))
11
+
12
+
13
+ ### BREAKING CHANGES
14
+
15
+ * **hooks:** react query has been upgraded to v4. you must upgrade
16
+ to @tanstack/react-query@^4.36.1 in order to use this package now
17
+
18
+
19
+
20
+ # [4.0.0](https://github.com/Availity/availity-react/compare/@availity/hooks@3.3.3...@availity/hooks@4.0.0) (2023-10-09)
21
+
22
+
23
+ ### Features
24
+
25
+ * upgrade deps ([eccefc0](https://github.com/Availity/availity-react/commit/eccefc0549ebd5057595f6ac696642789375f48a))
26
+
27
+
28
+ ### BREAKING CHANGES
29
+
30
+ * axios v1 is now required
31
+
32
+
33
+
5
34
  ## [3.3.3](https://github.com/Availity/availity-react/compare/@availity/hooks@3.3.2...@availity/hooks@3.3.3) (2023-01-27)
6
35
 
7
36
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@availity/hooks",
3
- "version": "3.3.3",
3
+ "version": "5.0.0",
4
4
  "description": "A group of pre-built hooks that are common in most apps",
5
5
  "keywords": [
6
6
  "react",
@@ -25,18 +25,18 @@
25
25
  "publish:canary": "yarn npm publish --access public --tag canary"
26
26
  },
27
27
  "dependencies": {
28
- "prop-types": "^15.8.1",
29
- "react-query": "^3.39.0"
28
+ "@tanstack/react-query": "^4.36.1",
29
+ "prop-types": "^15.8.1"
30
30
  },
31
31
  "devDependencies": {
32
- "@availity/api-axios": "^7.0.1",
33
- "axios": "^0.21.4",
34
- "react": "^17.0.2",
35
- "react-dom": "^17.0.2"
32
+ "@availity/api-axios": "^8.0.3",
33
+ "axios": "^1.5.0",
34
+ "react": "^18.2.0",
35
+ "react-dom": "^18.2.0"
36
36
  },
37
37
  "peerDependencies": {
38
- "@availity/api-axios": "^6.0.0",
39
- "axios": "^0.21.1",
38
+ "@availity/api-axios": "^8.0.0",
39
+ "axios": "^1.0.0",
40
40
  "react": ">=16.8.0"
41
41
  },
42
42
  "publishConfig": {
package/project.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "projectType": "library",
4
4
  "targets": {
5
5
  "test": {
6
- "executor": "@nrwl/jest:jest",
6
+ "executor": "@nx/jest:jest",
7
7
  "outputs": ["coverage/hooks"],
8
8
  "options": { "jestConfig": "packages/hooks/jest.config.js", "passWithNoTests": true }
9
9
  },
@@ -11,13 +11,13 @@
11
11
  "executor": "@jscutlery/semver:version",
12
12
  "options": {
13
13
  "preset": "angular",
14
- "commitMessageFormat": "chore(${projectName}): release version ${version} [skip ci]",
15
- "tagPrefix": "@availity/${projectName}@",
14
+ "commitMessageFormat": "chore({projectName}): release version ${version} [skip ci]",
15
+ "tagPrefix": "@availity/{projectName}@",
16
16
  "baseBranch": "master"
17
17
  }
18
18
  },
19
19
  "lint": {
20
- "executor": "@nrwl/linter:eslint",
20
+ "executor": "@nx/linter:eslint",
21
21
  "options": {
22
22
  "eslintConfig": ".eslintrc.yaml",
23
23
  "lintFilePatterns": ["packages/hooks/**/*.{js,ts}"],
@@ -1,4 +1,4 @@
1
- import { useQuery } from 'react-query';
1
+ import { useQuery } from '@tanstack/react-query';
2
2
  import { avRegionsApi } from '@availity/api-axios';
3
3
 
4
4
  async function fetchRegion() {
@@ -1,5 +1,5 @@
1
1
  import { avUserApi } from '@availity/api-axios';
2
- import { useQuery } from 'react-query';
2
+ import { useQuery } from '@tanstack/react-query';
3
3
 
4
4
  const fetchUser = async () => avUserApi.me();
5
5
 
@@ -1,4 +1,4 @@
1
- import { useQuery } from 'react-query';
1
+ import { useQuery } from '@tanstack/react-query';
2
2
  import { avOrganizationsApi } from '@availity/api-axios';
3
3
 
4
4
  const fetchOrganization = async (config) => avOrganizationsApi.getOrganizations(config);
@@ -1,4 +1,4 @@
1
- import { useQuery } from 'react-query';
1
+ import { useQuery } from '@tanstack/react-query';
2
2
  import { avPermissionsApi } from '@availity/api-axios';
3
3
 
4
4
  const fetchPermissions = async (config) => avPermissionsApi.getPermissions(config);
@@ -1,4 +1,4 @@
1
- import { useQuery } from 'react-query';
1
+ import { useQuery } from '@tanstack/react-query';
2
2
  import { avProvidersApi } from '@availity/api-axios';
3
3
 
4
4
  const fetchProviders = async (config) => avProvidersApi.getProviders(config.customerId, config);
package/tests/util.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { render } from '@testing-library/react';
3
- import { QueryClientProvider } from 'react-query';
3
+ import { QueryClientProvider } from '@tanstack/react-query';
4
4
 
5
5
  // Taken from https://github.com/tannerlinsley/react-query/blob/master/src/react/tests/utils.tsx#L6
6
6
  export default function renderWithClient(client, ui) {
@@ -1,4 +1,4 @@
1
- import { UseQueryOptions, UseQueryResult } from 'react-query';
1
+ import { UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
2
2
 
3
3
  export type CurrentRegion = {
4
4
  code: string;
@@ -1,4 +1,4 @@
1
- import { UseQueryOptions, UseQueryResult } from 'react-query';
1
+ import { UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
2
2
 
3
3
  export type CurrentUser = {
4
4
  akaname: string;
@@ -1,5 +1,5 @@
1
1
  import { AxiosRequestConfig } from 'axios';
2
- import { UseQueryOptions, UseQueryResult } from 'react-query';
2
+ import { UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
3
3
  import { AriesHookBase } from './aries';
4
4
 
5
5
  interface OrganizationsBase {
@@ -1,5 +1,5 @@
1
1
  import { AxiosRequestConfig } from 'axios';
2
- import { UseQueryOptions, UseQueryResult } from 'react-query';
2
+ import { UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
3
3
  import { AriesHookBase } from './aries';
4
4
 
5
5
  export interface PermissionsBase {
@@ -1,5 +1,5 @@
1
1
  import { AxiosRequestConfig } from 'axios';
2
- import { UseQueryOptions, UseQueryResult } from 'react-query';
2
+ import { UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
3
3
  import { AriesHookBase } from './aries';
4
4
 
5
5
  interface ProvidersBase {