storage 9.0.0: getFiles apiResponse is now the HTTP response, so the documented apiResponse.prefixes is undefined
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 45/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- node.js, typescript
- Domaine
- api
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- TypeScript
- Étoiles
- 3.2k
- Forks
- 732
- Merge moyen
- 2 j 11 h
- PR mergées (30 j)
- 99
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de googleapis/google-cloud-node
-
Broken deprecation chainOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100
googleapis/google-cloud-node#9854 ·
Les mainteneurs répondent en général sous 1 jour
-
pubsub: "Operation attempted on ended Span" when a modack is flushed after the message was ackedOuverteapi: pubsub
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
googleapis/google-cloud-node#9853 ·
Les mainteneurs répondent en général sous 1 jour
-
storage: V4 getSignedUrl sorts canonical headers with localeCompare, so they disagree with X-Goog-SignedHeadersPeut-être pris @itsrayeedscodespace l’a pris il y a 9 jours. Ouverteapi: storage
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
googleapis/google-cloud-node#9840 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
firestore: getPartitions() emits gax AutopaginateTrueWarning in every processPeut-être pris @TheRealDanii l’a pris il y a 13 jours. Ouverteapi: firestore
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
googleapis/google-cloud-node#9736 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 82/100
googleapis/google-cloud-node#9723 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de googleapis/google-cloud-node
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
vercel-labs/ui#809 ·
Les mainteneurs répondent en général sous 1 jour
-
bot:ai-assisted component:platform-js status:untriaged
Difficulté 1/5 Moins d'une heure Accessibilité débutants 74/100
midnightntwrk/platform-js#38 ·
-
[bug] Second false positive on high-cost plugin alert: detection only compares patch entry id, community plugin dsh-auto | [bug] 高成本插件告警第二次误报:检测只比对 patch 条目 id,社区插件 dsh-auto-review 被认成 @deepseek-ai/dsh-experimental-auto-reviewPeut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
ranxianglei/billion-context#7068 ·
Les mainteneurs répondent en général sous 1 jour
-
vendor: bump whisper.cpp past 6a8addd — the current pin aborts the app on a failed Metal initOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
mybigday/whisper.rn#348 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
six-group/six-webcomponents#600 ·