[HOLD] Bump protobufjs to v8 and drop proto3-json-serializer - #863
Open
mjameswh wants to merge 4 commits into
Open
[HOLD] Bump protobufjs to v8 and drop proto3-json-serializer#863mjameswh wants to merge 4 commits into
mjameswh wants to merge 4 commits into
Conversation
The two protobuf data converter features build their expectation with
DataBlob.create({ encodingType: ENCODING_TYPE_UNSPECIFIED, ... }), which sets an
enum to its zero value, and then deepEqual it against a decoded message.
protobufjs 7 materialized proto3 implicit-presence fields holding their default
value as own properties when decoding; protobufjs 8 leaves them absent. Since
deepEqual compares own properties, the expectation fails against any SDK built
on protobufjs 8.
Compare against an expectation that has itself been through the wire, so the two
sides have the same shape under either version.
The TS SDK is moving to protobufjs 8, and its CHANGELOG documents the same upgrade as a requirement for applications that use the Protobuf payload converters with their own message definitions. Our e2e tests should model what we ask users to do, so json_protobuf now parses ProtoJSON with protobufjs/ext/protojson instead of proto3-json-serializer. The pnpm override pinning protobufjs 7.5.1 (#625) worked around temporalio/sdk-typescript#1717, which protobufjs 8 fixes upstream, so it goes away rather than being bumped. It was never needed to keep a single protobufjs instance either: the generated program maps every bare specifier to its own node_modules through tsconfig-paths, which is what lets protojson's `instanceof Type` check hold across the SDK under test.
mjameswh
added a commit
to temporalio/sdk-typescript
that referenced
this pull request
Aug 10, 2026
The features suite on main still uses proto3-json-serializer and pins protobufjs 7, which is incompatible with this change. Point the job at temporalio/features#863 until that PR merges, then revert this.
Both protobuf data converter features reached into the Node realm to overwrite a global inside the workflow sandbox: binary_protobuf replaced Uint8Array, and json_protobuf replaced Buffer. They date back to #286 and reference an unnamed SDK bug around how `bytes` fields cross the sandbox boundary. The SDK now normalizes protobufjs's `Buffer` allocations to `Uint8Array` when decoding, so neither injection is needed; both features pass without them.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Warning
Do not merge before the TypeScript SDK release carrying the protobufjs v8 upgrade is published.
Summary
protobufjsto v8 and drop proto3-json-serializer