From ee28d6e507b5469bb8b1af09af87852b14c11f91 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 2 Dec 2023 16:29:41 +0000 Subject: [PATCH] chore: update versions (canary) --- .changeset/pre.json | 4 +++- packages/client/CHANGELOG.md | 31 +++++++++++++++++++++++++++++ packages/client/package.json | 2 +- packages/infinite/CHANGELOG.md | 36 ++++++++++++++++++++++++++++++++++ packages/infinite/package.json | 2 +- packages/next/CHANGELOG.md | 36 ++++++++++++++++++++++++++++++++++ packages/next/package.json | 2 +- packages/ssr/CHANGELOG.md | 36 ++++++++++++++++++++++++++++++++++ packages/ssr/package.json | 2 +- 9 files changed, 146 insertions(+), 5 deletions(-) diff --git a/.changeset/pre.json b/.changeset/pre.json index eb5b6ad..5f14877 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -13,5 +13,7 @@ "e2e": "1.0.0", "unit": "1.0.0" }, - "changesets": [] + "changesets": [ + "tender-ducks-bow" + ] } diff --git a/packages/client/CHANGELOG.md b/packages/client/CHANGELOG.md index ed6fade..90a7eb1 100644 --- a/packages/client/CHANGELOG.md +++ b/packages/client/CHANGELOG.md @@ -1,5 +1,36 @@ # @trpc-swr/client +## 3.0.0-canary.0 + +### Major Changes + +- [#54](https://github.com/sannajammeh/trpc-swr/pull/54) [`5b020a2`](https://github.com/sannajammeh/trpc-swr/commit/5b020a2a9d01e86d125eee33192f025ce7e35462) Thanks [@sannajammeh](https://github.com/sannajammeh)! - ## What: + + `@trpc-swr/ssr` - `createProxySSGHelpers` renamed to `createSSRHelpers` + + `@trpc-swr/ssr` - Calling `api.endpoint.fetch` is no longer support, use api.endpoint() directly. trpc-swr will now proxy all arguments directly into appRouter.createCaller() instead of calling `caller.query`. + This allows for both mutations and queries to endpoints in React Server Components and other SSR calls + + #### Before + + ```tsx + const data = await rsc.users.byId.fetch({ id: 1 }); + + const swrFallback = await rsc.dehydrate(); + ``` + + #### After + + ```tsx + const data = await rsc.users.byId({ id: 1 }); + + // Other supported methods: + const key = rsc.users.byId.getKey(); // Use to manually forward to SWRConfig. + const swrFallback = await rsc.dehydrate(); + ``` + + As always both direct access and dehydration into SWR serializable fallback is supported. + ## 2.0.1 ### Patch Changes diff --git a/packages/client/package.json b/packages/client/package.json index ac40414..67fac3f 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@trpc-swr/client", - "version": "2.0.1", + "version": "3.0.0-canary.0", "description": "", "main": "./dist/index.js", "module": "./dist/index.esm.js", diff --git a/packages/infinite/CHANGELOG.md b/packages/infinite/CHANGELOG.md index e1bb4b3..5d4fe9b 100644 --- a/packages/infinite/CHANGELOG.md +++ b/packages/infinite/CHANGELOG.md @@ -1,5 +1,41 @@ # @trpc-swr/infinite +## 3.0.0-canary.0 + +### Major Changes + +- [#54](https://github.com/sannajammeh/trpc-swr/pull/54) [`5b020a2`](https://github.com/sannajammeh/trpc-swr/commit/5b020a2a9d01e86d125eee33192f025ce7e35462) Thanks [@sannajammeh](https://github.com/sannajammeh)! - ## What: + + `@trpc-swr/ssr` - `createProxySSGHelpers` renamed to `createSSRHelpers` + + `@trpc-swr/ssr` - Calling `api.endpoint.fetch` is no longer support, use api.endpoint() directly. trpc-swr will now proxy all arguments directly into appRouter.createCaller() instead of calling `caller.query`. + This allows for both mutations and queries to endpoints in React Server Components and other SSR calls + + #### Before + + ```tsx + const data = await rsc.users.byId.fetch({ id: 1 }); + + const swrFallback = await rsc.dehydrate(); + ``` + + #### After + + ```tsx + const data = await rsc.users.byId({ id: 1 }); + + // Other supported methods: + const key = rsc.users.byId.getKey(); // Use to manually forward to SWRConfig. + const swrFallback = await rsc.dehydrate(); + ``` + + As always both direct access and dehydration into SWR serializable fallback is supported. + +### Patch Changes + +- Updated dependencies [[`5b020a2`](https://github.com/sannajammeh/trpc-swr/commit/5b020a2a9d01e86d125eee33192f025ce7e35462)]: + - @trpc-swr/client@3.0.0-canary.0 + ## 2.0.1 ### Patch Changes diff --git a/packages/infinite/package.json b/packages/infinite/package.json index 575e49e..35b3d1c 100644 --- a/packages/infinite/package.json +++ b/packages/infinite/package.json @@ -1,6 +1,6 @@ { "name": "@trpc-swr/infinite", - "version": "2.0.1", + "version": "3.0.0-canary.0", "description": "", "main": "./dist/index.js", "module": "./dist/index.esm.js", diff --git a/packages/next/CHANGELOG.md b/packages/next/CHANGELOG.md index 49c1783..b64f2eb 100644 --- a/packages/next/CHANGELOG.md +++ b/packages/next/CHANGELOG.md @@ -1,5 +1,41 @@ # @trpc-swr/next +## 3.0.0-canary.0 + +### Major Changes + +- [#54](https://github.com/sannajammeh/trpc-swr/pull/54) [`5b020a2`](https://github.com/sannajammeh/trpc-swr/commit/5b020a2a9d01e86d125eee33192f025ce7e35462) Thanks [@sannajammeh](https://github.com/sannajammeh)! - ## What: + + `@trpc-swr/ssr` - `createProxySSGHelpers` renamed to `createSSRHelpers` + + `@trpc-swr/ssr` - Calling `api.endpoint.fetch` is no longer support, use api.endpoint() directly. trpc-swr will now proxy all arguments directly into appRouter.createCaller() instead of calling `caller.query`. + This allows for both mutations and queries to endpoints in React Server Components and other SSR calls + + #### Before + + ```tsx + const data = await rsc.users.byId.fetch({ id: 1 }); + + const swrFallback = await rsc.dehydrate(); + ``` + + #### After + + ```tsx + const data = await rsc.users.byId({ id: 1 }); + + // Other supported methods: + const key = rsc.users.byId.getKey(); // Use to manually forward to SWRConfig. + const swrFallback = await rsc.dehydrate(); + ``` + + As always both direct access and dehydration into SWR serializable fallback is supported. + +### Patch Changes + +- Updated dependencies [[`5b020a2`](https://github.com/sannajammeh/trpc-swr/commit/5b020a2a9d01e86d125eee33192f025ce7e35462)]: + - @trpc-swr/client@3.0.0-canary.0 + ## 2.0.1 ### Patch Changes diff --git a/packages/next/package.json b/packages/next/package.json index 4ef17b6..8095128 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,6 +1,6 @@ { "name": "@trpc-swr/next", - "version": "2.0.1", + "version": "3.0.0-canary.0", "description": "", "main": "./dist/index.js", "module": "./dist/index.esm.js", diff --git a/packages/ssr/CHANGELOG.md b/packages/ssr/CHANGELOG.md index 06f0114..4614efa 100644 --- a/packages/ssr/CHANGELOG.md +++ b/packages/ssr/CHANGELOG.md @@ -1,5 +1,41 @@ # @trpc-swr/ssr +## 3.0.0-canary.0 + +### Major Changes + +- [#54](https://github.com/sannajammeh/trpc-swr/pull/54) [`5b020a2`](https://github.com/sannajammeh/trpc-swr/commit/5b020a2a9d01e86d125eee33192f025ce7e35462) Thanks [@sannajammeh](https://github.com/sannajammeh)! - ## What: + + `@trpc-swr/ssr` - `createProxySSGHelpers` renamed to `createSSRHelpers` + + `@trpc-swr/ssr` - Calling `api.endpoint.fetch` is no longer support, use api.endpoint() directly. trpc-swr will now proxy all arguments directly into appRouter.createCaller() instead of calling `caller.query`. + This allows for both mutations and queries to endpoints in React Server Components and other SSR calls + + #### Before + + ```tsx + const data = await rsc.users.byId.fetch({ id: 1 }); + + const swrFallback = await rsc.dehydrate(); + ``` + + #### After + + ```tsx + const data = await rsc.users.byId({ id: 1 }); + + // Other supported methods: + const key = rsc.users.byId.getKey(); // Use to manually forward to SWRConfig. + const swrFallback = await rsc.dehydrate(); + ``` + + As always both direct access and dehydration into SWR serializable fallback is supported. + +### Patch Changes + +- Updated dependencies [[`5b020a2`](https://github.com/sannajammeh/trpc-swr/commit/5b020a2a9d01e86d125eee33192f025ce7e35462)]: + - @trpc-swr/client@3.0.0-canary.0 + ## 2.0.1 ### Patch Changes diff --git a/packages/ssr/package.json b/packages/ssr/package.json index 649dc5f..f841e94 100644 --- a/packages/ssr/package.json +++ b/packages/ssr/package.json @@ -1,6 +1,6 @@ { "name": "@trpc-swr/ssr", - "version": "2.0.1", + "version": "3.0.0-canary.0", "description": "", "main": "./dist/index.js", "module": "./dist/index.esm.js",