From 27451b554b9ecc3954d6e011242bc79eebfda687 Mon Sep 17 00:00:00 2001 From: Steve Ayers Date: Tue, 6 Aug 2024 12:24:58 -0400 Subject: [PATCH 1/5] Update docs Signed-off-by: Steve Ayers --- docs/node/getting-started.md | 2 +- docs/web/generating-code.mdx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/node/getting-started.md b/docs/node/getting-started.md index e25b81d..3155c3b 100644 --- a/docs/node/getting-started.md +++ b/docs/node/getting-started.md @@ -34,7 +34,7 @@ $ cd connect-example $ npm init -y $ npm install typescript tsx $ npx tsc --init -$ npm install @bufbuild/buf @bufbuild/protoc-gen-es @bufbuild/protobuf @connectrpc/protoc-gen-connect-es @connectrpc/connect +$ npm install @bufbuild/buf @bufbuild/protoc-gen-es@"^1.10.0" @bufbuild/protobuf@"^1.10.0" @connectrpc/protoc-gen-connect-es @connectrpc/connect ``` ## Define a service diff --git a/docs/web/generating-code.mdx b/docs/web/generating-code.mdx index e24e5c4..8d9f47a 100644 --- a/docs/web/generating-code.mdx +++ b/docs/web/generating-code.mdx @@ -69,8 +69,8 @@ The code we will generate has three runtime dependencies: First, let's install `buf`, the plugins and runtime dependencies: ```bash -$ npm install --save-dev @bufbuild/buf @connectrpc/protoc-gen-connect-es @bufbuild/protoc-gen-es -$ npm install @connectrpc/connect @connectrpc/connect-web @bufbuild/protobuf +$ npm install --save-dev @bufbuild/buf @connectrpc/protoc-gen-connect-es @bufbuild/protoc-gen-es@"^1.10.0" +$ npm install @connectrpc/connect @connectrpc/connect-web @bufbuild/protobuf@"^1.10.0" ``` Next, tell Buf to use the two plugins with a new configuration file: From dc5cea92bd5dedd571ac7602fd349ec8b5e08c49 Mon Sep 17 00:00:00 2001 From: Steve Ayers Date: Tue, 6 Aug 2024 12:37:58 -0400 Subject: [PATCH 2/5] Pin versions Signed-off-by: Steve Ayers --- docs/node/server-plugins.md | 6 +++--- docs/web/generating-code.mdx | 4 ++-- docs/web/getting-started.mdx | 4 ++-- docs/web/query.mdx | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/node/server-plugins.md b/docs/node/server-plugins.md index 63112e0..e91d298 100644 --- a/docs/node/server-plugins.md +++ b/docs/node/server-plugins.md @@ -55,7 +55,7 @@ with your Connect RPCs. Use the plugin from [@connectrpc/connect-fastify](https: with Fastify: ```bash -$ npm install fastify @connectrpc/connect @connectrpc/connect-node @connectrpc/connect-fastify +$ npm install fastify @connectrpc/connect@"^1.0.0" @connectrpc/connect-node@"^1.0.0" @connectrpc/connect-fastify@"^1.0.0" ``` ```ts @@ -101,7 +101,7 @@ using the latest React features. With [@connectrpc/connect-next](https://www.npm you can serve your Connect RPCs via Next.js API Routes. ```bash -$ npm install next @connectrpc/connect @connectrpc/connect-node @connectrpc/connect-next +$ npm install next @connectrpc/connect@"^1.0.0" @connectrpc/connect-node@"^1.0.0" @connectrpc/connect-next@"^1.0.0" ``` To enable the server plugin, create the file `pages/api/[[...connect]].ts` in your project: @@ -143,7 +143,7 @@ popular because of its simplicity. Use the middleware provided by [@connectrpc/c to add your Connect RPCs to Express: ```bash -$ npm install express @connectrpc/connect @connectrpc/connect-node @connectrpc/connect-express +$ npm install express @connectrpc/connect@"^1.0.0" @connectrpc/connect-node@"^1.0.0" @connectrpc/connect-express@"^1.0.0" ``` ```ts diff --git a/docs/web/generating-code.mdx b/docs/web/generating-code.mdx index 8d9f47a..81e81de 100644 --- a/docs/web/generating-code.mdx +++ b/docs/web/generating-code.mdx @@ -69,8 +69,8 @@ The code we will generate has three runtime dependencies: First, let's install `buf`, the plugins and runtime dependencies: ```bash -$ npm install --save-dev @bufbuild/buf @connectrpc/protoc-gen-connect-es @bufbuild/protoc-gen-es@"^1.10.0" -$ npm install @connectrpc/connect @connectrpc/connect-web @bufbuild/protobuf@"^1.10.0" +$ npm install --save-dev @bufbuild/buf @connectrpc/protoc-gen-connect-es@"^1.0.0" @bufbuild/protoc-gen-es@"^1.0.0" +$ npm install @connectrpc/connect@"^1.0.0" @connectrpc/connect-web@"^1.0.0" @bufbuild/protobuf@"^1.0.0" ``` Next, tell Buf to use the two plugins with a new configuration file: diff --git a/docs/web/getting-started.mdx b/docs/web/getting-started.mdx index 098d45b..8b96b8e 100644 --- a/docs/web/getting-started.mdx +++ b/docs/web/getting-started.mdx @@ -51,7 +51,7 @@ the types we need on the fly: ```bash $ npm config set @buf:registry https://buf.build/gen/npm/v1 -$ npm install @buf/connectrpc_eliza.connectrpc_es @connectrpc/connect @connectrpc/connect-web +$ npm install @buf/connectrpc_eliza.bufbuild_es@1.10.0-20230913231627-233fca715f49.1 @connectrpc/connect@"^v1.0.0" @connectrpc/connect-web@"^v1.0.0" ``` (You can generate code locally if you prefer. We'll explain remote and local @@ -241,7 +241,7 @@ We ran the following commands to build the app: $ npm create vite@latest -- connect-example --template react-ts $ cd connect-example $ npm config set @buf:registry https://buf.build/gen/npm/v1 -$ npm install @buf/connectrpc_eliza.connectrpc_es @connectrpc/connect @connectrpc/connect-web +$ npm install @buf/connectrpc_eliza.connectrpc_es@1.4.0-20230913231627-233fca715f49.3 @connectrpc/connect@"^1.0.0" @connectrpc/connect-web@"^1.0.0" $ npm run dev ``` diff --git a/docs/web/query.mdx b/docs/web/query.mdx index 9eaf510..1cac3d1 100644 --- a/docs/web/query.mdx +++ b/docs/web/query.mdx @@ -9,7 +9,7 @@ Connect-Query is a wrapper around [TanStack Query](https://tanstack.com/query) ( ### Install ```sh -npm install @connectrpc/connect-query @connectrpc/connect-web +npm install @connectrpc/connect-query@"^1.0.0" @connectrpc/connect-web@"^1.0.0" ``` ### Usage From 9a588bef71bde69a5fedfc55128e9d62380d18c5 Mon Sep 17 00:00:00 2001 From: Steve Ayers Date: Tue, 6 Aug 2024 12:39:25 -0400 Subject: [PATCH 3/5] Missed on Signed-off-by: Steve Ayers --- docs/node/getting-started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/node/getting-started.md b/docs/node/getting-started.md index 3155c3b..3d1fa23 100644 --- a/docs/node/getting-started.md +++ b/docs/node/getting-started.md @@ -34,7 +34,7 @@ $ cd connect-example $ npm init -y $ npm install typescript tsx $ npx tsc --init -$ npm install @bufbuild/buf @bufbuild/protoc-gen-es@"^1.10.0" @bufbuild/protobuf@"^1.10.0" @connectrpc/protoc-gen-connect-es @connectrpc/connect +$ npm install @bufbuild/buf @bufbuild/protoc-gen-es@"^1.0.0" @bufbuild/protobuf@"^1.0.0" @connectrpc/protoc-gen-connect-es@"^1.0.0" @connectrpc/connect@"^1.0.0" ``` ## Define a service From a70ec2d14627bfdd8d4b2d431f390440f7e8cf22 Mon Sep 17 00:00:00 2001 From: Steve Ayers Date: Tue, 6 Aug 2024 12:42:46 -0400 Subject: [PATCH 4/5] Pin Next also Signed-off-by: Steve Ayers --- docs/node/server-plugins.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/node/server-plugins.md b/docs/node/server-plugins.md index e91d298..dc3980e 100644 --- a/docs/node/server-plugins.md +++ b/docs/node/server-plugins.md @@ -101,7 +101,7 @@ using the latest React features. With [@connectrpc/connect-next](https://www.npm you can serve your Connect RPCs via Next.js API Routes. ```bash -$ npm install next @connectrpc/connect@"^1.0.0" @connectrpc/connect-node@"^1.0.0" @connectrpc/connect-next@"^1.0.0" +$ npm install next@"^13.0.0" @connectrpc/connect@"^1.0.0" @connectrpc/connect-node@"^1.0.0" @connectrpc/connect-next@"^1.0.0" ``` To enable the server plugin, create the file `pages/api/[[...connect]].ts` in your project: From c6653a8f26436ef78dea1543fb8bd1565e8cda4e Mon Sep 17 00:00:00 2001 From: Steve Ayers Date: Tue, 6 Aug 2024 13:03:04 -0400 Subject: [PATCH 5/5] Fixed package name Signed-off-by: Steve Ayers --- docs/web/getting-started.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/web/getting-started.mdx b/docs/web/getting-started.mdx index 8b96b8e..af78b9a 100644 --- a/docs/web/getting-started.mdx +++ b/docs/web/getting-started.mdx @@ -51,7 +51,7 @@ the types we need on the fly: ```bash $ npm config set @buf:registry https://buf.build/gen/npm/v1 -$ npm install @buf/connectrpc_eliza.bufbuild_es@1.10.0-20230913231627-233fca715f49.1 @connectrpc/connect@"^v1.0.0" @connectrpc/connect-web@"^v1.0.0" +$ npm install @buf/connectrpc_eliza.connectrpc_es@1.4.0-20230913231627-233fca715f49.3 @connectrpc/connect@"^v1.0.0" @connectrpc/connect-web@"^v1.0.0" ``` (You can generate code locally if you prefer. We'll explain remote and local