Skip to content

chore: bump sdk-core and protobufjs#2011

Merged
mjameswh merged 2 commits intomainfrom
tssdk-protobufjs-tags
Apr 17, 2026
Merged

chore: bump sdk-core and protobufjs#2011
mjameswh merged 2 commits intomainfrom
tssdk-protobufjs-tags

Conversation

@mjameswh
Copy link
Copy Markdown
Contributor

@mjameswh mjameswh commented Apr 16, 2026

What changed

  • Bump sdk-core submodule to 18615a (note that this is NOT latest commit)
  • Bump protobufjs to 7.5.5
  • Fix a protobufjs' bug that was causing parse failure on latest Cloud Ops API drop due to addition of protoc-gen-openapiv2 annotations, which protobufjs doesn't support. The fix is implemented using PNPM's patch feature over protobufjs@7.5.4. An upstream ticket will be filed to request a proper fix, but this should be a reasonable solution until then.
  • Fix @temporalio/proto's "runtime root patching" script to make it compatible with protobufjs 7.5.2+ (fix [Bug] Protobuf Payload Converter is broken after upgrading to protobufjs 7.5.2 #1717). See details below.

Details on the protobufjs@7.5.2 incompatibility

  • protobufjs@7.5.2 added a fast-path cache in Namespace#lookup() that accesses this.root._fullyQualifiedObjects.
  • The root accessor is defined as a non-enumerable getter on ReflectionObject.prototype, so it is not copied by for...in loops.
  • When the patched root is imported via import * as proto from '@temporalio/proto', TypeScript's __importStar helper wraps the CJS module in a plain object by iterating own enumerable properties with for...in + hasOwnProperty.
  • Because root is non-enumerable, it is skipped, the wrapper's root is undefined, and any subsequent this.root._fullyQualifiedObjects access crashes.
  • Solution is to define root as an own enumerable getter ensures __importStar includes it in the wrapper, so that wrapper.root delegates back to the patched root (which has the proper _fullyQualifiedObjects map and full prototype chain).

@mjameswh mjameswh requested a review from a team as a code owner April 16, 2026 02:17
Copy link
Copy Markdown
Member

@chris-olszewski chris-olszewski left a comment

Choose a reason for hiding this comment

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

What was the reasoning behind the core commit choice?

Base automatically changed from tssdk-dont-import-proto-in-workflow to main April 16, 2026 15:36
@mjameswh mjameswh enabled auto-merge (squash) April 17, 2026 03:14
@mjameswh mjameswh force-pushed the tssdk-protobufjs-tags branch from 65c8dd6 to b5776f1 Compare April 17, 2026 03:32
@mjameswh mjameswh merged commit 3bd30c3 into main Apr 17, 2026
49 of 52 checks passed
@mjameswh mjameswh deleted the tssdk-protobufjs-tags branch April 17, 2026 06:19
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.

[Bug] Protobuf Payload Converter is broken after upgrading to protobufjs 7.5.2

3 participants