From 4eaecd05417cfa9fa852610caef6151ec30e6cd5 Mon Sep 17 00:00:00 2001 From: bryan-hunter Date: Thu, 5 Oct 2023 12:17:29 -0500 Subject: [PATCH 1/2] update redux toolkit, trpc client and server --- README.md | 4 ++-- package.json | 6 +++--- pnpm-lock.yaml | 28 ++++++++++++++-------------- src/api.ts | 2 +- src/rtk-types.ts | 8 +++----- 5 files changed, 23 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index f8ec891..58f732f 100644 --- a/README.md +++ b/README.md @@ -47,8 +47,8 @@ yarn add trpc-rtk-query @reduxjs/toolkit @trpc/client @trpc/server Note the minimum versions for packages: -- @reduxjs/toolkit: `1.9.5` -- @trpc/client & @trpc/server `10.31.0` +- @reduxjs/toolkit: `1.9.7` +- @trpc/client & @trpc/server `10.38.5` **2. Initialize the `tRPC router`.** diff --git a/package.json b/package.json index f5f844e..a82abb6 100644 --- a/package.json +++ b/package.json @@ -22,9 +22,9 @@ "devDependencies": { "@changesets/changelog-github": "^0.4.8", "@changesets/cli": "^2.26.2", - "@reduxjs/toolkit": "1.9.5", - "@trpc/client": "10.31.0", - "@trpc/server": "10.31.0", + "@reduxjs/toolkit": "1.9.7", + "@trpc/client": "10.38.5", + "@trpc/server": "10.38.5", "@tsconfig/node20": "^20.1.0", "@tsconfig/strictest": "^2.0.1", "@types/react": "16.9.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 24607d8..bdcf401 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -17,14 +17,14 @@ devDependencies: specifier: ^2.26.2 version: 2.26.2 '@reduxjs/toolkit': - specifier: 1.9.5 - version: 1.9.5(react-redux@7.2.2)(react@16.9.0) + specifier: 1.9.7 + version: 1.9.7(react-redux@7.2.2)(react@16.9.0) '@trpc/client': - specifier: 10.31.0 - version: 10.31.0(@trpc/server@10.31.0) + specifier: 10.38.5 + version: 10.38.5(@trpc/server@10.38.5) '@trpc/server': - specifier: 10.31.0 - version: 10.31.0 + specifier: 10.38.5 + version: 10.38.5 '@tsconfig/node20': specifier: ^20.1.0 version: 20.1.2 @@ -690,8 +690,8 @@ packages: fastq: 1.15.0 dev: true - /@reduxjs/toolkit@1.9.5(react-redux@7.2.2)(react@16.9.0): - resolution: {integrity: sha512-Rt97jHmfTeaxL4swLRNPD/zV4OxTes4la07Xc4hetpUW/vc75t5m1ANyxG6ymnEQ2FsLQsoMlYB2vV1sO3m8tQ==} + /@reduxjs/toolkit@1.9.7(react-redux@7.2.2)(react@16.9.0): + resolution: {integrity: sha512-t7v8ZPxhhKgOKtU+uyJT13lu4vL7az5aFi4IdoDs/eS548edn2M8Ik9h8fxgvMjGoAUVFSt6ZC1P5cWmQ014QQ==} peerDependencies: react: ^16.9.0 || ^17.0.0 || ^18 react-redux: ^7.2.1 || ^8.0.2 @@ -718,16 +718,16 @@ packages: engines: {node: '>= 10'} dev: true - /@trpc/client@10.31.0(@trpc/server@10.31.0): - resolution: {integrity: sha512-VCqbJEvFJb8C4hQFw7AD+dkQTjgEdV/QAzO4D+/cX5e93u5NpfNXI+PKS0QFXwG/zqgwQwVV6OkYc/D/MFwA6g==} + /@trpc/client@10.38.5(@trpc/server@10.38.5): + resolution: {integrity: sha512-tpGUsoAP+3CD/1KRqMdWZ+zebvB68/86SaVPAYHaEDozTFLQdNqTe98DS/T0S4hfh7WCKbMSObj40SCzE8amKQ==} peerDependencies: - '@trpc/server': 10.31.0 + '@trpc/server': 10.38.5 dependencies: - '@trpc/server': 10.31.0 + '@trpc/server': 10.38.5 dev: true - /@trpc/server@10.31.0: - resolution: {integrity: sha512-9EnRTSDE9nF11LZsvSOqNKqkRYzHqFX4ch5AJ6VIu8uta2vxVTN4FxxsNRSOluTzVYZDeaCISbwmOJ5iihCCIg==} + /@trpc/server@10.38.5: + resolution: {integrity: sha512-J0d2Y3Gpt2bMohOshPBfuzDqVrPaE3OKEDtJYgTmLk5t1pZy3kXHQep4rP2LEIr+ELbmkelhcrSvvFLA+4/w/Q==} dev: true /@tsconfig/node20@20.1.2: diff --git a/src/api.ts b/src/api.ts index 83345bb..15532ef 100644 --- a/src/api.ts +++ b/src/api.ts @@ -1,4 +1,4 @@ -import { type ApiEndpointQuery } from "@reduxjs/toolkit/dist/query/core/module"; // TODO: https://github.com/otahontas/trpc-rtk-query/issues/39 +import { type ApiEndpointQuery } from "@reduxjs/toolkit/query"; import { type Api, type BaseQueryFn, diff --git a/src/rtk-types.ts b/src/rtk-types.ts index 2d1cee5..5ac6909 100644 --- a/src/rtk-types.ts +++ b/src/rtk-types.ts @@ -1,12 +1,10 @@ -// TODO: https://github.com/otahontas/trpc-rtk-query/issues/39 -import { type CoreModule } from "@reduxjs/toolkit/dist/query/core/module"; -import { type ReactHooksModule } from "@reduxjs/toolkit/dist/query/react/module"; -import { type Api } from "@reduxjs/toolkit/query/react"; +import { type CoreModule } from "@reduxjs/toolkit/query"; +import { type Api, reactHooksModuleName } from "@reduxjs/toolkit/query/react"; /** * RTK modules that are supported. Passed api needs to support these */ -export type SupportedModule = CoreModule | ReactHooksModule; +export type SupportedModule = CoreModule | typeof reactHooksModuleName; /** * Generic api type that can be used as type constrain From e842f81fbdcef0af479b6119702766bb018ea8d6 Mon Sep 17 00:00:00 2001 From: Otto Ahoniemi Date: Fri, 6 Oct 2023 09:46:51 +0300 Subject: [PATCH 2/2] Create pink-cups-ring.md --- .changeset/pink-cups-ring.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/pink-cups-ring.md diff --git a/.changeset/pink-cups-ring.md b/.changeset/pink-cups-ring.md new file mode 100644 index 0000000..214a4e4 --- /dev/null +++ b/.changeset/pink-cups-ring.md @@ -0,0 +1,5 @@ +--- +"trpc-rtk-query": patch +--- + +update peer deps and stop using internal dist imports from redux toolkit