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

es/v2: Port docs #218

Merged
merged 24 commits into from
Oct 31, 2024
Merged

es/v2: Port docs #218

merged 24 commits into from
Oct 31, 2024

Conversation

timostamm
Copy link
Member

@timostamm timostamm commented Oct 29, 2024

As a follow-up to #217, #215, #219, this updates the remainder of the Node.js and Web docs for the upcoming version 2.

Mechanical changes:

  1. rename createPromiseClient to createClient
  2. remove usage of the protoc-gen-connect-es plugin (protoc-gen-es also generates service schemas now) including generated SDKs
  3. remove .js extensions in imports (the default for the plugin option import_extension changed to none, so we don't generate them anymore)
  4. remove v1 pins in installation instructions
  5. update links to the Protobuf-ES docs
  6. replace usage of new for Protobuf messages with object literals or calls to create()

Breaking changes in Connect-ES:

  1. call out that the gRPC transport requires HTTP/2 now
  2. remove the "credentials" options from @connectrpc/connect-web transports and explain how to do the same with fetch
  3. interceptors can no longer set fetch options - remove section
  4. call out Parcel/Metro config requirement for subpath exports in FAQ

Improved compatibility:

  1. "Supported browsers & frameworks" now simply links to examples-es, only one example for react native polyfills remains.
  2. SSR docs are simplified, also thanks to the recent Svelte 5 and Next 15 releases. V2: Upgrade to Svelte 5 examples-es#1971 V2: Upgrade to Next.js v15 examples-es#1973

Drive-by changes:

  1. use "Protobuf" with uppercase P
  2. call out that HanderContext.signal also triggers on RPC completion
  3. call out jsonOptions for transports
  4. removed "Roll your own client" - not sure this option has seen much traction

Copy link

vercel bot commented Oct 29, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
connect ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 31, 2024 2:36pm

"Setting fetch() options" no longer fits. Moving it to the next section about transports, to be updated.

Signed-off-by: Timo Stamm <[email protected]>
@timostamm timostamm marked this pull request as ready for review October 31, 2024 11:24
@timostamm timostamm requested a review from smaye81 October 31, 2024 11:55
docs/node/server-plugins.md Show resolved Hide resolved
docs/web/choosing-a-protocol.mdx Show resolved Hide resolved
docs/web/choosing-a-protocol.mdx Show resolved Hide resolved
docs/web/choosing-a-protocol.mdx Show resolved Hide resolved
docs/web/errors.mdx Show resolved Hide resolved
docs/web/generating-code.mdx Show resolved Hide resolved
docs/web/testing.mdx Outdated Show resolved Hide resolved
docs/web/using-clients.mdx Outdated Show resolved Hide resolved
docs/web/using-clients.mdx Outdated Show resolved Hide resolved
@@ -110,21 +102,3 @@ Usage:
```ts
await useClient(ElizaService).say({sentence: "I feel happy."});
```

## Roll your own client
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think it's worthwhile to link to our custom-client example here? https://github.com/connectrpc/examples-es/tree/main/custom-client? I know it's been a question in public Slack a couple times.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I must have missed the cases in public slack, or I forgot. Maybe it's better to keep this section then.

The custom client example hasn't been updated yet. Taking a note to restore this section once it's updated.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Restoring in #224.

@timostamm timostamm merged commit 4366d3b into es/v2 Oct 31, 2024
3 of 5 checks passed
@timostamm timostamm deleted the tstamm/update-docs branch October 31, 2024 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants