Skip to content

Upgrade dependencies#514

Open
jhump wants to merge 11 commits into
mainfrom
jh/dep-upgrades
Open

Upgrade dependencies#514
jhump wants to merge 11 commits into
mainfrom
jh/dep-upgrades

Conversation

@jhump

@jhump jhump commented Jun 15, 2026

Copy link
Copy Markdown
Member

I had Claude tackle all of the incompatibilities with new dependencies that are blocking the 11 outstanding depend-a-bot PRs. It made short work of them, even including the upgrade to @bufbuild/protobuf and @connectrpc/connect v2.

Resolves #353, #354, and #355.

jhump and others added 11 commits June 15, 2026 12:44
protobuf-es v2 no longer generates message classes: messages are plain
objects and operations are top-level functions that take a generated schema
descriptor. connect-es v2 drops its own code generator, so service
descriptors now come from protoc-gen-es output.

- Bump @bufbuild/protobuf, protoplugin and protoc-gen-es to v2, @connectrpc/*
  to v2, and the @buf knit SDK to its v2 build. Drop protoc-gen-connect-es and
  the connectrpc_es SDK.
- Rewrite protoc-gen-knit-ts against the protoplugin v2 API (descriptor
  reflection, importShape/import, getOption for custom options).
- Regenerate the knit-test-spec fixtures and remove the _connect files.
- Migrate the client and gateway runtime to the v2 reflection and
  serialization APIs. Replace the gateway's Schema message augmentation with
  internal types, since v2 messages are type aliases and can no longer be
  augmented via declaration merging.
- Bump TypeScript to v6, which protobuf-es v2's typings require.
Rename the turbo.json `pipeline` key to `tasks`, as required by turbo 2.
Bump jest to v30 and ts-jest to 29.4.x. ts-jest's ESM mode now requires an
ES module kind, so override `module` for ts-jest in the knit jest config
(the shared tsconfig targets CommonJS for the published build).
ESLint 9+ requires the flat config format, so migrate the shared
eslint-config-custom package and the per-package configs from eslintrc to
flat config, and move from @typescript-eslint v6 to the typescript-eslint v8
meta-package.

- Rewrite eslint-config-custom as a flat config array (@eslint/js,
  typescript-eslint recommendedTypeChecked, turbo, prettier, and the notice
  license-header rule). The legacy eslint-plugin-notice is shimmed with
  @eslint/compat for ESLint 10.
- Replace each package's .eslintrc with eslint.config.mjs.
- Preserve the existing rule set. Two options are tuned to match the prior
  effective behavior (switch-exhaustiveness-check's default-clause handling),
  and rules new to v8 that were not previously enforced are left off.
- Drop now-redundant type assertions that the upgraded rules flag.
- Exclude the generated buf/ directory from prettier, matching spec/.
Update @eslint/js and globals to their latest versions.
Move @buf/bufbuild_knit.bufbuild_es to the 20250213 commit. The only proto
delta from the previous pin is an added go_package file option, so the
generated TypeScript and runtime behavior are unchanged.
These rules are part of typescript-eslint v8's recommendedTypeChecked preset.
prefer-promise-reject-errors surfaced no issues. only-throw-error flagged the
throws of KnitError, which is intentionally a structured domain type (it is
also returned as an embedded value under the `@catch` error strategy, so it is
deliberately not an Error subclass); allow it explicitly rather than disabling
the rule.
The protoc-gen-knit-ts README still showed v1 buf.gen.yaml templates and the
old dotted import_extension values. Update the examples to the v2 buf.gen.yaml
format (remote:/local: plugins) and the v2 option values (import_extension=js,
import_extension=ts). The client/query/result docs were unaffected.
- Correct the JSON.stringify typo in the client examples.
- Fix the protoc invocation flags to --knit-ts_out / --knit-ts_opt.
- Correct the relations example to import buf/knit/v1alpha1/options.proto and
  reference the buf.knit.v1alpha1.relation option.
- Point the knit package license link at this repository.
protobuf-es v2 provides DescMethodUnary and DescMethodServerStreaming, so the
custom mapped type is no longer needed. Inline the method-name filter on the
service options using those types and drop the standalone export (and its
type-level test).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for protobuf 2.2.2

2 participants