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

update redux toolkit, trpc client and server #103

Merged
merged 2 commits into from
Oct 6, 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
5 changes: 5 additions & 0 deletions .changeset/pink-cups-ring.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"trpc-rtk-query": patch
---

update peer deps and stop using internal dist imports from redux toolkit
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.**

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
28 changes: 14 additions & 14 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/api.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
8 changes: 3 additions & 5 deletions src/rtk-types.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Loading