chore(proto)!: bump protobufjs to v8 and protobufjs-cli to v2 - #2303
Open
mjameswh wants to merge 6 commits into
Open
chore(proto)!: bump protobufjs to v8 and protobufjs-cli to v2#2303mjameswh wants to merge 6 commits into
mjameswh wants to merge 6 commits into
Conversation
…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.
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.
Summary
Upgrades
protobufjs7.6.4 -> 8.7.1 andprotobufjs-cli1.x -> 2.6.1.This major version bump resolves multiple issues we had previously, allowing cleaning up various workarounds from our code base:
protobufjs. The parser bug has been fixed upstream (fix: Parse aggregate objects in option arrays protobufjs/protobuf.js#2379).proto3-json-serializeris replaced byprotobufjs/ext/protojson.proto3-json-serializerhas noprotobufjs8 support and no prospect of it.protobufjs's extension is spec-compliant out of the box, removing the need forfixPayloads,fixBuffers, and theBufferglobal shimming inside the sandbox.replaceBuffershad to stay, but is now skipped outright ifBufferis absent (e.g. in the Workflow sandbox).fsshim forprotobufjsis gone, since v8'ssrc/util/fs.jsusesrequire(/* webpackIgnore: true */ "fs"). That comment only takes effect withmodule.parser.javascript.commonjsMagicComments, which is now enabled in the bundler.protobufjsnow properly defines its dependency tolong, so injection of that dependency (inprotos/root.js) goes away.This has some visible consequences on generated protobuf types, which are exposed as part of
@temporalio/proto. See details inCHANGELOG.md.