Repository navigation
docs(storage): document apiResponse.data breaking change in v9.0.0 - #9892
Open
thiyaguk09 wants to merge 3 commits into
Open
thiyaguk09 wants to merge 3 commits into
thiyaguk09 wants to merge 3 commits into
Conversation
Update MIGRATION.md and JSDoc comments across @google-cloud/storage to clarify that methods passing the HTTP response through directly (such as Bucket#getFiles, Storage#getBuckets, Storage#getHmacKeys, Bucket#getNotifications, and File#copy) now return the full GaxiosResponse object with JSON payload properties (e.g., prefixes, nextPageToken, items) nested under apiResponse.data. Fixes googleapis#9869
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the migration guide and JSDoc comments across multiple files to document a breaking change in v9.0.0, where apiResponse now returns the full HTTP response object with payload properties nested under apiResponse.data. The review feedback identifies a critical runtime TypeError in a bucket.ts code example where a constant array is reassigned, suggesting mutating it with push instead. Additionally, it recommends correcting a non-standard lowercase array type in the JSDoc for channel.ts to Promise<[object]> for better type precision and consistency.
…Channel#stop JSDoc
thiyaguk09
marked this pull request as ready for review
November 19, 2026 05:52
This branch has not been deployed
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.
Description
Documents that v9.0.0 nests JSON payload fields under
apiResponse.data.Impact
Prevents silent
undefinedlookups onapiResponse.prefixesandapiResponse.nextPageToken.Changes
handwritten/storage/MIGRATION.md:GaxiosResponseHTTP response object rather than just the parsed JSON body, with payload fields (prefixes,nextPageToken,items) nested underapiResponse.data.handwritten/storage/src/bucket.ts:Bucket#getFilesandBucket#getFilesStreamJSDocs,delimiteroption docs,@returnstags, and code examples to useapiResponse.data.prefixesandapiResponse.data.Bucket#getNotifications,Bucket#createChannel,Bucket#createNotification,Bucket#delete, andBucket#getMetadataJSDocs.handwritten/storage/src/storage.ts:Storage#getBuckets,Storage#getHmacKeys, andStorage#getServiceAccount@typedef,@callback,@returns, and@exampleJSDocs.handwritten/storage/src/file.tsand remainingsrc/modules (acl.ts,channel.ts,hmacKey.ts,iam.ts,notification.ts,nodejs-common/service-object.ts):File#copyand other direct response pass-through methods to state that payload properties are nested underapiResponse.data.Testing
npm run lintinhandwritten/storagewith zero lint errors.npm run docsinhandwritten/storageand verified generated JSDoc HTML output.npm run compileinhandwritten/storageto verify CommonJS and ESM builds succeed.Fixes #9869