connectrpc / connect-es

The TypeScript implementation of Connect: Protobuf RPC that works.
https://connectrpc.com/
Apache License 2.0
1.4k stars 82 forks source link

Fix transform for `createPromiseClient` -> `createClient` in connect-migrate #1269

Closed timostamm closed 1 month ago

timostamm commented 1 month ago

In v1.6.0, we're renaming createPromiseClient to createClient.

Running npx @connectrpc/connect-migrate updates imports for createPromiseClient or PromiseClient as expected, but only if the import statement doesn't import anything else.

This ports @paul-sachs' fix https://github.com/connectrpc/connect-es/pull/1268 from the v2 branch to main.