diff --git a/package.json b/package.json index 2ebcf182f..578dc1317 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "semver": "7.3.8", "sqlite3": "5.1.4", "swagger-ui-express": "4.6.0", - "swr": "1.3.0", + "swr": "2.0.0", "typeorm": "0.3.11", "web-push": "3.5.0", "winston": "3.8.2", diff --git a/src/hooks/useUser.ts b/src/hooks/useUser.ts index 4dfcf0902..192b3fe9d 100644 --- a/src/hooks/useUser.ts +++ b/src/hooks/useUser.ts @@ -2,8 +2,8 @@ import { UserType } from '@server/constants/user'; import type { PermissionCheckOptions } from '@server/lib/permissions'; import { hasPermission, Permission } from '@server/lib/permissions'; import type { NotificationAgentKey } from '@server/lib/settings'; +import type { MutatorCallback } from 'swr'; import useSWR from 'swr'; -import type { MutatorCallback } from 'swr/dist/types'; export { Permission, UserType }; export type { PermissionCheckOptions }; diff --git a/yarn.lock b/yarn.lock index 22f41e8e7..03338c4a6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12491,10 +12491,12 @@ swagger-ui-express@4.6.0: dependencies: swagger-ui-dist ">=4.11.0" -swr@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/swr/-/swr-1.3.0.tgz#c6531866a35b4db37b38b72c45a63171faf9f4e8" - integrity sha512-dkghQrOl2ORX9HYrMDtPa7LTVHJjCTeZoB1dqTbnnEDlSvN8JEKpYIYurDfvbQFUUS8Cg8PceFVZNkW0KNNYPw== +swr@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/swr/-/swr-2.0.0.tgz#91d999359e2be92de1a41f6b6711d72be20ffdbd" + integrity sha512-IhUx5yPkX+Fut3h0SqZycnaNLXLXsb2ECFq0Y29cxnK7d8r7auY2JWNbCW3IX+EqXUg3rwNJFlhrw5Ye/b6k7w== + dependencies: + use-sync-external-store "^1.2.0" tailwindcss@3.2.4: version "3.2.4" @@ -13118,7 +13120,7 @@ use-isomorphic-layout-effect@^1.1.2: resolved "https://registry.yarnpkg.com/use-isomorphic-layout-effect/-/use-isomorphic-layout-effect-1.1.2.tgz#497cefb13d863d687b08477d9e5a164ad8c1a6fb" integrity sha512-49L8yCO3iGT/ZF9QttjwLF/ZD9Iwto5LnH5LmEdk/6cFmXddqi2ulF0edxTwjj+7mqvpVVGQWvbXZdn32wRSHA== -use-sync-external-store@1.2.0: +use-sync-external-store@1.2.0, use-sync-external-store@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz#7dbefd6ef3fe4e767a0cf5d7287aacfb5846928a" integrity sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==