Releases: connectrpc/connect-query-es
v0.5.2
What's Changed
- Remove experimental plugin by @paul-sachs in #178
- Add ESM wrapper to avoid dual package hazard by @timostamm in #180
- Fix missing implicit types by @mckelveygreg in #211
New Contributors
- @mckelveygreg made their first contribution in #211
Full Changelog: v0.5.1...v0.5.2
v0.5.1
What's Changed
- Extract React specific dependencies into single file by @paul-sachs in #169
- Split js/ts generator by @paul-sachs in #176
Full Changelog: v0.4.4...v0.5.1
Summary of breaking changes
Changes in @connectrpc/connect-query
Breaking changes
- Removed
UnaryHooks
type and replaced withUnaryFunctionsWithHooks
- Updated
createUnaryHooks
to only return the hooks and not other functions
New functions
createUnaryFunctions
Introduced createUnaryFunctions
which can be used with the new createUnaryHooks
to do the same thing as the old createUnaryHooks
. The reasoning behind this change is to prep the core library, connect-query
, to be able to used separately from React itself and this is just the first step in that direction.
Changes in code generated by protoc-gen-connect-query
and protoc-gen-connect-query-react
New functions
Each service method now generates two new functions associated to the method:
method.createUseInfiniteQueryOptions
This method creates options that will pass to useInfiniteQuery
. It is identical to method.useInfiniteQuery
except it needs to be passed a transport directly.
createUseMutationOptions
This method creates options that will pass to useMutation
. It is identical to method.useMutation
except it needs to be passed a transport directly.
We added these methods to better future-proof the code for incoming changes to React (React Server Components, etc).
Migration
- Replace any usages of the type
UnaryHooks
withUnaryFunctionsWithHooks
- Find any usages of
createUnaryHooks
and use a combination ofcreateUnaryHooks
andcreateUnaryFunctions
Before
const say = createUnaryHooks(ExampleService);
After
const say = {
...createUnaryHooks(ExampleService),
...createUnaryFunctions(ExampleService),
}
v0.4.4
What's Changed
- Avoid as const in js extension by @paul-sachs in #167
New Contributors
- @smallsamantha made their first contribution in #163
Full Changelog: v0.4.3...v0.4.4
v0.4.3
What's Changed
- Add testing example to examples directory by @paul-sachs in #125
- Export service type from generated services by @paul-sachs in #159
Testing simplification
Exported serviced type allows you to directly use service with createRouterTransport
from @connectrpc/connect
with the exported service:
import { createRouterTransport } from "@connectrpc/connect";
import { ElizaService } from "./gen/eliza-ElizaService_connectquery";
...
const transport = createRouterTransport(({ service }) => {
service(ElizaService, {
say: () => ({
sentence: "Hello, world!",
}),
});
});
For more details, see example test here.
Full Changelog: v0.4.2...v0.4.3
v0.4.2
What's Changed
To keep Connect well-maintained and responsive to its users' needs over the long term, we're preparing to donate it to a foundation. (More details on that soon!) To cleanly separate Connect from Buf's other code, we're moving development to the connectrpc GitHub organization and to the connectrpc organization on npmjs.com.
This is the first release that publishes packages with the new @connectrpc
scope. To make the switch seamless, we are introducing a small tool that updates all references in your project automatically, @connectrpc/connect-migrate.
The switch is as simple as running a single command:
$ npx @connectrpc/connect-migrate@latest
Scanning... ✓
1 package.json file
1 lock file
5 source files
Updating source files...
src/client.ts ✓
src/server.ts ✓
src/webclient.ts ✓
Updating packages... ✓
package.json ✓
Updating lock file...
package-lock.json ✓
Old package | New package |
---|---|
@bufbuild/connect v0.13.0 | @connectrpc/connect v0.13.1 |
@bufbuild/connect-web v0.13.0 | @connectrpc/connect-web v0.13.1 |
@bufbuild/connect-fastify v0.13.0 | @connectrpc/connect-fastify v0.13.1 |
@bufbuild/connect-node v0.13.0 | @connectrpc/connect-node v0.13.1 |
@bufbuild/connect-next v0.13.0 | @connectrpc/connect-next v0.13.1 |
@bufbuild/connect-express v0.13.0 | @connectrpc/connect-express v0.13.1 |
@bufbuild/protoc-gen-connect-es v0.13.0 | @connectrpc/protoc-gen-connect-es v0.13.1 |
@bufbuild/connect-query v0.4.1 | @connectrpc/connect-query v0.4.2 |
@bufbuild/protoc-gen-connect-query v0.4.1 | @connectrpc/protoc-gen-connect-query v0.4.2 |
@bufbuild/protoc-gen-connect-query-react v0.4.1 | @connectrpc/protoc-gen-connect-query-react v0.4.2 |
Full Changelog: v0.4.1...v0.4.2
v0.4.1
What's Changed
- Use corepack to guarantee pnpm version by @paul-sachs in #60
- Update protoc-gen-connect-query to output RPC idempotency by @timostamm in #63
- Feat: Additional plugin to generate connect-query with hooks by @vctqs1 in #59
- Update readme with some references to react specific plugin by @paul-sachs in #64
- Release protoc-gen-connect-query-react by @paul-sachs in #65
- Add import-hook-form to table of contents in protoc-gen-connect-query-react readme by @vctqs1 in #68
- Update references by @smaye81 in #72
- Fix: react-query typescript in connect-query-plugin by @vctqs1 in #69
New Contributors
- @timostamm made their first contribution in #63
- @vctqs1 made their first contribution in #59
- @dependabot made their first contribution in #66
Full Changelog: v0.4.0...v0.4.1