storage 9.0.0: getFiles apiResponse is now the HTTP response, so the documented apiResponse.prefixes is undefined
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- node.js, typescript
- 領域
- api
調査の方向性
Start in handwritten/storage, where Bucket#getFiles and the other listing methods pass the HTTP response through as apiResponse; the JSDoc in src/bucket.ts (compiled to build/cjs/src/bucket.js) and MIGRATION.md describe the old shape. Reproduce by listing a bucket with delimiter '/' and checking whether the body sits at apiResponse or apiResponse.data. Done means either the body is restored to apiResponse for these methods, or the JSDoc and MIGRATION.md state that body fields are under apiResponse.data. The maintainers have not chosen between the two, so confirm the direction before writing code.
索引モデルが issue の本文から書いたものです。
説明
Package: @google-cloud/storage (handwritten/storage)
Environment
- @google-cloud/storage 9.0.0 (gaxios 8.3.3, google-auth-library 11.3.4)
- Node 26.5.1
- Works as documented with 8.0.0, same code
Steps to reproduce
A bucket with at least one object under a "folder" (for example a/b.txt):
import { Storage } from "@google-cloud/storage";
const bucket = new Storage().bucket("<bucket>");
const [files, nextQuery, apiResponse] = await bucket.getFiles({ delimiter: "/", autoPaginate: false, maxResults: 1 });
console.log(Object.keys(apiResponse), apiResponse.prefixes, apiResponse.nextPageToken);
Actual (9.0.0)
apiResponse is the HTTP response object, and the JSON body is one level down:
[ 'size', 'data', 'config' ] undefined undefined
apiResponse.data has kind, nextPageToken and prefixes.
Expected (8.0.0, and what 9.0.0 still documents)
apiResponse is the JSON body:
[ 'kind', 'nextPageToken', 'prefixes' ] [ 'a/' ] '...'
The JSDoc shipped in 9.0.0 still describes the old shape: the Bucket#getFiles example reads apiResponse.prefixes, and the delimiter option says results are "returned in apiResponse.prefixes" (build/cjs/src/bucket.js).
Impact
Code that follows the documented way to list folders gets undefined for prefixes and nextPageToken after upgrading. Nothing throws, and apiResponse is typed unknown, so type checks do not catch it: folder listings silently come back empty and manual paging stops after the first page.
MIGRATION.md covers apiResponse.headers becoming a Headers object, but does not say that the body moved from apiResponse to apiResponse.data. The same change appears to apply to the other methods that now pass the response through (Storage#getBuckets, Storage#getHmacKeys, Bucket#getNotifications, File#copy, ...).
Request
Either pass the body as apiResponse again for these methods, or keep the new shape and update the JSDoc and MIGRATION.md to say that body fields are now under apiResponse.data.
- 主要言語
- TypeScript
- スター
- 3.2k
- フォーク
- 732
- 平均マージ
- 2日 11時間
- マージ済み PR(30日)
- 99
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
googleapis/google-cloud-node のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
googleapis/google-cloud-node#9854 ·
メンテナーはふだん 1 日以内に返信
-
pubsub: "Operation attempted on ended Span" when a modack is flushed after the message was ackedオープンapi: pubsub
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
googleapis/google-cloud-node#9853 ·
メンテナーはふだん 1 日以内に返信
-
storage: V4 getSignedUrl sorts canonical headers with localeCompare, so they disagree with X-Goog-SignedHeaders対応中かも @itsrayeedscodespace が 9 日前に担当しました。 オープンapi: storage
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
googleapis/google-cloud-node#9840 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
firestore: getPartitions() emits gax AutopaginateTrueWarning in every process対応中かも @TheRealDanii が 13 日前に担当しました。 オープンapi: firestore
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
googleapis/google-cloud-node#9736 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
googleapis/google-cloud-node#9723 ·
メンテナーはふだん 1 日以内に返信
googleapis/google-cloud-node の issue をすべて見る
似ている issue
-
bot:ai-assisted component:platform-js status:untriaged
難易度 1/5 1時間未満 初心者へのやさしさ 74/100
midnightntwrk/platform-js#38 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
ranxianglei/billion-context#7068 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
mybigday/whisper.rn#348 ·
-
enhancement severity:low
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
Battle-Cattle/BCUK-Bot-4#1075 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
ilan-pinto/roaring-lions#1552 ·
メンテナーはふだん 1 日以内に返信