Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(chore) Bump swr to v2 #594

Merged
merged 2 commits into from
Jan 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/apps/esm-implementer-tools-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@
"react-dom": "^18.1.0",
"react-i18next": "^11.16.9",
"rxjs": "^6.5.3",
"swr": "^1.3.0"
"swr": "^2.0.1"
}
}
2 changes: 1 addition & 1 deletion packages/apps/esm-login-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@
"react-i18next": "^11.16.9",
"react-router-dom": "^6.3.0",
"rxjs": "^6.5.3",
"swr": "^1.3.0"
"swr": "^2.0.1"
}
}
2 changes: 1 addition & 1 deletion packages/apps/esm-offline-tools-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"dependencies": {
"@carbon/react": "^1.12.0",
"lodash-es": "^4.17.21",
"swr": "^1.0.1"
"swr": "^2.0.1"
},
"peerDependencies": {
"@openmrs/esm-framework": "*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,14 @@ function useMergedSwr<T>(
const mutate = () =>
Promise.all(swrResponses.map((res) => res.mutate())).then(merge);
const isValidating = swrResponses.some((res) => res.isValidating);
const isLoading = swrResponses.some((res) => res.isLoading);

return {
data,
error,
mutate,
isValidating,
isLoading,
};
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [
Expand Down
2 changes: 1 addition & 1 deletion packages/framework/esm-react-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"dependencies": {
"lodash-es": "^4.17.21",
"single-spa-react": "^5.0.0",
"swr": "^1.2.2"
"swr": "^2.0.1"
},
"peerDependencies": {
"@openmrs/esm-api": "4.x",
Expand Down
27 changes: 19 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3703,7 +3703,7 @@ __metadata:
react-dom: ^18.1.0
react-i18next: ^11.16.9
rxjs: ^6.5.3
swr: ^1.3.0
swr: ^2.0.1
peerDependencies:
"@openmrs/esm-framework": "*"
react: 18.x
Expand All @@ -3727,7 +3727,7 @@ __metadata:
react-i18next: ^11.16.9
react-router-dom: ^6.3.0
rxjs: ^6.5.3
swr: ^1.3.0
swr: ^2.0.1
peerDependencies:
"@openmrs/esm-framework": "*"
react: 18.x
Expand All @@ -3751,7 +3751,7 @@ __metadata:
react-dom: ^18.1.0
react-i18next: ^11.16.9
rxjs: ^6.5.3
swr: ^1.0.1
swr: ^2.0.1
peerDependencies:
"@openmrs/esm-framework": "*"
react: 18.x
Expand Down Expand Up @@ -3829,7 +3829,7 @@ __metadata:
react-i18next: ^11.16.9
rxjs: ^6.5.3
single-spa-react: ^5.0.0
swr: ^1.2.2
swr: ^2.0.1
unistore: ^3.5.2
peerDependencies:
"@openmrs/esm-api": 4.x
Expand Down Expand Up @@ -18088,12 +18088,14 @@ __metadata:
languageName: node
linkType: hard

"swr@npm:^1.0.1, swr@npm:^1.2.2, swr@npm:^1.3.0":
version: 1.3.0
resolution: "swr@npm:1.3.0"
"swr@npm:^2.0.1":
version: 2.0.1
resolution: "swr@npm:2.0.1"
dependencies:
use-sync-external-store: ^1.2.0
peerDependencies:
react: ^16.11.0 || ^17.0.0 || ^18.0.0
checksum: e7a184f0d560e9c8be85c023cc8e65e56a88a6ed46f9394b301b07f838edca23d2e303685319a4fcd620b81d447a7bcb489c7fa0a752c259f91764903c690cdb
checksum: 5466e46a80bccf722c212ea3f14668b4e7f047d958f3da7252fba3529e6b1773a1762aa4bbf43aec104cc50625dbd55380539eeef59fd5ad9ebca6ad0552f45d
languageName: node
linkType: hard

Expand Down Expand Up @@ -19135,6 +19137,15 @@ __metadata:
languageName: node
linkType: hard

"use-sync-external-store@npm:^1.2.0":
version: 1.2.0
resolution: "use-sync-external-store@npm:1.2.0"
peerDependencies:
react: ^16.8.0 || ^17.0.0 || ^18.0.0
checksum: 5c639e0f8da3521d605f59ce5be9e094ca772bd44a4ce7322b055a6f58eeed8dda3c94cabd90c7a41fb6fa852210092008afe48f7038792fd47501f33299116a
languageName: node
linkType: hard

"utif@npm:^2.0.1":
version: 2.0.1
resolution: "utif@npm:2.0.1"
Expand Down