Skip to content

Commit

Permalink
Rename packages
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-sachs committed Oct 16, 2023
1 parent 6fdf334 commit 9bb93c3
Show file tree
Hide file tree
Showing 52 changed files with 29 additions and 29 deletions.
6 changes: 3 additions & 3 deletions examples/react/basic/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@connectrpc/connect-query-example-react-basic",
"name": "@connectrpc/connect-react-query-example-react-basic",
"version": "0.0.0",
"private": true,
"type": "module",
Expand All @@ -16,10 +16,10 @@
"@bufbuild/protobuf": "^1.3.3",
"@bufbuild/protoc-gen-es": "^1.3.3",
"@connectrpc/connect": "^1.1.2",
"@connectrpc/connect-query": "workspace:*",
"@connectrpc/connect-react-query": "workspace:*",
"@connectrpc/connect-web": "^1.1.2",
"@connectrpc/protoc-gen-connect-es": "^1.1.2",
"@connectrpc/protoc-gen-connect-query": "^0.5.1",
"@connectrpc/protoc-gen-connect-react-query": "^0.5.1",
"@tanstack/react-query": "^4.35.7",
"@tanstack/react-query-devtools": "^4.35.7",
"@testing-library/jest-dom": "^6.1.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
createQueryService,
createUnaryHooks,
UnaryFunctionsWithHooks,
} from "@connectrpc/connect-query";
} from "@connectrpc/connect-react-query";

export const typeName = "connectrpc.eliza.v1.BigIntService";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import {
createQueryService,
createUnaryHooks,
UnaryFunctionsWithHooks,
} from "@connectrpc/connect-query";
} from "@connectrpc/connect-react-query";

export const typeName = "connectrpc.eliza.v1.ElizaService";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
createQueryService,
createUnaryHooks,
UnaryFunctionsWithHooks,
} from "@connectrpc/connect-query";
} from "@connectrpc/connect-react-query";

export const typeName = "connectrpc.eliza.v1.Haberdasher";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
createQueryService,
createUnaryHooks,
UnaryFunctionsWithHooks,
} from "@connectrpc/connect-query";
} from "@connectrpc/connect-react-query";

export const typeName = "connectrpc.eliza.v1.PaginatedService";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import {
createQueryService,
createUnaryHooks,
UnaryFunctionsWithHooks,
} from "@connectrpc/connect-query";
} from "@connectrpc/connect-react-query";

export const typeName = "connectrpc.eliza.v1.SecondService";

Expand Down
2 changes: 1 addition & 1 deletion examples/react/basic/src/gen/eliza-Slouch_connectquery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
createQueryService,
createUnaryHooks,
UnaryFunctionsWithHooks,
} from "@connectrpc/connect-query";
} from "@connectrpc/connect-react-query";

export const typeName = "connectrpc.eliza.v1.Slouch";

Expand Down
2 changes: 1 addition & 1 deletion examples/react/basic/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import "./index.css";

import type { Transport } from "@connectrpc/connect";
import { TransportProvider } from "@connectrpc/connect-query";
import { TransportProvider } from "@connectrpc/connect-react-query";
import { createConnectTransport } from "@connectrpc/connect-web";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@connectrpc/connect-query",
"name": "@connectrpc/connect-react-query",
"version": "0.5.3",
"description": "TypeScript-first expansion pack for TanStack Query that gives you Protobuf superpowers.",
"license": "Apache-2.0",
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const useTransport = () => useContext(transportContext);
*
* @example
* import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
* import { TransportProvider } from "@connectrpc/connect-query";
* import { TransportProvider } from "@connectrpc/connect-react-query";
*
* const queryClient = new QueryClient();
*
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@connectrpc/protoc-gen-connect-query",
"name": "@connectrpc/protoc-gen-connect-react-query",
"version": "0.5.3",
"description": "Code generator for connect-query",
"license": "Apache-2.0",
Expand Down Expand Up @@ -30,7 +30,7 @@
"@bufbuild/buf": "1.27.0",
"@bufbuild/protoc-gen-es": "^1.3.3",
"@connectrpc/connect": "^1.1.2",
"@connectrpc/connect-query": "workspace:*",
"@connectrpc/connect-react-query": "workspace:*",
"@connectrpc/protoc-gen-connect-es": "^1.1.2",
"@tanstack/react-query": "^4.35.7",
"typescript": "^5.2.2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {
SayResponse,
} from "./eliza_pb";
import { MethodKind } from "@bufbuild/protobuf";
import { UnaryFunctionsWithHooks } from "@connectrpc/connect-query";
import { UnaryFunctionsWithHooks } from "@connectrpc/connect-react-query";

/**
* ElizaService provides a way to talk to Eliza, a port of the DOCTOR script
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { MethodKind } from "@bufbuild/protobuf";
import {
createQueryService,
createUnaryHooks,
} from "@connectrpc/connect-query";
} from "@connectrpc/connect-react-query";

export const typeName = "connectrpc.eliza.v1.ElizaService";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import {
createQueryService,
createUnaryHooks,
UnaryFunctionsWithHooks,
} from "@connectrpc/connect-query";
} from "@connectrpc/connect-react-query";

export const typeName = "connectrpc.eliza.v1.ElizaService";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const generateServiceFile =
f.print("};");
f.print();

const unaryFunctionsWithHooks = f.import('UnaryFunctionsWithHooks', '@connectrpc/connect-query');
const unaryFunctionsWithHooks = f.import('UnaryFunctionsWithHooks', '@connectrpc/connect-react-query');

service.methods.forEach((method) => {
switch (method.methodKind) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const generateServiceFile =
f.print();

f.print(`const $queryService = `,
f.import('createQueryService', '@connectrpc/connect-query'),
f.import('createQueryService', '@connectrpc/connect-react-query'),
`({`,
` service: `, localName(service), `,`,
`});`
Expand All @@ -81,14 +81,14 @@ const generateServiceFile =
f.print(makeJsDoc(method));
const methodTsType = [
": ",
f.import('UnaryFunctionsWithHooks', '@connectrpc/connect-query'),
f.import('UnaryFunctionsWithHooks', '@connectrpc/connect-react-query'),
`<${method.input.name}, ${method.output.name}>`
]

f.print(
`export const ${safeIdentifier(localName(method))}`, ...(isTs ? methodTsType : []), ` = { `,
` ...$queryService.${localName(method)},`,
` ...`, f.import('createUnaryHooks', '@connectrpc/connect-query'),`($queryService.${localName(method)})`,
` ...`, f.import('createUnaryHooks', '@connectrpc/connect-react-query'),`($queryService.${localName(method)})`,
`};`
);

Expand Down
16 changes: 8 additions & 8 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9bb93c3

Please sign in to comment.