Skip to content

Fix TypeScript protobuf resolution - #474

Closed
stephanos wants to merge 2 commits into
mainfrom
fix-typescript-protobufjs-resolution
Closed

Fix TypeScript protobuf resolution#474
stephanos wants to merge 2 commits into
mainfrom
fix-typescript-protobufjs-resolution

Conversation

@stephanos

@stephanos stephanos commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • bump github.com/temporalio/features to the commit from Bump protobufjs pnpm override 7.5.1 → ^8.7.1 features#892
  • declare protobufjs as a direct dependency of generated TypeScript workers
  • move the configured TypeScript SDK baseline from 1.22.0 to 1.23.0 and synchronize nested worker dependencies
  • ensure generated protobuf types and the Temporal TypeScript SDK 1.23 converter resolve the same protobufjs module instance

Why

The TypeScript kitchen-sink job began resolving SDK 1.23.0, whose protobuf JSON converter requires protobufjs 8. The old features override forced protobufjs 7.5.1, causing Cannot find module 'protobufjs/ext/protojson'. After lifting that override, OMES generated code still resolved protobufjs from the parent source package while the SDK converter resolved it from the generated pnpm package; the two module instances have distinct Type classes and failed with type must be a Type.

Declaring protobufjs in the generated package keeps both sides on the same pnpm module instance. Aligning OMES's configured TypeScript worker baseline with 1.23.0 avoids exercising that protobufjs 8 package with the incompatible 1.22 SDK, and committing the synchronized worker manifests keeps the dependency freshness check clean.

Merge order

  1. Bump protobufjs pnpm override 7.5.1 → ^8.7.1 features#892
  2. this PR
  3. Run kitchen sink SDK tests in isolated namespaces #462

Testing

  • SDK=typescript go test -v -race ./loadgen -run TestKitchenSink -count=1
  • go test -race ./internal/workerctl
  • npm --prefix workers/typescript run typecheck
  • npm --prefix workers/typescript run lint-ci
  • mise run sync-sdk (verified idempotent)
  • git diff --check

},
MoreDependencies: map[string]string{
"@grpc/proto-loader": "^0.8.0",
"protobufjs": "^8.7.1",

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fails without this.

@stephanos stephanos closed this Sep 7, 2026
@stephanos

Copy link
Copy Markdown
Collaborator Author

Closed in favor of #475

@stephanos
stephanos deleted the fix-typescript-protobufjs-resolution branch September 7, 2026 20:20
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.

1 participant