Update protobufjs from v5 to v7#21
Merged
stefanrammo merged 1 commit intomainfrom Nov 28, 2025
Merged
Conversation
API changes required for v7: - loadProto().build() -> parse().root.lookupType()/lookupEnum().values - new Type() -> Type.create() - .toArrayBuffer() -> .encode().finish() - .decode(buf) -> .decode(new Uint8Array(buf)) - snake_case -> camelCase field names (automatic in v7) - ByteBuffer -> Uint8Array for bytes fields Behavior change for empty bytes handling: - Check hello.challenge && hello.challenge.length because v7 returns empty Uint8Array (truthy) for unset bytes fields instead of null
Karmo7
reviewed
Nov 27, 2025
| crypto.subtle.digest('SHA-256', credentials.buffer) | ||
| .then(function(digest) { | ||
| var colon = new Int8Array([':'.charCodeAt(0)]); | ||
| var buffer = obj.appendBuffer(obj.appendBuffer(challenge.buffer.slice(challenge.offset, challenge.limit), colon.buffer), digest); |
Contributor
There was a problem hiding this comment.
The slicing is not needed anymore?
Collaborator
Author
There was a problem hiding this comment.
The slice was needed in v5 for ByteBuffer. In v7 protobufjs the bytes are just the challenge payload as Uint8Array. ByteBuffer was removed in protobufjs v6 as a dependency.
Karmo7
approved these changes
Nov 27, 2025
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.
API changes required for v7:
Behavior change for empty bytes handling: