From 036bab5d047797da15c1cc776c44dfb24bb090ed Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Dec 2023 12:51:37 -0500 Subject: [PATCH 1/8] Bump the connectrelated group with 6 updates (#302) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the connectrelated group with 6 updates: | Package | From | To | | --- | --- | --- | | [@bufbuild/protobuf](https://github.com/bufbuild/protobuf-es/tree/HEAD/packages/protobuf) | `1.4.1` | `1.6.0` | | [@bufbuild/protoplugin](https://github.com/bufbuild/protobuf-es/tree/HEAD/packages/protoplugin) | `1.4.1` | `1.6.0` | | [@bufbuild/buf](https://github.com/bufbuild/buf) | `1.27.2` | `1.28.1` | | [@bufbuild/protoc-gen-es](https://github.com/bufbuild/protobuf-es/tree/HEAD/packages/protoc-gen-es) | `1.4.1` | `1.6.0` | | [@connectrpc/connect](https://github.com/connectrpc/connect-es/tree/HEAD/packages/connect) | `1.1.3` | `1.1.4` | | [@connectrpc/protoc-gen-connect-es](https://github.com/connectrpc/connect-es/tree/HEAD/packages/protoc-gen-connect-es) | `1.1.3` | `1.1.4` | Updates `@bufbuild/protobuf` from 1.4.1 to 1.6.0
Release notes

Sourced from @​bufbuild/protobuf's releases.

v1.6.0

What's Changed

Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v1.5.1...v1.6.0

v1.5.1

What's Changed

Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v1.5.0...v1.5.1

v1.5.0

This release includes preliminary support for editions. Please note that it's still an experimental feature.

What's Changed

New Contributors

Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v1.4.2...v1.5.0

v1.4.2

What's Changed

Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v1.4.1...v1.4.2

Commits

Updates `@bufbuild/protoplugin` from 1.4.1 to 1.6.0
Release notes

Sourced from @​bufbuild/protoplugin's releases.

v1.6.0

What's Changed

Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v1.5.1...v1.6.0

v1.5.1

What's Changed

Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v1.5.0...v1.5.1

v1.5.0

This release includes preliminary support for editions. Please note that it's still an experimental feature.

What's Changed

New Contributors

Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v1.4.2...v1.5.0

v1.4.2

What's Changed

Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v1.4.1...v1.4.2

Commits

Updates `@bufbuild/buf` from 1.27.2 to 1.28.1
Release notes

Sourced from @​bufbuild/buf's releases.

v1.28.1

v1.28.0

Changelog

Sourced from @​bufbuild/buf's changelog.

[v1.28.1] - 2023-11-15

[v1.28.0] - 2023-11-10

Commits

Updates `@bufbuild/protoc-gen-es` from 1.4.1 to 1.6.0
Release notes

Sourced from @​bufbuild/protoc-gen-es's releases.

v1.6.0

What's Changed

Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v1.5.1...v1.6.0

v1.5.1

What's Changed

Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v1.5.0...v1.5.1

v1.5.0

This release includes preliminary support for editions. Please note that it's still an experimental feature.

What's Changed

New Contributors

Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v1.4.2...v1.5.0

v1.4.2

What's Changed

Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v1.4.1...v1.4.2

Commits

Updates `@connectrpc/connect` from 1.1.3 to 1.1.4
Release notes

Sourced from @​connectrpc/connect's releases.

v1.1.4

What's Changed

Full Changelog: https://github.com/connectrpc/connect-es/compare/v1.1.3...v1.1.4

Commits

Updates `@connectrpc/protoc-gen-connect-es` from 1.1.3 to 1.1.4
Release notes

Sourced from @​connectrpc/protoc-gen-connect-es's releases.

v1.1.4

What's Changed

Full Changelog: https://github.com/connectrpc/connect-es/compare/v1.1.3...v1.1.4

Commits

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
--------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Paul Sachs --- examples/react/basic/package.json | 4 +- examples/react/basic/src/gen/eliza_pb.ts | 2 +- packages/connect-query/package.json | 4 +- packages/connect-query/src/gen/eliza_pb.ts | 2 +- .../protoc-gen-connect-query/package.json | 12 +- .../gen/connectrpc/eliza/v1/eliza_pb.ts | 2 +- pnpm-lock.yaml | 391 +++++++++--------- 7 files changed, 213 insertions(+), 204 deletions(-) diff --git a/examples/react/basic/package.json b/examples/react/basic/package.json index 7c66a918..c3e00dff 100644 --- a/examples/react/basic/package.json +++ b/examples/react/basic/package.json @@ -13,8 +13,8 @@ }, "dependencies": { "@bufbuild/buf": "1.28.1", - "@bufbuild/protobuf": "^1.5.1", - "@bufbuild/protoc-gen-es": "^1.5.1", + "@bufbuild/protobuf": "^1.6.0", + "@bufbuild/protoc-gen-es": "^1.6.0", "@connectrpc/connect": "^1.1.4", "@connectrpc/connect-query": "workspace:*", "@connectrpc/connect-web": "^1.1.4", diff --git a/examples/react/basic/src/gen/eliza_pb.ts b/examples/react/basic/src/gen/eliza_pb.ts index ace9534b..cd219ebb 100644 --- a/examples/react/basic/src/gen/eliza_pb.ts +++ b/examples/react/basic/src/gen/eliza_pb.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// @generated by protoc-gen-es v1.5.1 with parameter "target=ts" +// @generated by protoc-gen-es v1.6.0 with parameter "target=ts" // @generated from file eliza.proto (package connectrpc.eliza.v1, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/packages/connect-query/package.json b/packages/connect-query/package.json index 22040762..8b546646 100644 --- a/packages/connect-query/package.json +++ b/packages/connect-query/package.json @@ -36,8 +36,8 @@ "@arethetypeswrong/cli": "^0.13.3", "@bufbuild/buf": "1.28.1", "@bufbuild/jest-environment-jsdom": "^0.1.1", - "@bufbuild/protobuf": "^1.5.1", - "@bufbuild/protoc-gen-es": "^1.5.1", + "@bufbuild/protobuf": "^1.6.0", + "@bufbuild/protoc-gen-es": "^1.6.0", "@connectrpc/connect": "^1.1.4", "@connectrpc/connect-web": "^1.1.4", "@connectrpc/protoc-gen-connect-es": "^1.1.4", diff --git a/packages/connect-query/src/gen/eliza_pb.ts b/packages/connect-query/src/gen/eliza_pb.ts index 71cc6c58..dbd390d5 100644 --- a/packages/connect-query/src/gen/eliza_pb.ts +++ b/packages/connect-query/src/gen/eliza_pb.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// @generated by protoc-gen-es v1.5.1 with parameter "target=ts" +// @generated by protoc-gen-es v1.6.0 with parameter "target=ts" // @generated from file eliza.proto (package connectrpc.eliza.v1, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/packages/protoc-gen-connect-query/package.json b/packages/protoc-gen-connect-query/package.json index f9fff556..c6cb9db5 100644 --- a/packages/protoc-gen-connect-query/package.json +++ b/packages/protoc-gen-connect-query/package.json @@ -27,17 +27,17 @@ }, "preferUnplugged": true, "devDependencies": { - "@bufbuild/buf": "1.27.2", - "@bufbuild/protoc-gen-es": "^1.4.1", - "@connectrpc/connect": "^1.1.3", + "@bufbuild/buf": "1.28.1", + "@bufbuild/protoc-gen-es": "^1.6.0", + "@connectrpc/connect": "^1.1.4", "@connectrpc/connect-query": "workspace:*", - "@connectrpc/protoc-gen-connect-es": "^1.1.3", + "@connectrpc/protoc-gen-connect-es": "^1.1.4", "@tanstack/react-query": "^5.4.3", "typescript": "^5.3.3" }, "dependencies": { - "@bufbuild/protobuf": "^1.4.1", - "@bufbuild/protoplugin": "^1.4.1" + "@bufbuild/protobuf": "^1.6.0", + "@bufbuild/protoplugin": "^1.6.0" }, "peerDependencies": { "@bufbuild/protoc-gen-es": "1.x" diff --git a/packages/protoc-gen-connect-query/snapshots/gen/connectrpc/eliza/v1/eliza_pb.ts b/packages/protoc-gen-connect-query/snapshots/gen/connectrpc/eliza/v1/eliza_pb.ts index cdaf3111..e6678979 100644 --- a/packages/protoc-gen-connect-query/snapshots/gen/connectrpc/eliza/v1/eliza_pb.ts +++ b/packages/protoc-gen-connect-query/snapshots/gen/connectrpc/eliza/v1/eliza_pb.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// @generated by protoc-gen-es v1.4.1 with parameter "target=ts" +// @generated by protoc-gen-es v1.6.0 with parameter "target=ts" // @generated from file connectrpc/eliza/v1/eliza.proto (package connectrpc.eliza.v1, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 237bce4b..38da40ce 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -70,7 +70,7 @@ importers: version: 3.1.0 ts-jest: specifier: 29.1.1 - version: 29.1.1(@babel/core@7.23.5)(jest@29.7.0)(typescript@5.3.3) + version: 29.1.1(@babel/core@7.23.6)(jest@29.7.0)(typescript@5.3.3) ts-node: specifier: 10.9.1 version: 10.9.1(@types/node@20.10.4)(typescript@5.3.3) @@ -87,23 +87,23 @@ importers: specifier: 1.28.1 version: 1.28.1 '@bufbuild/protobuf': - specifier: ^1.5.1 - version: 1.5.1 + specifier: ^1.6.0 + version: 1.6.0 '@bufbuild/protoc-gen-es': - specifier: ^1.5.1 - version: 1.5.1(@bufbuild/protobuf@1.5.1) + specifier: ^1.6.0 + version: 1.6.0(@bufbuild/protobuf@1.6.0) '@connectrpc/connect': specifier: ^1.1.4 - version: 1.1.4(@bufbuild/protobuf@1.5.1) + version: 1.1.4(@bufbuild/protobuf@1.6.0) '@connectrpc/connect-query': specifier: workspace:* version: link:../../../packages/connect-query '@connectrpc/connect-web': specifier: ^1.1.4 - version: 1.1.4(@bufbuild/protobuf@1.5.1)(@connectrpc/connect@1.1.4) + version: 1.1.4(@bufbuild/protobuf@1.6.0)(@connectrpc/connect@1.1.4) '@connectrpc/protoc-gen-connect-es': specifier: ^1.1.4 - version: 1.1.4(@bufbuild/protoc-gen-es@1.5.1)(@connectrpc/connect@1.1.4) + version: 1.1.4(@bufbuild/protoc-gen-es@1.6.0)(@connectrpc/connect@1.1.4) '@connectrpc/protoc-gen-connect-query': specifier: workspace:* version: link:../../../packages/protoc-gen-connect-query @@ -157,20 +157,20 @@ importers: specifier: ^0.1.1 version: 0.1.1(jest-environment-jsdom@29.7.0) '@bufbuild/protobuf': - specifier: ^1.5.1 - version: 1.5.1 + specifier: ^1.6.0 + version: 1.6.0 '@bufbuild/protoc-gen-es': - specifier: ^1.5.1 - version: 1.5.1(@bufbuild/protobuf@1.5.1) + specifier: ^1.6.0 + version: 1.6.0(@bufbuild/protobuf@1.6.0) '@connectrpc/connect': specifier: ^1.1.4 - version: 1.1.4(@bufbuild/protobuf@1.5.1) + version: 1.1.4(@bufbuild/protobuf@1.6.0) '@connectrpc/connect-web': specifier: ^1.1.4 - version: 1.1.4(@bufbuild/protobuf@1.5.1)(@connectrpc/connect@1.1.4) + version: 1.1.4(@bufbuild/protobuf@1.6.0)(@connectrpc/connect@1.1.4) '@connectrpc/protoc-gen-connect-es': specifier: ^1.1.4 - version: 1.1.4(@bufbuild/protoc-gen-es@1.5.1)(@connectrpc/connect@1.1.4) + version: 1.1.4(@bufbuild/protoc-gen-es@1.6.0)(@connectrpc/connect@1.1.4) '@tanstack/react-query': specifier: ^5.4.3 version: 5.4.3(react-dom@18.2.0)(react@18.2.0) @@ -196,27 +196,27 @@ importers: packages/protoc-gen-connect-query: dependencies: '@bufbuild/protobuf': - specifier: ^1.4.1 - version: 1.4.1 + specifier: ^1.6.0 + version: 1.6.0 '@bufbuild/protoplugin': - specifier: ^1.4.1 - version: 1.4.1 + specifier: ^1.6.0 + version: 1.6.0 devDependencies: '@bufbuild/buf': - specifier: 1.27.2 - version: 1.27.2 + specifier: 1.28.1 + version: 1.28.1 '@bufbuild/protoc-gen-es': - specifier: ^1.4.1 - version: 1.4.1(@bufbuild/protobuf@1.4.1) + specifier: ^1.6.0 + version: 1.6.0(@bufbuild/protobuf@1.6.0) '@connectrpc/connect': - specifier: ^1.1.3 - version: 1.1.3(@bufbuild/protobuf@1.4.1) + specifier: ^1.1.4 + version: 1.1.4(@bufbuild/protobuf@1.6.0) '@connectrpc/connect-query': specifier: workspace:* version: link:../connect-query '@connectrpc/protoc-gen-connect-es': - specifier: ^1.1.3 - version: 1.1.3(@bufbuild/protoc-gen-es@1.4.1)(@connectrpc/connect@1.1.3) + specifier: ^1.1.4 + version: 1.1.4(@bufbuild/protoc-gen-es@1.6.0)(@connectrpc/connect@1.1.4) '@tanstack/react-query': specifier: ^5.4.3 version: 5.4.3(react-dom@18.2.0)(react@18.2.0) @@ -282,6 +282,11 @@ packages: resolution: {integrity: sha512-BQYjKbpXjoXwFW5jGqiizJQQT/aC7pFm9Ok1OWssonuguICi264lbgMzRp2ZMmRSlfkX6DsWDDcsrctK8Rwfiw==} engines: {node: '>=6.9.0'} + /@babel/compat-data@7.23.5: + resolution: {integrity: sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw==} + engines: {node: '>=6.9.0'} + dev: true + /@babel/core@7.23.5: resolution: {integrity: sha512-Cwc2XjUrG4ilcfOw4wBAK+enbdgwAcAJCfGUItPBKR7Mjw4aEfAFYrLxeRp4jWgtNIKn3n2AlBOfwwafl+42/g==} engines: {node: '>=6.9.0'} @@ -304,6 +309,29 @@ packages: transitivePeerDependencies: - supports-color + /@babel/core@7.23.6: + resolution: {integrity: sha512-FxpRyGjrMJXh7X3wGLGhNDCRiwpWEF74sKjTLDJSG5Kyvow3QZaG0Adbqzi9ZrVjTWpsX+2cxWXD71NMg93kdw==} + engines: {node: '>=6.9.0'} + dependencies: + '@ampproject/remapping': 2.2.1 + '@babel/code-frame': 7.23.5 + '@babel/generator': 7.23.6 + '@babel/helper-compilation-targets': 7.23.6 + '@babel/helper-module-transforms': 7.23.3(@babel/core@7.23.6) + '@babel/helpers': 7.23.6 + '@babel/parser': 7.23.6 + '@babel/template': 7.22.15 + '@babel/traverse': 7.23.6 + '@babel/types': 7.23.6 + convert-source-map: 2.0.0 + debug: 4.3.4 + gensync: 1.0.0-beta.2 + json5: 2.2.3 + semver: 6.3.1 + transitivePeerDependencies: + - supports-color + dev: true + /@babel/generator@7.23.5: resolution: {integrity: sha512-BPssCHrBD+0YrxviOa3QzpqwhNIXKEtOa2jQrm4FlmkC2apYgRnQcmPWiGZDlGxiNtltnUFolMe8497Esry+jA==} engines: {node: '>=6.9.0'} @@ -313,6 +341,16 @@ packages: '@jridgewell/trace-mapping': 0.3.20 jsesc: 2.5.2 + /@babel/generator@7.23.6: + resolution: {integrity: sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.23.6 + '@jridgewell/gen-mapping': 0.3.3 + '@jridgewell/trace-mapping': 0.3.20 + jsesc: 2.5.2 + dev: true + /@babel/helper-compilation-targets@7.22.15: resolution: {integrity: sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw==} engines: {node: '>=6.9.0'} @@ -323,6 +361,17 @@ packages: lru-cache: 5.1.1 semver: 6.3.1 + /@babel/helper-compilation-targets@7.23.6: + resolution: {integrity: sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/compat-data': 7.23.5 + '@babel/helper-validator-option': 7.23.5 + browserslist: 4.22.2 + lru-cache: 5.1.1 + semver: 6.3.1 + dev: true + /@babel/helper-environment-visitor@7.22.20: resolution: {integrity: sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==} engines: {node: '>=6.9.0'} @@ -359,6 +408,20 @@ packages: '@babel/helper-split-export-declaration': 7.22.6 '@babel/helper-validator-identifier': 7.22.20 + /@babel/helper-module-transforms@7.23.3(@babel/core@7.23.6): + resolution: {integrity: sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + dependencies: + '@babel/core': 7.23.6 + '@babel/helper-environment-visitor': 7.22.20 + '@babel/helper-module-imports': 7.22.15 + '@babel/helper-simple-access': 7.22.5 + '@babel/helper-split-export-declaration': 7.22.6 + '@babel/helper-validator-identifier': 7.22.20 + dev: true + /@babel/helper-plugin-utils@7.22.5: resolution: {integrity: sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==} engines: {node: '>=6.9.0'} @@ -387,6 +450,11 @@ packages: resolution: {integrity: sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==} engines: {node: '>=6.9.0'} + /@babel/helper-validator-option@7.23.5: + resolution: {integrity: sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==} + engines: {node: '>=6.9.0'} + dev: true + /@babel/helpers@7.23.5: resolution: {integrity: sha512-oO7us8FzTEsG3U6ag9MfdF1iA/7Z6dz+MtFhifZk8C8o453rGJFFWUP1t+ULM9TUIAzC9uxXEiXjOiVMyd7QPg==} engines: {node: '>=6.9.0'} @@ -397,6 +465,17 @@ packages: transitivePeerDependencies: - supports-color + /@babel/helpers@7.23.6: + resolution: {integrity: sha512-wCfsbN4nBidDRhpDhvcKlzHWCTlgJYUUdSJfzXb2NuBssDSIjc3xcb+znA7l+zYsFljAcGM0aFkN40cR3lXiGA==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/template': 7.22.15 + '@babel/traverse': 7.23.6 + '@babel/types': 7.23.6 + transitivePeerDependencies: + - supports-color + dev: true + /@babel/highlight@7.23.4: resolution: {integrity: sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==} engines: {node: '>=6.9.0'} @@ -412,6 +491,14 @@ packages: dependencies: '@babel/types': 7.23.5 + /@babel/parser@7.23.6: + resolution: {integrity: sha512-Z2uID7YJ7oNvAI20O9X0bblw7Qqs8Q2hFy0R9tAfnfLkp5MW0UH9eUvnDSnFwKZ0AvgS1ucqR4KzvVHgnke1VQ==} + engines: {node: '>=6.0.0'} + hasBin: true + dependencies: + '@babel/types': 7.23.6 + dev: true + /@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.23.5): resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==} peerDependencies: @@ -578,6 +665,24 @@ packages: transitivePeerDependencies: - supports-color + /@babel/traverse@7.23.6: + resolution: {integrity: sha512-czastdK1e8YByZqezMPFiZ8ahwVMh/ESl9vPgvgdB9AmFMGP5jfpFax74AQgl5zj4XHzqeYAg2l8PuUeRS1MgQ==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/code-frame': 7.23.5 + '@babel/generator': 7.23.6 + '@babel/helper-environment-visitor': 7.22.20 + '@babel/helper-function-name': 7.23.0 + '@babel/helper-hoist-variables': 7.22.5 + '@babel/helper-split-export-declaration': 7.22.6 + '@babel/parser': 7.23.6 + '@babel/types': 7.23.6 + debug: 4.3.4 + globals: 11.12.0 + transitivePeerDependencies: + - supports-color + dev: true + /@babel/types@7.23.5: resolution: {integrity: sha512-ON5kSOJwVO6xXVRTvOI0eOnWe7VdUcIpsovGo9U/Br4Ie4UVFQTboO2cYnDhAGU6Fp+UxSiT+pMft0SMHfuq6w==} engines: {node: '>=6.9.0'} @@ -586,18 +691,18 @@ packages: '@babel/helper-validator-identifier': 7.22.20 to-fast-properties: 2.0.0 + /@babel/types@7.23.6: + resolution: {integrity: sha512-+uarb83brBzPKN38NX1MkB6vb6+mwvR6amUulqAE7ccQw1pEl+bCia9TbdG1lsnFP7lZySvUn37CHyXQdfTwzg==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-string-parser': 7.23.4 + '@babel/helper-validator-identifier': 7.22.20 + to-fast-properties: 2.0.0 + dev: true + /@bcoe/v8-coverage@0.2.3: resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} - /@bufbuild/buf-darwin-arm64@1.27.2: - resolution: {integrity: sha512-ob1IAhFVsAVUr5o4EAwoeQ6FOGJdiS6eYGTGQiZzJEAYSs2dX/WQ9+Xz9EPQUb93n7PMjNs38DLDfwGQ3u3dsg==} - engines: {node: '>=12'} - cpu: [arm64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - /@bufbuild/buf-darwin-arm64@1.28.1: resolution: {integrity: sha512-nAyvwKkcd8qQTExCZo5MtSRhXLK7e3vzKFKHjXfkveRakSUST2HFlFZAHfErZimN4wBrPTN0V0hNRU8PPjkMpQ==} engines: {node: '>=12'} @@ -606,15 +711,6 @@ packages: requiresBuild: true optional: true - /@bufbuild/buf-darwin-x64@1.27.2: - resolution: {integrity: sha512-Kp0HBvLjeOxJtZ/j3vOulX6G3u5pa9vksVmJ5HGjhL0BZJwavh8Bd9YgrBDrTzKtTQMHxmhTSaNEgNUWkjecfw==} - engines: {node: '>=12'} - cpu: [x64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - /@bufbuild/buf-darwin-x64@1.28.1: resolution: {integrity: sha512-b0eT3xd3vX5a5lWAbo5h7FPuf9MsOJI4I39qs4TZnrlZ8BOuPfqzwzijiFf9UCwaX2vR1NQXexIoQ80Ci+fCHw==} engines: {node: '>=12'} @@ -623,15 +719,6 @@ packages: requiresBuild: true optional: true - /@bufbuild/buf-linux-aarch64@1.27.2: - resolution: {integrity: sha512-rq+bpT+FMR1iiUvcHno1SPS4e0Ydr+F7ArIzN5cO4DKL09sBJXcaVGa7fRRlBZvNJTt3XRVtlE8LNLGH7zjBOg==} - engines: {node: '>=12'} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: true - optional: true - /@bufbuild/buf-linux-aarch64@1.28.1: resolution: {integrity: sha512-p5h9bZCVLMh8No9/7k7ulXzsFx5P7Lu6DiUMjSJ6aBXPMYo6Xl7r/6L2cQkpsZ53HMtIxCgMYS9a7zoS4K8wIw==} engines: {node: '>=12'} @@ -640,15 +727,6 @@ packages: requiresBuild: true optional: true - /@bufbuild/buf-linux-x64@1.27.2: - resolution: {integrity: sha512-t/lcJ06gELy+4hVROuoeX8Y+oXq9NrPX+UgT5WujGo21oOb8UAQETZLRefj2U4IRqYqXhTKicfOI2y8xI7CSlQ==} - engines: {node: '>=12'} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: true - optional: true - /@bufbuild/buf-linux-x64@1.28.1: resolution: {integrity: sha512-fVJ3DiRigIso06jgEl+JNp59Y5t2pxDHd10d3SA4r+14sXbZ2J7Gy/wBqVXPry4x/jW567KKlvmhg7M5ZBgCQQ==} engines: {node: '>=12'} @@ -657,15 +735,6 @@ packages: requiresBuild: true optional: true - /@bufbuild/buf-win32-arm64@1.27.2: - resolution: {integrity: sha512-rJieGmtSw4tfteW6mhjdtDDTFBbl2HBan1FnfNAOZH4ZrTwfcOO5Vn3fUMl+jPtiCpTscyzVaYHI+LvYffSdvg==} - engines: {node: '>=12'} - cpu: [arm64] - os: [win32] - requiresBuild: true - dev: true - optional: true - /@bufbuild/buf-win32-arm64@1.28.1: resolution: {integrity: sha512-KJiRJpugQRK/jXC46Xjlb68UydWhCZj2jHdWLIwNtgXd1WTJ3LngChZV7Y6pPK08pwBAVz0JYeVbD5IlTCD4TQ==} engines: {node: '>=12'} @@ -674,15 +743,6 @@ packages: requiresBuild: true optional: true - /@bufbuild/buf-win32-x64@1.27.2: - resolution: {integrity: sha512-x9IKCHgj6GmDGH2xlTo80l2feNU3hUeoEwLFLH4I5Qs2L1gfYIDMZGp+0Bhm5eK9CIWYtkJqeqGRIJkrJA6CfQ==} - engines: {node: '>=12'} - cpu: [x64] - os: [win32] - requiresBuild: true - dev: true - optional: true - /@bufbuild/buf-win32-x64@1.28.1: resolution: {integrity: sha512-vMnc+7OVCkmlRWQsgYHgUqiBPRIjD8XeoRyApJ07YZzGs7DkRH4LhvmacJbLd3wORylbn6gLz3pQa8J/M61mzg==} engines: {node: '>=12'} @@ -691,20 +751,6 @@ packages: requiresBuild: true optional: true - /@bufbuild/buf@1.27.2: - resolution: {integrity: sha512-hwZYF0DCxvmTAZIAeT/q66HYtIxnSH9jn/CVElaJA/l+Clr9zhLdfKFd1yD2lMqHpNUEeXtA8T0ABXv29NVfYQ==} - engines: {node: '>=12'} - hasBin: true - requiresBuild: true - optionalDependencies: - '@bufbuild/buf-darwin-arm64': 1.27.2 - '@bufbuild/buf-darwin-x64': 1.27.2 - '@bufbuild/buf-linux-aarch64': 1.27.2 - '@bufbuild/buf-linux-x64': 1.27.2 - '@bufbuild/buf-win32-arm64': 1.27.2 - '@bufbuild/buf-win32-x64': 1.27.2 - dev: true - /@bufbuild/buf@1.28.1: resolution: {integrity: sha512-WRDagrf0uBjfV9s5eyrSPJDcdI4A5Q7JMCA4aMrHRR8fo/TTjniDBjJprszhaguqsDkn/LS4QIu92HVFZCrl9A==} engines: {node: '>=12'} @@ -733,70 +779,28 @@ packages: picomatch: 2.3.1 dev: true - /@bufbuild/protobuf@1.4.1: - resolution: {integrity: sha512-4dthhwBGD9nlpY35ic8dMQC5R0dsND2b2xyeVO3qf+hBk8m7Y9dUs+SmMh6rqO2pGLUTKHefGXLDW+z19hBPdQ==} - - /@bufbuild/protobuf@1.4.2: - resolution: {integrity: sha512-JyEH8Z+OD5Sc2opSg86qMHn1EM1Sa+zj/Tc0ovxdwk56ByVNONJSabuCUbLQp+eKN3rWNfrho0X+3SEqEPXIow==} - dev: true - - /@bufbuild/protobuf@1.5.1: - resolution: {integrity: sha512-LX+MeB1AzlbqgJXkq83lilQpLGnPvsAMj7SH8KtJAmQfBc55ee78Stxuff/HMw0xLMYJN3P1FBh5TENgjJof1w==} - - /@bufbuild/protoc-gen-es@1.4.1(@bufbuild/protobuf@1.4.1): - resolution: {integrity: sha512-YPEFzLl/RslDJXZoqI505YutOsYGIz1zGrYTltTrdgk0EZkDSAQfq6/Yu36mPkUSypHEaRSoDlrlcpthIwA19w==} - engines: {node: '>=14'} - hasBin: true - peerDependencies: - '@bufbuild/protobuf': 1.4.1 - peerDependenciesMeta: - '@bufbuild/protobuf': - optional: true - dependencies: - '@bufbuild/protobuf': 1.4.1 - '@bufbuild/protoplugin': 1.4.1 - transitivePeerDependencies: - - supports-color - dev: true + /@bufbuild/protobuf@1.6.0: + resolution: {integrity: sha512-hp19vSFgNw3wBBcVBx5qo5pufCqjaJ0Cfk5H/pfjNOfNWU+4/w0QVOmfAOZNRrNWRrVuaJWxcN8P2vhOkkzbBQ==} - /@bufbuild/protoc-gen-es@1.5.1(@bufbuild/protobuf@1.5.1): - resolution: {integrity: sha512-o4NNOf49QEjowhpQxm3fq/yv+LstO9aMmNlEE3fz4WlD5fBE8OZ7q38O+WMUVoB4Y41joxk24v7IIm61trwRyg==} + /@bufbuild/protoc-gen-es@1.6.0(@bufbuild/protobuf@1.6.0): + resolution: {integrity: sha512-m0akOPWeD5UBfGdZyudrbnmdjI8l/ZHlP8TyEIcj7qMCR4kh68tMtGvrjRzj5ynIpavrr6G7P06XP9F9f2MDRw==} engines: {node: '>=14'} hasBin: true peerDependencies: - '@bufbuild/protobuf': 1.5.1 + '@bufbuild/protobuf': 1.6.0 peerDependenciesMeta: '@bufbuild/protobuf': optional: true dependencies: - '@bufbuild/protobuf': 1.5.1 - '@bufbuild/protoplugin': 1.5.1 + '@bufbuild/protobuf': 1.6.0 + '@bufbuild/protoplugin': 1.6.0 transitivePeerDependencies: - supports-color - /@bufbuild/protoplugin@1.4.1: - resolution: {integrity: sha512-URC4/O5MsM94W7ed8NJMw1mUaFAKr5y0B67PMjhBdhVcDi6p8be76wz9+xW6/B6dMzlO+SpnicFYc9fEhLcQIw==} + /@bufbuild/protoplugin@1.6.0: + resolution: {integrity: sha512-o53ZsvojHQkAPoC9v5sJifY2OfXdRU8DO3QpPoJ+QuvYcfB9Zb3DZkNMQRyfEbF4TVYiaQ0mZzZl1mESDdyCxA==} dependencies: - '@bufbuild/protobuf': 1.4.1 - '@typescript/vfs': 1.5.0 - typescript: 4.5.2 - transitivePeerDependencies: - - supports-color - - /@bufbuild/protoplugin@1.4.2: - resolution: {integrity: sha512-5IwGC1ZRD2A+KydGXeaSOErwfILLqVtvMH/RkN+cOoHcQd4EYXFStcF7g7aR+yICRDEEjQVi5tQF/qPGBSr9vg==} - dependencies: - '@bufbuild/protobuf': 1.4.2 - '@typescript/vfs': 1.5.0 - typescript: 4.5.2 - transitivePeerDependencies: - - supports-color - dev: true - - /@bufbuild/protoplugin@1.5.1: - resolution: {integrity: sha512-4qQD3UIEXflPYCEPZxyvi9yoQiX3ONWgLw24uLJrw9AnbY7Pw1xT5v8yIMXIVccBEZNSpvIF6qD/JXfIapjRtw==} - dependencies: - '@bufbuild/protobuf': 1.5.1 + '@bufbuild/protobuf': 1.6.0 '@typescript/vfs': 1.5.0 typescript: 4.5.2 transitivePeerDependencies: @@ -809,52 +813,23 @@ packages: dev: true optional: true - /@connectrpc/connect-web@1.1.4(@bufbuild/protobuf@1.5.1)(@connectrpc/connect@1.1.4): + /@connectrpc/connect-web@1.1.4(@bufbuild/protobuf@1.6.0)(@connectrpc/connect@1.1.4): resolution: {integrity: sha512-y/CHMipRSpIIR1PCax536PquyuZ03soGTgO1gqQM4pv8lCCgAKE1S+OrirIbpyohJiUszxaRH69PoB8uACiOZA==} peerDependencies: '@bufbuild/protobuf': ^1.4.2 '@connectrpc/connect': 1.1.4 dependencies: - '@bufbuild/protobuf': 1.5.1 - '@connectrpc/connect': 1.1.4(@bufbuild/protobuf@1.5.1) - - /@connectrpc/connect@1.1.3(@bufbuild/protobuf@1.4.1): - resolution: {integrity: sha512-AXkbsLQe2Nm7VuoN5nqp05GEb9mPa/f5oFzDqTbHME4i8TghTrlY03uefbhuAq4wjsnfDnmuxHZvn6ndlgXmbg==} - peerDependencies: - '@bufbuild/protobuf': ^1.3.3 - dependencies: - '@bufbuild/protobuf': 1.4.1 - dev: true + '@bufbuild/protobuf': 1.6.0 + '@connectrpc/connect': 1.1.4(@bufbuild/protobuf@1.6.0) - /@connectrpc/connect@1.1.4(@bufbuild/protobuf@1.5.1): + /@connectrpc/connect@1.1.4(@bufbuild/protobuf@1.6.0): resolution: {integrity: sha512-kFiOi3jsEyOuL4gGW55LgNCqQBNA0Z/GLXrfeJO4r6pI/f8L9rqnjrFZTCeyrvzu1TuqEtL51cR+c46KMCposw==} peerDependencies: '@bufbuild/protobuf': ^1.4.2 dependencies: - '@bufbuild/protobuf': 1.5.1 - - /@connectrpc/protoc-gen-connect-es@1.1.3(@bufbuild/protoc-gen-es@1.4.1)(@connectrpc/connect@1.1.3): - resolution: {integrity: sha512-Irt1WM1o45KL0DNz8D8nraNfRrOyZfn7rzRsOyfrwbNzeVO1JV3rELFpARqGAvtVveYBoO9uwYtQ8TKLXsnrng==} - engines: {node: '>=16.0.0'} - hasBin: true - peerDependencies: - '@bufbuild/protoc-gen-es': ^1.3.3 - '@connectrpc/connect': 1.1.3 - peerDependenciesMeta: - '@bufbuild/protoc-gen-es': - optional: true - '@connectrpc/connect': - optional: true - dependencies: - '@bufbuild/protobuf': 1.5.1 - '@bufbuild/protoc-gen-es': 1.4.1(@bufbuild/protobuf@1.4.1) - '@bufbuild/protoplugin': 1.4.2 - '@connectrpc/connect': 1.1.3(@bufbuild/protobuf@1.4.1) - transitivePeerDependencies: - - supports-color - dev: true + '@bufbuild/protobuf': 1.6.0 - /@connectrpc/protoc-gen-connect-es@1.1.4(@bufbuild/protoc-gen-es@1.5.1)(@connectrpc/connect@1.1.4): + /@connectrpc/protoc-gen-connect-es@1.1.4(@bufbuild/protoc-gen-es@1.6.0)(@connectrpc/connect@1.1.4): resolution: {integrity: sha512-q+leRn9Bd1FzEbthN1qWHwYaGYGc84rLXy/hEkDlMCiWrqz2zxb4Ijy37gOMlE8eRfwYRwn08XcEhV+Y/1jlyA==} engines: {node: '>=16.0.0'} hasBin: true @@ -867,10 +842,10 @@ packages: '@connectrpc/connect': optional: true dependencies: - '@bufbuild/protobuf': 1.5.1 - '@bufbuild/protoc-gen-es': 1.5.1(@bufbuild/protobuf@1.5.1) - '@bufbuild/protoplugin': 1.5.1 - '@connectrpc/connect': 1.1.4(@bufbuild/protobuf@1.5.1) + '@bufbuild/protobuf': 1.6.0 + '@bufbuild/protoc-gen-es': 1.6.0(@bufbuild/protobuf@1.6.0) + '@bufbuild/protoplugin': 1.6.0 + '@connectrpc/connect': 1.1.4(@bufbuild/protobuf@1.6.0) transitivePeerDependencies: - supports-color @@ -2562,6 +2537,17 @@ packages: node-releases: 2.0.13 update-browserslist-db: 1.0.13(browserslist@4.22.1) + /browserslist@4.22.2: + resolution: {integrity: sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + dependencies: + caniuse-lite: 1.0.30001570 + electron-to-chromium: 1.4.611 + node-releases: 2.0.14 + update-browserslist-db: 1.0.13(browserslist@4.22.2) + dev: true + /bs-logger@0.2.6: resolution: {integrity: sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==} engines: {node: '>= 6'} @@ -2609,6 +2595,10 @@ packages: /caniuse-lite@1.0.30001546: resolution: {integrity: sha512-zvtSJwuQFpewSyRrI3AsftF6rM0X80mZkChIt1spBGEvRglCrjTniXvinc8JKRoqTwXAgvqTImaN9igfSMtUBw==} + /caniuse-lite@1.0.30001570: + resolution: {integrity: sha512-+3e0ASu4sw1SWaoCtvPeyXp+5PsjigkSt8OXZbF9StH5pQWbxEjLAZE3n8Aup5udop1uRiKA7a4utUk/uoSpUw==} + dev: true + /cardinal@2.1.1: resolution: {integrity: sha512-JSr5eOgoEymtYHBjNWyjrMqet9Am2miJhlfKNdqLp6zoeAh0KN5dRAcxlecj5mAJrmQomgiOBj35xHLrFjqBpw==} hasBin: true @@ -3090,6 +3080,10 @@ packages: /electron-to-chromium@1.4.542: resolution: {integrity: sha512-6+cpa00G09N3sfh2joln4VUXHquWrOFx3FLZqiVQvl45+zS9DskDBTPvob+BhvFRmTBkyDSk0vvLMMRo/qc6mQ==} + /electron-to-chromium@1.4.611: + resolution: {integrity: sha512-ZtRpDxrjHapOwxtv+nuth5ByB8clyn8crVynmRNGO3wG3LOp8RTcyZDqwaI6Ng6y8FCK2hVZmJoqwCskKbNMaw==} + dev: true + /emittery@0.13.1: resolution: {integrity: sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==} engines: {node: '>=12'} @@ -4679,7 +4673,7 @@ packages: whatwg-encoding: 2.0.0 whatwg-mimetype: 3.0.0 whatwg-url: 11.0.0 - ws: 8.14.2 + ws: 8.15.1 xml-name-validator: 4.0.0 transitivePeerDependencies: - bufferutil @@ -4902,6 +4896,10 @@ packages: /node-releases@2.0.13: resolution: {integrity: sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==} + /node-releases@2.0.14: + resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==} + dev: true + /normalize-path@3.0.0: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} @@ -5583,7 +5581,7 @@ packages: typescript: 5.3.3 dev: true - /ts-jest@29.1.1(@babel/core@7.23.5)(jest@29.7.0)(typescript@5.3.3): + /ts-jest@29.1.1(@babel/core@7.23.6)(jest@29.7.0)(typescript@5.3.3): resolution: {integrity: sha512-D6xjnnbP17cC85nliwGiL+tpoKN0StpgE0TeOjXQTU6MVCfsB4v7aW05CgQ/1OywGb0x/oy9hHFnN+sczTiRaA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -5604,7 +5602,7 @@ packages: esbuild: optional: true dependencies: - '@babel/core': 7.23.5 + '@babel/core': 7.23.6 bs-logger: 0.2.6 fast-json-stable-stringify: 2.1.0 jest: 29.7.0(@types/node@20.10.4)(ts-node@10.9.1) @@ -5859,6 +5857,17 @@ packages: escalade: 3.1.1 picocolors: 1.0.0 + /update-browserslist-db@1.0.13(browserslist@4.22.2): + resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==} + hasBin: true + peerDependencies: + browserslist: '>= 4.21.0' + dependencies: + browserslist: 4.22.2 + escalade: 3.1.1 + picocolors: 1.0.0 + dev: true + /uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} dependencies: @@ -6032,8 +6041,8 @@ packages: imurmurhash: 0.1.4 signal-exit: 3.0.7 - /ws@8.14.2: - resolution: {integrity: sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==} + /ws@8.15.1: + resolution: {integrity: sha512-W5OZiCjXEmk0yZ66ZN82beM5Sz7l7coYxpRkzS+p9PP+ToQry8szKh+61eNktr7EA9DOwvFGhfC605jDHbP6QQ==} engines: {node: '>=10.0.0'} peerDependencies: bufferutil: ^4.0.1 From 7ee28208b8a851ba28dcb56ea123582c839d1bb6 Mon Sep 17 00:00:00 2001 From: Paul Sachs <11449728+paul-sachs@users.noreply.github.com> Date: Thu, 14 Dec 2023 09:40:22 -0500 Subject: [PATCH 2/8] Added support for cjs output (#303) Fixes #297 Add support for CommonJS with the new plugin option: ### `js_import_style` By default, [protoc-gen-connect-query](https://www.npmjs.com/package/@connectrpc/protoc-gen-connect-query)(and all other plugins based on [@bufbuild/protoplugin](https://www.npmjs.com/package/@bufbuild/protoplugin)) generate ECMAScript `import` and `export` statements. For use cases where CommonJS is difficult to avoid, this option can be used to generate CommonJS`require()` calls. #### Example buf.gen.yaml ``` version: v1 plugins: - plugin: es out: src/gen opt: js_import_style=legacy_commonjs - plugin: connect-query out: src/gen opt: js_import_style=legacy_commonjs ``` --- .eslintrc.js | 2 +- packages/protoc-gen-connect-query/README.md | 14 + .../protoc-gen-connect-query/package.json | 2 +- .../snapshots/buf.gen.yaml | 32 ++- .../v1/eliza-ElizaService_connectquery.d.ts | 4 +- .../v1/eliza-ElizaService_connectquery.js | 41 +++ .../gen_cjs/connectrpc/eliza/v1/eliza_pb.d.ts | 258 ++++++++++++++++++ .../gen_cjs/connectrpc/eliza/v1/eliza_pb.js | 102 +++++++ .../v1/eliza-ElizaService_connectquery.d.ts | 36 +++ .../v1/eliza-ElizaService_connectquery.js | 5 +- .../gen_js/connectrpc/eliza/v1/eliza_pb.d.ts | 258 ++++++++++++++++++ .../gen_js/connectrpc/eliza/v1/eliza_pb.js | 92 +++++++ .../v1/eliza-ElizaService_connectquery.ts | 4 +- .../connectrpc/eliza/v1/eliza_pb.ts | 0 .../src/generateDts.ts | 24 +- .../src/generateTs.ts | 30 +- 16 files changed, 855 insertions(+), 49 deletions(-) rename packages/protoc-gen-connect-query/snapshots/{gen => gen_cjs}/connectrpc/eliza/v1/eliza-ElizaService_connectquery.d.ts (91%) create mode 100644 packages/protoc-gen-connect-query/snapshots/gen_cjs/connectrpc/eliza/v1/eliza-ElizaService_connectquery.js create mode 100644 packages/protoc-gen-connect-query/snapshots/gen_cjs/connectrpc/eliza/v1/eliza_pb.d.ts create mode 100644 packages/protoc-gen-connect-query/snapshots/gen_cjs/connectrpc/eliza/v1/eliza_pb.js create mode 100644 packages/protoc-gen-connect-query/snapshots/gen_js/connectrpc/eliza/v1/eliza-ElizaService_connectquery.d.ts rename packages/protoc-gen-connect-query/snapshots/{gen => gen_js}/connectrpc/eliza/v1/eliza-ElizaService_connectquery.js (86%) create mode 100644 packages/protoc-gen-connect-query/snapshots/gen_js/connectrpc/eliza/v1/eliza_pb.d.ts create mode 100644 packages/protoc-gen-connect-query/snapshots/gen_js/connectrpc/eliza/v1/eliza_pb.js rename packages/protoc-gen-connect-query/snapshots/{gen => gen_ts}/connectrpc/eliza/v1/eliza-ElizaService_connectquery.ts (91%) rename packages/protoc-gen-connect-query/snapshots/{gen => gen_ts}/connectrpc/eliza/v1/eliza_pb.ts (100%) diff --git a/.eslintrc.js b/.eslintrc.js index b413f81d..3e84b5b3 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -120,7 +120,7 @@ const config = { }, }, { - files: ["**/eliza/*", "**/gen/**"], // generated code + files: ["**/eliza/*", "**/gen/**", "**/snapshots/**"], // generated code rules: { "eslint-comments/no-unused-enable": "off", "eslint-comments/no-unused-disable": "off", diff --git a/packages/protoc-gen-connect-query/README.md b/packages/protoc-gen-connect-query/README.md index 9356311a..bae45729 100644 --- a/packages/protoc-gen-connect-query/README.md +++ b/packages/protoc-gen-connect-query/README.md @@ -198,6 +198,20 @@ Unfortunately, not all bundlers and tools have caught up yet, and Deno requires This option exists for other plugins but is not applicable to `protoc-gen-connect-query` because, unlike most other plugins, it does not generate a maximum of one output file for every input proto file. Instead, it generates one output file per service. If you provide a valid proto file that contains no services, `protoc-gen-connect-query` will have no output. +### `js_import_style` + +By default, [protoc-gen-connect-query](https://www.npmjs.com/package/@connectrpc/protoc-gen-connect-query) +(and all other plugins based on [@bufbuild/protoplugin](https://www.npmjs.com/package/@bufbuild/protoplugin)) +generate ECMAScript `import` and `export` statements. For use cases where +CommonJS is difficult to avoid, this option can be used to generate CommonJS +`require()` calls. + +Possible values: + +- `js_import_style=module` generate ECMAScript `import` / `export` statements - + the default behavior. +- `js_import_style=legacy_commonjs` generate CommonJS `require()` calls. + ## Example Generated Code See [`eliza.proto`](../../examples/react/basic/eliza.proto) for example inputs, and look [here](../../examples/react/basic/src/gen) to see the outputs those files generate. diff --git a/packages/protoc-gen-connect-query/package.json b/packages/protoc-gen-connect-query/package.json index c6cb9db5..e88c6d52 100644 --- a/packages/protoc-gen-connect-query/package.json +++ b/packages/protoc-gen-connect-query/package.json @@ -22,7 +22,7 @@ "clean": "rm -rf dist", "build": "pnpm clean && tsc --project tsconfig.build.json", "format": "prettier . --write --ignore-path ./.eslintignore && eslint . --fix && license-header", - "generate": "rm -rf snapshots/gen && cd snapshots && buf generate buf.build/connectrpc/eliza:8b8b971d6fde4dc8ba5d96f9fda7d53c", + "generate": "rm -rf snapshots/gen* && cd snapshots && buf generate buf.build/connectrpc/eliza:8b8b971d6fde4dc8ba5d96f9fda7d53c", "test": "tsc --declaration --declarationDir .type-dump --emitDeclarationOnly" }, "preferUnplugged": true, diff --git a/packages/protoc-gen-connect-query/snapshots/buf.gen.yaml b/packages/protoc-gen-connect-query/snapshots/buf.gen.yaml index adfcd0a1..877ee203 100644 --- a/packages/protoc-gen-connect-query/snapshots/buf.gen.yaml +++ b/packages/protoc-gen-connect-query/snapshots/buf.gen.yaml @@ -1,16 +1,32 @@ -# buf.gen.yaml defines a local generation template. -# For details, see https://docs.buf.build/configuration/v1/buf-gen-yaml version: v1 plugins: + # js - plugin: es - out: gen + out: gen_js + - plugin: connect-query + path: ../bin/protoc-gen-connect-query + out: gen_js + + # cjs + - plugin: es + out: gen_cjs opt: - - target=ts + - js_import_style=legacy_commonjs + - plugin: connect-query + path: ../bin/protoc-gen-connect-query + out: gen_cjs + opt: + - js_import_style=legacy_commonjs + - ts_nocheck=false # we only set this for our tests + # ts + - plugin: es + out: gen_ts + opt: + - target=ts - plugin: connect-query path: ../bin/protoc-gen-connect-query - out: gen + out: gen_ts opt: - - target=ts+dts+js - - import_extension=none - - ts_nocheck=false + - target=ts + - ts_nocheck=false # we only set this for our tests diff --git a/packages/protoc-gen-connect-query/snapshots/gen/connectrpc/eliza/v1/eliza-ElizaService_connectquery.d.ts b/packages/protoc-gen-connect-query/snapshots/gen_cjs/connectrpc/eliza/v1/eliza-ElizaService_connectquery.d.ts similarity index 91% rename from packages/protoc-gen-connect-query/snapshots/gen/connectrpc/eliza/v1/eliza-ElizaService_connectquery.d.ts rename to packages/protoc-gen-connect-query/snapshots/gen_cjs/connectrpc/eliza/v1/eliza-ElizaService_connectquery.d.ts index b1744888..c68f75ea 100644 --- a/packages/protoc-gen-connect-query/snapshots/gen/connectrpc/eliza/v1/eliza-ElizaService_connectquery.d.ts +++ b/packages/protoc-gen-connect-query/snapshots/gen_cjs/connectrpc/eliza/v1/eliza-ElizaService_connectquery.d.ts @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -// @generated by protoc-gen-connect-query v1.0.0 with parameter "target=ts+dts+js,import_extension=none,ts_nocheck=false" +// @generated by protoc-gen-connect-query v1.0.0 with parameter "js_import_style=legacy_commonjs,ts_nocheck=false" // @generated from file connectrpc/eliza/v1/eliza.proto (package connectrpc.eliza.v1, syntax proto3) /* eslint-disable */ -import { SayRequest, SayResponse } from "./eliza_pb"; +import { SayRequest, SayResponse } from "./eliza_pb.js"; import { MethodKind } from "@bufbuild/protobuf"; /** diff --git a/packages/protoc-gen-connect-query/snapshots/gen_cjs/connectrpc/eliza/v1/eliza-ElizaService_connectquery.js b/packages/protoc-gen-connect-query/snapshots/gen_cjs/connectrpc/eliza/v1/eliza-ElizaService_connectquery.js new file mode 100644 index 00000000..d97cba4d --- /dev/null +++ b/packages/protoc-gen-connect-query/snapshots/gen_cjs/connectrpc/eliza/v1/eliza-ElizaService_connectquery.js @@ -0,0 +1,41 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-connect-query v1.0.0 with parameter "js_import_style=legacy_commonjs,ts_nocheck=false" +// @generated from file connectrpc/eliza/v1/eliza.proto (package connectrpc.eliza.v1, syntax proto3) +/* eslint-disable */ + +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + +const { MethodKind } = require("@bufbuild/protobuf"); +const { SayRequest, SayResponse } = require("./eliza_pb.js"); + +/** + * Say is a unary RPC. Eliza responds to the prompt with a single sentence. + * + * @generated from rpc connectrpc.eliza.v1.ElizaService.Say + */ +const say = { + localName: "say", + name: "Say", + kind: MethodKind.Unary, + I: SayRequest, + O: SayResponse, + service: { + typeName: "connectrpc.eliza.v1.ElizaService", + }, +}; + +exports.say = say; diff --git a/packages/protoc-gen-connect-query/snapshots/gen_cjs/connectrpc/eliza/v1/eliza_pb.d.ts b/packages/protoc-gen-connect-query/snapshots/gen_cjs/connectrpc/eliza/v1/eliza_pb.d.ts new file mode 100644 index 00000000..e65132d1 --- /dev/null +++ b/packages/protoc-gen-connect-query/snapshots/gen_cjs/connectrpc/eliza/v1/eliza_pb.d.ts @@ -0,0 +1,258 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es v1.6.0 with parameter "js_import_style=legacy_commonjs" +// @generated from file connectrpc/eliza/v1/eliza.proto (package connectrpc.eliza.v1, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { + BinaryReadOptions, + FieldList, + JsonReadOptions, + JsonValue, + PartialMessage, + PlainMessage, +} from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; + +/** + * SayRequest is a single-sentence request. + * + * @generated from message connectrpc.eliza.v1.SayRequest + */ +export declare class SayRequest extends Message { + /** + * @generated from field: string sentence = 1; + */ + sentence: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "connectrpc.eliza.v1.SayRequest"; + static readonly fields: FieldList; + + static fromBinary( + bytes: Uint8Array, + options?: Partial, + ): SayRequest; + + static fromJson( + jsonValue: JsonValue, + options?: Partial, + ): SayRequest; + + static fromJsonString( + jsonString: string, + options?: Partial, + ): SayRequest; + + static equals( + a: SayRequest | PlainMessage | undefined, + b: SayRequest | PlainMessage | undefined, + ): boolean; +} + +/** + * SayResponse is a single-sentence response. + * + * @generated from message connectrpc.eliza.v1.SayResponse + */ +export declare class SayResponse extends Message { + /** + * @generated from field: string sentence = 1; + */ + sentence: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "connectrpc.eliza.v1.SayResponse"; + static readonly fields: FieldList; + + static fromBinary( + bytes: Uint8Array, + options?: Partial, + ): SayResponse; + + static fromJson( + jsonValue: JsonValue, + options?: Partial, + ): SayResponse; + + static fromJsonString( + jsonString: string, + options?: Partial, + ): SayResponse; + + static equals( + a: SayResponse | PlainMessage | undefined, + b: SayResponse | PlainMessage | undefined, + ): boolean; +} + +/** + * ConverseRequest is a single sentence request sent as part of a + * back-and-forth conversation. + * + * @generated from message connectrpc.eliza.v1.ConverseRequest + */ +export declare class ConverseRequest extends Message { + /** + * @generated from field: string sentence = 1; + */ + sentence: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "connectrpc.eliza.v1.ConverseRequest"; + static readonly fields: FieldList; + + static fromBinary( + bytes: Uint8Array, + options?: Partial, + ): ConverseRequest; + + static fromJson( + jsonValue: JsonValue, + options?: Partial, + ): ConverseRequest; + + static fromJsonString( + jsonString: string, + options?: Partial, + ): ConverseRequest; + + static equals( + a: ConverseRequest | PlainMessage | undefined, + b: ConverseRequest | PlainMessage | undefined, + ): boolean; +} + +/** + * ConverseResponse is a single sentence response sent in answer to a + * ConverseRequest. + * + * @generated from message connectrpc.eliza.v1.ConverseResponse + */ +export declare class ConverseResponse extends Message { + /** + * @generated from field: string sentence = 1; + */ + sentence: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "connectrpc.eliza.v1.ConverseResponse"; + static readonly fields: FieldList; + + static fromBinary( + bytes: Uint8Array, + options?: Partial, + ): ConverseResponse; + + static fromJson( + jsonValue: JsonValue, + options?: Partial, + ): ConverseResponse; + + static fromJsonString( + jsonString: string, + options?: Partial, + ): ConverseResponse; + + static equals( + a: ConverseResponse | PlainMessage | undefined, + b: ConverseResponse | PlainMessage | undefined, + ): boolean; +} + +/** + * IntroduceRequest asks Eliza to introduce itself to the named user. + * + * @generated from message connectrpc.eliza.v1.IntroduceRequest + */ +export declare class IntroduceRequest extends Message { + /** + * @generated from field: string name = 1; + */ + name: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "connectrpc.eliza.v1.IntroduceRequest"; + static readonly fields: FieldList; + + static fromBinary( + bytes: Uint8Array, + options?: Partial, + ): IntroduceRequest; + + static fromJson( + jsonValue: JsonValue, + options?: Partial, + ): IntroduceRequest; + + static fromJsonString( + jsonString: string, + options?: Partial, + ): IntroduceRequest; + + static equals( + a: IntroduceRequest | PlainMessage | undefined, + b: IntroduceRequest | PlainMessage | undefined, + ): boolean; +} + +/** + * IntroduceResponse is one sentence of Eliza's introductory monologue. + * + * @generated from message connectrpc.eliza.v1.IntroduceResponse + */ +export declare class IntroduceResponse extends Message { + /** + * @generated from field: string sentence = 1; + */ + sentence: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "connectrpc.eliza.v1.IntroduceResponse"; + static readonly fields: FieldList; + + static fromBinary( + bytes: Uint8Array, + options?: Partial, + ): IntroduceResponse; + + static fromJson( + jsonValue: JsonValue, + options?: Partial, + ): IntroduceResponse; + + static fromJsonString( + jsonString: string, + options?: Partial, + ): IntroduceResponse; + + static equals( + a: IntroduceResponse | PlainMessage | undefined, + b: IntroduceResponse | PlainMessage | undefined, + ): boolean; +} diff --git a/packages/protoc-gen-connect-query/snapshots/gen_cjs/connectrpc/eliza/v1/eliza_pb.js b/packages/protoc-gen-connect-query/snapshots/gen_cjs/connectrpc/eliza/v1/eliza_pb.js new file mode 100644 index 00000000..7868a683 --- /dev/null +++ b/packages/protoc-gen-connect-query/snapshots/gen_cjs/connectrpc/eliza/v1/eliza_pb.js @@ -0,0 +1,102 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es v1.6.0 with parameter "js_import_style=legacy_commonjs" +// @generated from file connectrpc/eliza/v1/eliza.proto (package connectrpc.eliza.v1, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + +const { proto3 } = require("@bufbuild/protobuf"); + +/** + * SayRequest is a single-sentence request. + * + * @generated from message connectrpc.eliza.v1.SayRequest + */ +const SayRequest = proto3.makeMessageType( + "connectrpc.eliza.v1.SayRequest", + () => [ + { no: 1, name: "sentence", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * SayResponse is a single-sentence response. + * + * @generated from message connectrpc.eliza.v1.SayResponse + */ +const SayResponse = proto3.makeMessageType( + "connectrpc.eliza.v1.SayResponse", + () => [ + { no: 1, name: "sentence", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * ConverseRequest is a single sentence request sent as part of a + * back-and-forth conversation. + * + * @generated from message connectrpc.eliza.v1.ConverseRequest + */ +const ConverseRequest = proto3.makeMessageType( + "connectrpc.eliza.v1.ConverseRequest", + () => [ + { no: 1, name: "sentence", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * ConverseResponse is a single sentence response sent in answer to a + * ConverseRequest. + * + * @generated from message connectrpc.eliza.v1.ConverseResponse + */ +const ConverseResponse = proto3.makeMessageType( + "connectrpc.eliza.v1.ConverseResponse", + () => [ + { no: 1, name: "sentence", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * IntroduceRequest asks Eliza to introduce itself to the named user. + * + * @generated from message connectrpc.eliza.v1.IntroduceRequest + */ +const IntroduceRequest = proto3.makeMessageType( + "connectrpc.eliza.v1.IntroduceRequest", + () => [{ no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }], +); + +/** + * IntroduceResponse is one sentence of Eliza's introductory monologue. + * + * @generated from message connectrpc.eliza.v1.IntroduceResponse + */ +const IntroduceResponse = proto3.makeMessageType( + "connectrpc.eliza.v1.IntroduceResponse", + () => [ + { no: 1, name: "sentence", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +exports.SayRequest = SayRequest; +exports.SayResponse = SayResponse; +exports.ConverseRequest = ConverseRequest; +exports.ConverseResponse = ConverseResponse; +exports.IntroduceRequest = IntroduceRequest; +exports.IntroduceResponse = IntroduceResponse; diff --git a/packages/protoc-gen-connect-query/snapshots/gen_js/connectrpc/eliza/v1/eliza-ElizaService_connectquery.d.ts b/packages/protoc-gen-connect-query/snapshots/gen_js/connectrpc/eliza/v1/eliza-ElizaService_connectquery.d.ts new file mode 100644 index 00000000..6d6c7488 --- /dev/null +++ b/packages/protoc-gen-connect-query/snapshots/gen_js/connectrpc/eliza/v1/eliza-ElizaService_connectquery.d.ts @@ -0,0 +1,36 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-connect-query v1.0.0 +// @generated from file connectrpc/eliza/v1/eliza.proto (package connectrpc.eliza.v1, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { SayRequest, SayResponse } from "./eliza_pb.js"; +import { MethodKind } from "@bufbuild/protobuf"; + +/** + * Say is a unary RPC. Eliza responds to the prompt with a single sentence. + * + * @generated from rpc connectrpc.eliza.v1.ElizaService.Say + */ +export const say: { + readonly name: "Say"; + readonly I: typeof SayRequest; + readonly O: typeof SayResponse; + readonly kind: MethodKind.Unary; + readonly service: { + readonly typeName: "connectrpc.eliza.v1.ElizaService"; + }; +}; diff --git a/packages/protoc-gen-connect-query/snapshots/gen/connectrpc/eliza/v1/eliza-ElizaService_connectquery.js b/packages/protoc-gen-connect-query/snapshots/gen_js/connectrpc/eliza/v1/eliza-ElizaService_connectquery.js similarity index 86% rename from packages/protoc-gen-connect-query/snapshots/gen/connectrpc/eliza/v1/eliza-ElizaService_connectquery.js rename to packages/protoc-gen-connect-query/snapshots/gen_js/connectrpc/eliza/v1/eliza-ElizaService_connectquery.js index 26ea32b0..706a7ca2 100644 --- a/packages/protoc-gen-connect-query/snapshots/gen/connectrpc/eliza/v1/eliza-ElizaService_connectquery.js +++ b/packages/protoc-gen-connect-query/snapshots/gen_js/connectrpc/eliza/v1/eliza-ElizaService_connectquery.js @@ -12,12 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -// @generated by protoc-gen-connect-query v1.0.0 with parameter "target=ts+dts+js,import_extension=none,ts_nocheck=false" +// @generated by protoc-gen-connect-query v1.0.0 // @generated from file connectrpc/eliza/v1/eliza.proto (package connectrpc.eliza.v1, syntax proto3) /* eslint-disable */ +// @ts-nocheck import { MethodKind } from "@bufbuild/protobuf"; -import { SayRequest, SayResponse } from "./eliza_pb"; +import { SayRequest, SayResponse } from "./eliza_pb.js"; /** * Say is a unary RPC. Eliza responds to the prompt with a single sentence. diff --git a/packages/protoc-gen-connect-query/snapshots/gen_js/connectrpc/eliza/v1/eliza_pb.d.ts b/packages/protoc-gen-connect-query/snapshots/gen_js/connectrpc/eliza/v1/eliza_pb.d.ts new file mode 100644 index 00000000..01a14fe5 --- /dev/null +++ b/packages/protoc-gen-connect-query/snapshots/gen_js/connectrpc/eliza/v1/eliza_pb.d.ts @@ -0,0 +1,258 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es v1.6.0 +// @generated from file connectrpc/eliza/v1/eliza.proto (package connectrpc.eliza.v1, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { + BinaryReadOptions, + FieldList, + JsonReadOptions, + JsonValue, + PartialMessage, + PlainMessage, +} from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; + +/** + * SayRequest is a single-sentence request. + * + * @generated from message connectrpc.eliza.v1.SayRequest + */ +export declare class SayRequest extends Message { + /** + * @generated from field: string sentence = 1; + */ + sentence: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "connectrpc.eliza.v1.SayRequest"; + static readonly fields: FieldList; + + static fromBinary( + bytes: Uint8Array, + options?: Partial, + ): SayRequest; + + static fromJson( + jsonValue: JsonValue, + options?: Partial, + ): SayRequest; + + static fromJsonString( + jsonString: string, + options?: Partial, + ): SayRequest; + + static equals( + a: SayRequest | PlainMessage | undefined, + b: SayRequest | PlainMessage | undefined, + ): boolean; +} + +/** + * SayResponse is a single-sentence response. + * + * @generated from message connectrpc.eliza.v1.SayResponse + */ +export declare class SayResponse extends Message { + /** + * @generated from field: string sentence = 1; + */ + sentence: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "connectrpc.eliza.v1.SayResponse"; + static readonly fields: FieldList; + + static fromBinary( + bytes: Uint8Array, + options?: Partial, + ): SayResponse; + + static fromJson( + jsonValue: JsonValue, + options?: Partial, + ): SayResponse; + + static fromJsonString( + jsonString: string, + options?: Partial, + ): SayResponse; + + static equals( + a: SayResponse | PlainMessage | undefined, + b: SayResponse | PlainMessage | undefined, + ): boolean; +} + +/** + * ConverseRequest is a single sentence request sent as part of a + * back-and-forth conversation. + * + * @generated from message connectrpc.eliza.v1.ConverseRequest + */ +export declare class ConverseRequest extends Message { + /** + * @generated from field: string sentence = 1; + */ + sentence: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "connectrpc.eliza.v1.ConverseRequest"; + static readonly fields: FieldList; + + static fromBinary( + bytes: Uint8Array, + options?: Partial, + ): ConverseRequest; + + static fromJson( + jsonValue: JsonValue, + options?: Partial, + ): ConverseRequest; + + static fromJsonString( + jsonString: string, + options?: Partial, + ): ConverseRequest; + + static equals( + a: ConverseRequest | PlainMessage | undefined, + b: ConverseRequest | PlainMessage | undefined, + ): boolean; +} + +/** + * ConverseResponse is a single sentence response sent in answer to a + * ConverseRequest. + * + * @generated from message connectrpc.eliza.v1.ConverseResponse + */ +export declare class ConverseResponse extends Message { + /** + * @generated from field: string sentence = 1; + */ + sentence: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "connectrpc.eliza.v1.ConverseResponse"; + static readonly fields: FieldList; + + static fromBinary( + bytes: Uint8Array, + options?: Partial, + ): ConverseResponse; + + static fromJson( + jsonValue: JsonValue, + options?: Partial, + ): ConverseResponse; + + static fromJsonString( + jsonString: string, + options?: Partial, + ): ConverseResponse; + + static equals( + a: ConverseResponse | PlainMessage | undefined, + b: ConverseResponse | PlainMessage | undefined, + ): boolean; +} + +/** + * IntroduceRequest asks Eliza to introduce itself to the named user. + * + * @generated from message connectrpc.eliza.v1.IntroduceRequest + */ +export declare class IntroduceRequest extends Message { + /** + * @generated from field: string name = 1; + */ + name: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "connectrpc.eliza.v1.IntroduceRequest"; + static readonly fields: FieldList; + + static fromBinary( + bytes: Uint8Array, + options?: Partial, + ): IntroduceRequest; + + static fromJson( + jsonValue: JsonValue, + options?: Partial, + ): IntroduceRequest; + + static fromJsonString( + jsonString: string, + options?: Partial, + ): IntroduceRequest; + + static equals( + a: IntroduceRequest | PlainMessage | undefined, + b: IntroduceRequest | PlainMessage | undefined, + ): boolean; +} + +/** + * IntroduceResponse is one sentence of Eliza's introductory monologue. + * + * @generated from message connectrpc.eliza.v1.IntroduceResponse + */ +export declare class IntroduceResponse extends Message { + /** + * @generated from field: string sentence = 1; + */ + sentence: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "connectrpc.eliza.v1.IntroduceResponse"; + static readonly fields: FieldList; + + static fromBinary( + bytes: Uint8Array, + options?: Partial, + ): IntroduceResponse; + + static fromJson( + jsonValue: JsonValue, + options?: Partial, + ): IntroduceResponse; + + static fromJsonString( + jsonString: string, + options?: Partial, + ): IntroduceResponse; + + static equals( + a: IntroduceResponse | PlainMessage | undefined, + b: IntroduceResponse | PlainMessage | undefined, + ): boolean; +} diff --git a/packages/protoc-gen-connect-query/snapshots/gen_js/connectrpc/eliza/v1/eliza_pb.js b/packages/protoc-gen-connect-query/snapshots/gen_js/connectrpc/eliza/v1/eliza_pb.js new file mode 100644 index 00000000..99779ba3 --- /dev/null +++ b/packages/protoc-gen-connect-query/snapshots/gen_js/connectrpc/eliza/v1/eliza_pb.js @@ -0,0 +1,92 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es v1.6.0 +// @generated from file connectrpc/eliza/v1/eliza.proto (package connectrpc.eliza.v1, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { proto3 } from "@bufbuild/protobuf"; + +/** + * SayRequest is a single-sentence request. + * + * @generated from message connectrpc.eliza.v1.SayRequest + */ +export const SayRequest = proto3.makeMessageType( + "connectrpc.eliza.v1.SayRequest", + () => [ + { no: 1, name: "sentence", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * SayResponse is a single-sentence response. + * + * @generated from message connectrpc.eliza.v1.SayResponse + */ +export const SayResponse = proto3.makeMessageType( + "connectrpc.eliza.v1.SayResponse", + () => [ + { no: 1, name: "sentence", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * ConverseRequest is a single sentence request sent as part of a + * back-and-forth conversation. + * + * @generated from message connectrpc.eliza.v1.ConverseRequest + */ +export const ConverseRequest = proto3.makeMessageType( + "connectrpc.eliza.v1.ConverseRequest", + () => [ + { no: 1, name: "sentence", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * ConverseResponse is a single sentence response sent in answer to a + * ConverseRequest. + * + * @generated from message connectrpc.eliza.v1.ConverseResponse + */ +export const ConverseResponse = proto3.makeMessageType( + "connectrpc.eliza.v1.ConverseResponse", + () => [ + { no: 1, name: "sentence", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * IntroduceRequest asks Eliza to introduce itself to the named user. + * + * @generated from message connectrpc.eliza.v1.IntroduceRequest + */ +export const IntroduceRequest = proto3.makeMessageType( + "connectrpc.eliza.v1.IntroduceRequest", + () => [{ no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }], +); + +/** + * IntroduceResponse is one sentence of Eliza's introductory monologue. + * + * @generated from message connectrpc.eliza.v1.IntroduceResponse + */ +export const IntroduceResponse = proto3.makeMessageType( + "connectrpc.eliza.v1.IntroduceResponse", + () => [ + { no: 1, name: "sentence", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); diff --git a/packages/protoc-gen-connect-query/snapshots/gen/connectrpc/eliza/v1/eliza-ElizaService_connectquery.ts b/packages/protoc-gen-connect-query/snapshots/gen_ts/connectrpc/eliza/v1/eliza-ElizaService_connectquery.ts similarity index 91% rename from packages/protoc-gen-connect-query/snapshots/gen/connectrpc/eliza/v1/eliza-ElizaService_connectquery.ts rename to packages/protoc-gen-connect-query/snapshots/gen_ts/connectrpc/eliza/v1/eliza-ElizaService_connectquery.ts index 001109fb..f6ea0628 100644 --- a/packages/protoc-gen-connect-query/snapshots/gen/connectrpc/eliza/v1/eliza-ElizaService_connectquery.ts +++ b/packages/protoc-gen-connect-query/snapshots/gen_ts/connectrpc/eliza/v1/eliza-ElizaService_connectquery.ts @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -// @generated by protoc-gen-connect-query v1.0.0 with parameter "target=ts+dts+js,import_extension=none,ts_nocheck=false" +// @generated by protoc-gen-connect-query v1.0.0 with parameter "target=ts,ts_nocheck=false" // @generated from file connectrpc/eliza/v1/eliza.proto (package connectrpc.eliza.v1, syntax proto3) /* eslint-disable */ import { MethodKind } from "@bufbuild/protobuf"; -import { SayRequest, SayResponse } from "./eliza_pb"; +import { SayRequest, SayResponse } from "./eliza_pb.js"; /** * Say is a unary RPC. Eliza responds to the prompt with a single sentence. diff --git a/packages/protoc-gen-connect-query/snapshots/gen/connectrpc/eliza/v1/eliza_pb.ts b/packages/protoc-gen-connect-query/snapshots/gen_ts/connectrpc/eliza/v1/eliza_pb.ts similarity index 100% rename from packages/protoc-gen-connect-query/snapshots/gen/connectrpc/eliza/v1/eliza_pb.ts rename to packages/protoc-gen-connect-query/snapshots/gen_ts/connectrpc/eliza/v1/eliza_pb.ts diff --git a/packages/protoc-gen-connect-query/src/generateDts.ts b/packages/protoc-gen-connect-query/src/generateDts.ts index 3694f75d..92038b3c 100644 --- a/packages/protoc-gen-connect-query/src/generateDts.ts +++ b/packages/protoc-gen-connect-query/src/generateDts.ts @@ -14,12 +14,8 @@ import type { DescFile, DescService } from "@bufbuild/protobuf"; import { codegenInfo, MethodIdempotency, MethodKind } from "@bufbuild/protobuf"; -import type { Schema } from "@bufbuild/protoplugin"; -import { - literalString, - localName, - makeJsDoc, -} from "@bufbuild/protoplugin/ecmascript"; +import type { Schema } from "@bufbuild/protoplugin/ecmascript"; +import { localName } from "@bufbuild/protoplugin/ecmascript"; import type { PluginInit } from "./utils.js"; @@ -43,22 +39,18 @@ const generateServiceFile = switch (method.methodKind) { case MethodKind.Unary: { - f.print(makeJsDoc(method)); - f.print( - `export const `, - safeIdentifier(localName(method)), - `: {` - ); - f.print(` readonly name: `, literalString(method.name), `,`); + f.print(f.jsDoc(method)); + f.print(f.exportDecl("const", safeIdentifier(localName(method))), ": {"); + f.print(" readonly name: ", f.string(method.name), ","); f.print(" readonly I: typeof ", method.input, ","); f.print(" readonly O: typeof ", method.output, ","); f.print(" readonly kind: ", rtMethodKind, ".", MethodKind[method.methodKind], ","); if (method.idempotency !== undefined) { f.print(" readonly idempotency: ", rtMethodIdempotency, ".", MethodIdempotency[method.idempotency], ","); } - f.print(` readonly service: {`); - f.print(` readonly typeName: ${literalString(service.typeName)}`); - f.print(` }`); + f.print(" readonly service: {"); + f.print(" readonly typeName: ", f.string(service.typeName)); + f.print(" }"); f.print("};") } break; diff --git a/packages/protoc-gen-connect-query/src/generateTs.ts b/packages/protoc-gen-connect-query/src/generateTs.ts index aba5fb44..b28baeb3 100644 --- a/packages/protoc-gen-connect-query/src/generateTs.ts +++ b/packages/protoc-gen-connect-query/src/generateTs.ts @@ -14,12 +14,8 @@ import type { DescFile, DescService } from "@bufbuild/protobuf"; import { codegenInfo, MethodIdempotency, MethodKind } from "@bufbuild/protobuf"; -import type { Schema } from "@bufbuild/protoplugin"; -import { - literalString, - localName, - makeJsDoc, -} from "@bufbuild/protoplugin/ecmascript"; +import type { Schema } from "@bufbuild/protoplugin/ecmascript"; +import { localName } from "@bufbuild/protoplugin/ecmascript"; import type { PluginInit } from "./utils.js"; @@ -46,20 +42,20 @@ const generateServiceFile = service.methods .filter((method) => method.methodKind === MethodKind.Unary) .forEach((method, index, filteredMethods) => { - f.print(makeJsDoc(method)); - f.print(`export const ${safeIdentifier(localName(method))} = { `); - f.print(` localName: ${literalString(localName(method))},`); - f.print(` name: ${literalString(method.name)},`); - f.print(` kind: `, rtMethodKind, ".", MethodKind[method.methodKind], ","); - f.print(` I: `, method.input, `,`); - f.print(` O: `, method.output, `,`); + f.print(f.jsDoc(method)); + f.print(f.exportDecl("const", safeIdentifier(localName(method))), " = {"); + f.print(" localName: ",f.string(localName(method)), ","); + f.print(" name: ", f.string(method.name), ","); + f.print(" kind: ", rtMethodKind, ".", MethodKind[method.methodKind], ","); + f.print(" I: ", method.input, ","); + f.print(" O: ", method.output, ","); if (method.idempotency !== undefined) { f.print(" idempotency: ", rtMethodIdempotency, ".", MethodIdempotency[method.idempotency], ","); } - f.print(` service: {`); - f.print(` typeName: ${literalString(service.typeName)}`); - f.print(` }`); - f.print(`}`, isTs ? ` as const` : ``, `;`); + f.print(" service: {"); + f.print(" typeName: ", f.string(service.typeName)); + f.print(" }"); + f.print("}", isTs ? " as const" : "", ";"); const lastIndex = index === filteredMethods.length - 1; if (!lastIndex) { From 0f083628a95b2ba4dc924a3d813802bead6d2898 Mon Sep 17 00:00:00 2001 From: Paul Sachs <11449728+paul-sachs@users.noreply.github.com> Date: Thu, 14 Dec 2023 11:21:34 -0500 Subject: [PATCH 3/8] Cleanup post-v1 release (#295) Just removing some left over references to `connect-react-query` and some broken links. --- assets/connect-query_dependency_graph.excalidraw | 4 ++-- examples/react/basic/src/example.tsx | 2 +- packages/connect-query/README.md | 2 +- packages/connect-query/src/connect-query-key.ts | 6 +++--- packages/connect-query/src/jest/test-utils.tsx | 2 +- packages/connect-query/src/use-transport.tsx | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/assets/connect-query_dependency_graph.excalidraw b/assets/connect-query_dependency_graph.excalidraw index bd3120d3..6997568d 100644 --- a/assets/connect-query_dependency_graph.excalidraw +++ b/assets/connect-query_dependency_graph.excalidraw @@ -1027,12 +1027,12 @@ "locked": false, "fontSize": 20, "fontFamily": 3, - "text": "Connect-React-Query", + "text": "Connect-Query", "baseline": 19, "textAlign": "center", "verticalAlign": "middle", "containerId": "NLMbxwdPMz1O8gu8ku7cT", - "originalText": "Connect-React-Query" + "originalText": "Connect-Query" }, { "type": "rectangle", diff --git a/examples/react/basic/src/example.tsx b/examples/react/basic/src/example.tsx index b12aa0cd..44008e7f 100644 --- a/examples/react/basic/src/example.tsx +++ b/examples/react/basic/src/example.tsx @@ -21,7 +21,7 @@ import { Indicator, Indicators } from "./indicator"; import { Page } from "./page"; /** - * This example demonstrates a basic usage of Connect-React-Query with `useQuery` + * This example demonstrates a basic usage of Connect-Query with `useQuery` */ export const Example: FC = () => { const { status, fetchStatus, error, data } = useQuery(say); diff --git a/packages/connect-query/README.md b/packages/connect-query/README.md index 9ff8ddac..f2a8702c 100644 --- a/packages/connect-query/README.md +++ b/packages/connect-query/README.md @@ -4,4 +4,4 @@ This is the runtime library package for Connect-Query. You'll find its code gene Connect-Query is a wrapper around [TanStack Query](https://tanstack.com/query) (react-query), written in TypeScript and thoroughly tested. It enables effortless communication with servers that speak the [Connect Protocol](https://connectrpc.com/docs/protocol). -To get started, head over to the [docs](https://connectrpc.com/docs/query/getting-started) for a tutorial, or take a look at [our examples](https://github.com/connectrpc/connect-query-es/examples) for integration with various frameworks. +To get started, head over to the [docs](https://github.com/connectrpc/connect-query-es) for a tutorial, or take a look at [our examples](https://github.com/connectrpc/connect-query-es/examples) for integration with various frameworks. diff --git a/packages/connect-query/src/connect-query-key.ts b/packages/connect-query/src/connect-query-key.ts index 963af5ee..3e48fcee 100644 --- a/packages/connect-query/src/connect-query-key.ts +++ b/packages/connect-query/src/connect-query-key.ts @@ -21,7 +21,7 @@ import { disableQuery } from "./utils.js"; /** * TanStack Query requires query keys in order to decide when the query should automatically update. * - * `QueryKey`s in TanStack Query are usually arbitrary, but Connect-React-Query uses the approach of creating a query key that begins with the least specific information: the service's `typeName`, followed by the method name, and ending with the most specific information to identify a particular request: the input message itself. + * `QueryKey`s in TanStack Query are usually arbitrary, but Connect-Query uses the approach of creating a query key that begins with the least specific information: the service's `typeName`, followed by the method name, and ending with the most specific information to identify a particular request: the input message itself. * * For example, for a query key might look like this: * @@ -41,9 +41,9 @@ export type ConnectQueryKey> = [ /** * TanStack Query requires query keys in order to decide when the query should automatically update. * - * In Connect-React-Query, much of this is handled automatically by this function. + * In Connect-Query, much of this is handled automatically by this function. * - * @see ConnectQueryKey for information on the components of Connect-React-Query's keys. + * @see ConnectQueryKey for information on the components of Connect-Query's keys. */ export function createConnectQueryKey< I extends Message, diff --git a/packages/connect-query/src/jest/test-utils.tsx b/packages/connect-query/src/jest/test-utils.tsx index 417083d1..02dc6e38 100644 --- a/packages/connect-query/src/jest/test-utils.tsx +++ b/packages/connect-query/src/jest/test-utils.tsx @@ -30,7 +30,7 @@ import { CountResponse, SayResponse } from "../gen/eliza_pb"; import { TransportProvider } from "../use-transport"; /** - * A utils wrapper that supplies Tanstack Query's `QueryClientProvider` as well as Connect-React-Query's `TransportProvider`. + * A utils wrapper that supplies Tanstack Query's `QueryClientProvider` as well as Connect-Query's `TransportProvider`. */ export const wrapper = ( config?: QueryClientConfig, diff --git a/packages/connect-query/src/use-transport.tsx b/packages/connect-query/src/use-transport.tsx index 6b3e5361..c0a713f3 100644 --- a/packages/connect-query/src/use-transport.tsx +++ b/packages/connect-query/src/use-transport.tsx @@ -38,7 +38,7 @@ const transportContext = createContext(fallbackTransport); export const useTransport = () => useContext(transportContext); /** - * `TransportProvider` is the main mechanism by which Connect-React-Query keeps track of the `Transport` used by your application. + * `TransportProvider` is the main mechanism by which Connect-Query keeps track of the `Transport` used by your application. * * Broadly speaking, "transport" joins two concepts: * @@ -49,7 +49,7 @@ export const useTransport = () => useContext(transportContext); * * To learn more about the two modes of transport, take a look at the npm package `@connectrpc/connect-web`. * - * To get started with Connect-React-Query, simply import a transport (either `createConnectTransport` or `createGrpcWebTransport` from `@connectrpc/connect-web`) and pass it to the provider. + * To get started with Connect-Query, simply import a transport (either `createConnectTransport` or `createGrpcWebTransport` from `@connectrpc/connect-web`) and pass it to the provider. * * @example * import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; From f9506e28de66a8dcd5178e293243069177d26827 Mon Sep 17 00:00:00 2001 From: Paul Sachs <11449728+paul-sachs@users.noreply.github.com> Date: Thu, 14 Dec 2023 11:22:12 -0500 Subject: [PATCH 4/8] Update README.md (#300) Remove references to no longer existing api. --- README.md | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index c9a8859c..7739a798 100644 --- a/README.md +++ b/README.md @@ -402,11 +402,11 @@ No. The code generator just generates the method descriptors, but you are free t ### What if I have a custom `Transport`? -If the `Transport` attached to React Context via the `TransportProvider` isn't working for you, then you can override transport at every level. For example, you can pass a custom transport directly to the lowest-level API like `useQuery` or `createUseQueryOptions`. +If the `Transport` attached to React Context via the `TransportProvider` isn't working for you, then you can override transport at every level. For example, you can pass a custom transport directly to the lowest-level API like `useQuery` or `callUnaryMethod`. ### Does this only work with React? -Connect-Query does require React, but the core (`createUseQueryOptions`) is not React specific so splitting off a `connect-solid-query` is possible. +Connect-Query does require React, but the core (`createConnectQueryKey` and `callUnaryMethod`) is not React specific so splitting off a `connect-solid-query` is possible. ### How do I do Prefetching? @@ -416,15 +416,11 @@ When you might not have access to React context, you can use the `create` series import { say } from "./gen/eliza-ElizaService_connectquery"; function prefetch() { - return queryClient.prefetchQuery( - createUseQueryOptions( - say, - { sentence: "Hello" }, - { - transport: myTransport, - }, - ), - ); + return queryClient.prefetchQuery({ + queryKey: createConnectQueryKey(say, { sentence: "Hello" }), + queryFn: () => + callUnaryMethod(say, { sentence: "Hello" }, { transport: myTransport }), + }); } ``` From 998e03fb53b141921a26b5dd6b41882083f8b311 Mon Sep 17 00:00:00 2001 From: Paul Sachs <11449728+paul-sachs@users.noreply.github.com> Date: Thu, 14 Dec 2023 11:22:33 -0500 Subject: [PATCH 5/8] Missed adding .js to a few files (#307) Fixes #298 (again) Missed another file. All these will automatically be caught once #186 is merged. --- packages/connect-query/src/use-infinite-query.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/connect-query/src/use-infinite-query.ts b/packages/connect-query/src/use-infinite-query.ts index 084ce430..7b0140fe 100644 --- a/packages/connect-query/src/use-infinite-query.ts +++ b/packages/connect-query/src/use-infinite-query.ts @@ -27,8 +27,8 @@ import { import type { CreateInfiniteQueryOptions, CreateSuspenseInfiniteQueryOptions, -} from "./create-use-infinite-query-options"; -import { createUseInfiniteQueryOptions } from "./create-use-infinite-query-options"; +} from "./create-use-infinite-query-options.js"; +import { createUseInfiniteQueryOptions } from "./create-use-infinite-query-options.js"; import type { MethodUnaryDescriptor } from "./method-unary-descriptor.js"; import { useTransport } from "./use-transport.js"; import type { DisableQuery } from "./utils.js"; From 3b26f474fd06fd6064dab7f7b62b043b788b7441 Mon Sep 17 00:00:00 2001 From: Paul Sachs <11449728+paul-sachs@users.noreply.github.com> Date: Thu, 14 Dec 2023 11:24:44 -0500 Subject: [PATCH 6/8] Loosen peer dependency requirement (#306) Fixes #305 We don't need such a restrictive peer dependency. Anything in 5.x will do. --- packages/connect-query/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/connect-query/package.json b/packages/connect-query/package.json index 8b546646..0453074c 100644 --- a/packages/connect-query/package.json +++ b/packages/connect-query/package.json @@ -52,7 +52,7 @@ "peerDependencies": { "@bufbuild/protobuf": "^1.3.3", "@connectrpc/connect": "^1.1.2", - "@tanstack/react-query": "^5.4.3", + "@tanstack/react-query": "5.x", "react": "^18.2.0", "react-dom": "^18.2.0" }, From 270cb4417f1c6d488cda715fe7a5b8e964a3e2f3 Mon Sep 17 00:00:00 2001 From: Paul Sachs <11449728+paul-sachs@users.noreply.github.com> Date: Thu, 14 Dec 2023 12:41:59 -0500 Subject: [PATCH 7/8] Add missing ToC item (#309) Add missing ToC item --- packages/protoc-gen-connect-query/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/protoc-gen-connect-query/README.md b/packages/protoc-gen-connect-query/README.md index bae45729..ee880497 100644 --- a/packages/protoc-gen-connect-query/README.md +++ b/packages/protoc-gen-connect-query/README.md @@ -13,6 +13,7 @@ - [`target`](#target) - [`import_extension=.js`](#import_extensionjs) - [`keep_empty_files=true`](#keep_empty_filestrue) + - [`js_import_style`](#js_import_style) - [Example Generated Code](#example-generated-code) The code generator for Connect-Query, a expansion pack for [TanStack Query](https://tanstack.com/query) (react-query), that enables effortless communication with servers that speak the [Connect Protocol](https://connectrpc.com/docs/protocol). From 02fde5c982a2b365b4da48306cad746676d1fee2 Mon Sep 17 00:00:00 2001 From: Paul Sachs <11449728+paul-sachs@users.noreply.github.com> Date: Thu, 14 Dec 2023 13:01:45 -0500 Subject: [PATCH 8/8] Release 1.1.0 (#308) ## What's Changed * Update imports to include file extensions by @paul-sachs in https://github.com/connectrpc/connect-query-es/pull/299 and https://github.com/connectrpc/connect-query-es/pull/307 * Added support for cjs output by @paul-sachs in https://github.com/connectrpc/connect-query-es/pull/303 * Loosen peer dependency requirement by @paul-sachs in https://github.com/connectrpc/connect-query-es/pull/306 ## CJS output By default, [protoc-gen-connect-query](https://www.npmjs.com/package/@connectrpc/protoc-gen-connect-query) (and all other plugins based on [@bufbuild/protoplugin](https://www.npmjs.com/package/@bufbuild/protoplugin)) generate ECMAScript `import` and `export` statements. For use cases where CommonJS is difficult to avoid, a new plugin option has been added named `js_import_style` which can be used to generate CommonJS `require()` calls. Here is an example [buf.gen.yaml](https://buf.build/docs/configuration/v1/buf-gen-yaml): ```yaml version: v1 plugins: # You'll need @bufbuild/protoc-gen-es v1.6.0 or later - plugin: es out: src/gen opt: js_import_style=legacy_commonjs - plugin: protoc-gen-connect-query out: src/gen opt: js_import_style=legacy_commonjs ``` To view the full PR, see **Added support for cjs output** by @paul-sachs in https://github.com/connectrpc/connect-query-es/pull/303 **Full Changelog**: https://github.com/connectrpc/connect-query-es/compare/v1.0.0...v1.1.0 --- .../react/basic/src/gen/eliza-BigIntService_connectquery.ts | 2 +- examples/react/basic/src/gen/eliza-ElizaService_connectquery.ts | 2 +- examples/react/basic/src/gen/eliza-Haberdasher_connectquery.ts | 2 +- .../react/basic/src/gen/eliza-PaginatedService_connectquery.ts | 2 +- .../react/basic/src/gen/eliza-SecondService_connectquery.ts | 2 +- examples/react/basic/src/gen/eliza-Slouch_connectquery.ts | 2 +- packages/connect-query/package.json | 2 +- packages/protoc-gen-connect-query/package.json | 2 +- .../connectrpc/eliza/v1/eliza-ElizaService_connectquery.d.ts | 2 +- .../connectrpc/eliza/v1/eliza-ElizaService_connectquery.js | 2 +- .../connectrpc/eliza/v1/eliza-ElizaService_connectquery.d.ts | 2 +- .../connectrpc/eliza/v1/eliza-ElizaService_connectquery.js | 2 +- .../connectrpc/eliza/v1/eliza-ElizaService_connectquery.ts | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/examples/react/basic/src/gen/eliza-BigIntService_connectquery.ts b/examples/react/basic/src/gen/eliza-BigIntService_connectquery.ts index 34754692..c670d073 100644 --- a/examples/react/basic/src/gen/eliza-BigIntService_connectquery.ts +++ b/examples/react/basic/src/gen/eliza-BigIntService_connectquery.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// @generated by protoc-gen-connect-query v1.0.0 with parameter "target=ts,import_extension=none,ts_nocheck=false" +// @generated by protoc-gen-connect-query v1.1.0 with parameter "target=ts,import_extension=none,ts_nocheck=false" // @generated from file eliza.proto (package connectrpc.eliza.v1, syntax proto3) /* eslint-disable */ diff --git a/examples/react/basic/src/gen/eliza-ElizaService_connectquery.ts b/examples/react/basic/src/gen/eliza-ElizaService_connectquery.ts index b56dad26..605d6c7f 100644 --- a/examples/react/basic/src/gen/eliza-ElizaService_connectquery.ts +++ b/examples/react/basic/src/gen/eliza-ElizaService_connectquery.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// @generated by protoc-gen-connect-query v1.0.0 with parameter "target=ts,import_extension=none,ts_nocheck=false" +// @generated by protoc-gen-connect-query v1.1.0 with parameter "target=ts,import_extension=none,ts_nocheck=false" // @generated from file eliza.proto (package connectrpc.eliza.v1, syntax proto3) /* eslint-disable */ diff --git a/examples/react/basic/src/gen/eliza-Haberdasher_connectquery.ts b/examples/react/basic/src/gen/eliza-Haberdasher_connectquery.ts index c56abb90..27ea34e3 100644 --- a/examples/react/basic/src/gen/eliza-Haberdasher_connectquery.ts +++ b/examples/react/basic/src/gen/eliza-Haberdasher_connectquery.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// @generated by protoc-gen-connect-query v1.0.0 with parameter "target=ts,import_extension=none,ts_nocheck=false" +// @generated by protoc-gen-connect-query v1.1.0 with parameter "target=ts,import_extension=none,ts_nocheck=false" // @generated from file eliza.proto (package connectrpc.eliza.v1, syntax proto3) /* eslint-disable */ diff --git a/examples/react/basic/src/gen/eliza-PaginatedService_connectquery.ts b/examples/react/basic/src/gen/eliza-PaginatedService_connectquery.ts index d6155d24..f44f00ad 100644 --- a/examples/react/basic/src/gen/eliza-PaginatedService_connectquery.ts +++ b/examples/react/basic/src/gen/eliza-PaginatedService_connectquery.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// @generated by protoc-gen-connect-query v1.0.0 with parameter "target=ts,import_extension=none,ts_nocheck=false" +// @generated by protoc-gen-connect-query v1.1.0 with parameter "target=ts,import_extension=none,ts_nocheck=false" // @generated from file eliza.proto (package connectrpc.eliza.v1, syntax proto3) /* eslint-disable */ diff --git a/examples/react/basic/src/gen/eliza-SecondService_connectquery.ts b/examples/react/basic/src/gen/eliza-SecondService_connectquery.ts index 1e36d5cc..d3b590d4 100644 --- a/examples/react/basic/src/gen/eliza-SecondService_connectquery.ts +++ b/examples/react/basic/src/gen/eliza-SecondService_connectquery.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// @generated by protoc-gen-connect-query v1.0.0 with parameter "target=ts,import_extension=none,ts_nocheck=false" +// @generated by protoc-gen-connect-query v1.1.0 with parameter "target=ts,import_extension=none,ts_nocheck=false" // @generated from file eliza.proto (package connectrpc.eliza.v1, syntax proto3) /* eslint-disable */ diff --git a/examples/react/basic/src/gen/eliza-Slouch_connectquery.ts b/examples/react/basic/src/gen/eliza-Slouch_connectquery.ts index 6fafdef3..c60172e8 100644 --- a/examples/react/basic/src/gen/eliza-Slouch_connectquery.ts +++ b/examples/react/basic/src/gen/eliza-Slouch_connectquery.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// @generated by protoc-gen-connect-query v1.0.0 with parameter "target=ts,import_extension=none,ts_nocheck=false" +// @generated by protoc-gen-connect-query v1.1.0 with parameter "target=ts,import_extension=none,ts_nocheck=false" // @generated from file eliza.proto (package connectrpc.eliza.v1, syntax proto3) /* eslint-disable */ diff --git a/packages/connect-query/package.json b/packages/connect-query/package.json index 0453074c..293ff916 100644 --- a/packages/connect-query/package.json +++ b/packages/connect-query/package.json @@ -1,6 +1,6 @@ { "name": "@connectrpc/connect-query", - "version": "1.0.0", + "version": "1.1.0", "description": "TypeScript-first expansion pack for TanStack Query that gives you Protobuf superpowers.", "license": "Apache-2.0", "repository": { diff --git a/packages/protoc-gen-connect-query/package.json b/packages/protoc-gen-connect-query/package.json index e88c6d52..01f5bec8 100644 --- a/packages/protoc-gen-connect-query/package.json +++ b/packages/protoc-gen-connect-query/package.json @@ -1,6 +1,6 @@ { "name": "@connectrpc/protoc-gen-connect-query", - "version": "1.0.0", + "version": "1.1.0", "description": "Code generator for connect-query", "license": "Apache-2.0", "sideEffects": false, diff --git a/packages/protoc-gen-connect-query/snapshots/gen_cjs/connectrpc/eliza/v1/eliza-ElizaService_connectquery.d.ts b/packages/protoc-gen-connect-query/snapshots/gen_cjs/connectrpc/eliza/v1/eliza-ElizaService_connectquery.d.ts index c68f75ea..2a11e9f6 100644 --- a/packages/protoc-gen-connect-query/snapshots/gen_cjs/connectrpc/eliza/v1/eliza-ElizaService_connectquery.d.ts +++ b/packages/protoc-gen-connect-query/snapshots/gen_cjs/connectrpc/eliza/v1/eliza-ElizaService_connectquery.d.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// @generated by protoc-gen-connect-query v1.0.0 with parameter "js_import_style=legacy_commonjs,ts_nocheck=false" +// @generated by protoc-gen-connect-query v1.1.0 with parameter "js_import_style=legacy_commonjs,ts_nocheck=false" // @generated from file connectrpc/eliza/v1/eliza.proto (package connectrpc.eliza.v1, syntax proto3) /* eslint-disable */ diff --git a/packages/protoc-gen-connect-query/snapshots/gen_cjs/connectrpc/eliza/v1/eliza-ElizaService_connectquery.js b/packages/protoc-gen-connect-query/snapshots/gen_cjs/connectrpc/eliza/v1/eliza-ElizaService_connectquery.js index d97cba4d..a5758386 100644 --- a/packages/protoc-gen-connect-query/snapshots/gen_cjs/connectrpc/eliza/v1/eliza-ElizaService_connectquery.js +++ b/packages/protoc-gen-connect-query/snapshots/gen_cjs/connectrpc/eliza/v1/eliza-ElizaService_connectquery.js @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// @generated by protoc-gen-connect-query v1.0.0 with parameter "js_import_style=legacy_commonjs,ts_nocheck=false" +// @generated by protoc-gen-connect-query v1.1.0 with parameter "js_import_style=legacy_commonjs,ts_nocheck=false" // @generated from file connectrpc/eliza/v1/eliza.proto (package connectrpc.eliza.v1, syntax proto3) /* eslint-disable */ diff --git a/packages/protoc-gen-connect-query/snapshots/gen_js/connectrpc/eliza/v1/eliza-ElizaService_connectquery.d.ts b/packages/protoc-gen-connect-query/snapshots/gen_js/connectrpc/eliza/v1/eliza-ElizaService_connectquery.d.ts index 6d6c7488..18834365 100644 --- a/packages/protoc-gen-connect-query/snapshots/gen_js/connectrpc/eliza/v1/eliza-ElizaService_connectquery.d.ts +++ b/packages/protoc-gen-connect-query/snapshots/gen_js/connectrpc/eliza/v1/eliza-ElizaService_connectquery.d.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// @generated by protoc-gen-connect-query v1.0.0 +// @generated by protoc-gen-connect-query v1.1.0 // @generated from file connectrpc/eliza/v1/eliza.proto (package connectrpc.eliza.v1, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/packages/protoc-gen-connect-query/snapshots/gen_js/connectrpc/eliza/v1/eliza-ElizaService_connectquery.js b/packages/protoc-gen-connect-query/snapshots/gen_js/connectrpc/eliza/v1/eliza-ElizaService_connectquery.js index 706a7ca2..b0a70b3a 100644 --- a/packages/protoc-gen-connect-query/snapshots/gen_js/connectrpc/eliza/v1/eliza-ElizaService_connectquery.js +++ b/packages/protoc-gen-connect-query/snapshots/gen_js/connectrpc/eliza/v1/eliza-ElizaService_connectquery.js @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// @generated by protoc-gen-connect-query v1.0.0 +// @generated by protoc-gen-connect-query v1.1.0 // @generated from file connectrpc/eliza/v1/eliza.proto (package connectrpc.eliza.v1, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/packages/protoc-gen-connect-query/snapshots/gen_ts/connectrpc/eliza/v1/eliza-ElizaService_connectquery.ts b/packages/protoc-gen-connect-query/snapshots/gen_ts/connectrpc/eliza/v1/eliza-ElizaService_connectquery.ts index f6ea0628..5c35d429 100644 --- a/packages/protoc-gen-connect-query/snapshots/gen_ts/connectrpc/eliza/v1/eliza-ElizaService_connectquery.ts +++ b/packages/protoc-gen-connect-query/snapshots/gen_ts/connectrpc/eliza/v1/eliza-ElizaService_connectquery.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// @generated by protoc-gen-connect-query v1.0.0 with parameter "target=ts,ts_nocheck=false" +// @generated by protoc-gen-connect-query v1.1.0 with parameter "target=ts,ts_nocheck=false" // @generated from file connectrpc/eliza/v1/eliza.proto (package connectrpc.eliza.v1, syntax proto3) /* eslint-disable */