Skip to content

chore(proto)!: bump protobufjs to v8 and protobufjs-cli to v2 - #2303

Open
mjameswh wants to merge 6 commits into
mainfrom
bump-protobufjs
Open

chore(proto)!: bump protobufjs to v8 and protobufjs-cli to v2#2303
mjameswh wants to merge 6 commits into
mainfrom
bump-protobufjs

Conversation

@mjameswh

@mjameswh mjameswh commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Upgrades protobufjs 7.6.4 -> 8.7.1 and protobufjs-cli 1.x -> 2.6.1.

This major version bump resolves multiple issues we had previously, allowing cleaning up various workarounds from our code base:

  • Drop our local pnpm patch on protobufjs. The parser bug has been fixed upstream (fix: Parse aggregate objects in option arrays protobufjs/protobuf.js#2379).
  • proto3-json-serializer is replaced by protobufjs/ext/protojson. proto3-json-serializer has no protobufjs 8 support and no prospect of it.
  • protobufjs's extension is spec-compliant out of the box, removing the need for fixPayloads, fixBuffers, and the Buffer global shimming inside the sandbox.
  • replaceBuffers had to stay, but is now skipped outright if Buffer is absent (e.g. in the Workflow sandbox).
  • The webpack fs shim for protobufjs is gone, since v8's src/util/fs.js uses require(/* webpackIgnore: true */ "fs"). That comment only takes effect with module.parser.javascript.commonjsMagicComments, which is now enabled in the bundler.
  • protobufjs now properly defines its dependency to long, so injection of that dependency (in protos/root.js) goes away.

This has some visible consequences on generated protobuf types, which are exposed as part of @temporalio/proto. See details in CHANGELOG.md.

@mjameswh
mjameswh requested review from a team as code owners August 10, 2026 16:12
mjameswh and others added 4 commits August 10, 2026 13:36
…decode too

The breaking change entry framed the omission of default-valued fields as a
ProtoJSON concern, but protobufjs 8 also stops materializing them when decoding
binary payloads and in fromObject. What changes is own-property enumeration —
Object.keys, spreads and deep equality — rather than reading the field, which
still yields the default.
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.
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