This repository was archived by the owner on Nov 18, 2025. It is now read-only.
fix: bytes field should be typed as a Buffer#1652
Merged
sofisl merged 5 commits intogoogleapis:mainfrom Feb 5, 2025
Merged
Conversation
Contributor
|
This looks good to me, but ideally we'd run this test (or something like it) to confirm our downstream repos won't break with this change. If you have time @alvarowolfx, it would be awesome if we could run this test as part of changes to compileProtos! I'd be happy to pair with you if you want to add this test. Otherwise we can always just release an experimental version of gapic-tools and install it locally to confirm it doesn't break anything downstream. |
sofisl
approved these changes
Feb 5, 2025
Closed
gcf-merge-on-green bot
pushed a commit
that referenced
this pull request
Mar 6, 2025
🤖 I have created a release *beep* *boop* --- ## [1.0.0](https://togithub.com/googleapis/gax-nodejs/compare/gapic-tools-v0.4.6...gapic-tools-v1.0.0) (2025-03-05) ### ⚠ BREAKING CHANGES * migrate gax to Node 18 ([#1699](https://togithub.com/googleapis/gax-nodejs/issues/1699)) ### Bug Fixes * bytes field should be typed as a Buffer ([#1652](https://togithub.com/googleapis/gax-nodejs/issues/1652)) ([a81663f](https://togithub.com/googleapis/gax-nodejs/commit/a81663fcdf69a42ee6335c78355b9c8cb11d6064)) * protobuf export path in compileProtos ([#1708](https://togithub.com/googleapis/gax-nodejs/issues/1708)) ([113ca18](https://togithub.com/googleapis/gax-nodejs/commit/113ca18d98f7915c5af05a893d0314744e3d15e1)) ### Miscellaneous Chores * migrate gax to Node 18 ([#1699](https://togithub.com/googleapis/gax-nodejs/issues/1699)) ([fc3eeaa](https://togithub.com/googleapis/gax-nodejs/commit/fc3eeaa574e171c445e0768b06df4ed087bf1f67)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
protobufjs uses the
$util.newBufferfunction to decode and initializebytesprotobuf fields. This makes so that most of times I see those fields coming asBuffers, notUint8Arrayorstring. This was already observed by other users as you can see here and here.This PR adds the
Buffertype to the Typescript definition to take that into account.Related issues/references:
Towards googleapis/nodejs-bigquery-storage#335 and internal b/277340507
Supersedes googleapis/nodejs-bigquery-storage#336