storage 9.0.0: getFiles apiResponse is now the HTTP response, so the documented apiResponse.prefixes is undefined
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 45/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- node.js, typescript
- Bereich
- api
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 3.2k
- Forks
- 732
- Ø Merge
- 2 T. 11 Std.
- Gemergte PRs (30 T.)
- 99
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus googleapis/google-cloud-node
-
Broken deprecation chainOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
googleapis/google-cloud-node#9854 ·
Maintainer antworten meist innerhalb von 1 Tag
-
pubsub: "Operation attempted on ended Span" when a modack is flushed after the message was ackedOffenapi: pubsub
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
googleapis/google-cloud-node#9853 ·
Maintainer antworten meist innerhalb von 1 Tag
-
storage: V4 getSignedUrl sorts canonical headers with localeCompare, so they disagree with X-Goog-SignedHeadersEvtl. vergeben @itsrayeedscodespace hat das vor 9 Tagen übernommen. Offenapi: storage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
googleapis/google-cloud-node#9840 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
firestore: getPartitions() emits gax AutopaginateTrueWarning in every processEvtl. vergeben @TheRealDanii hat das vor 13 Tagen übernommen. Offenapi: firestore
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
googleapis/google-cloud-node#9736 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 82/100
googleapis/google-cloud-node#9723 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in googleapis/google-cloud-node
Ähnliche Issues
-
bot:ai-assisted component:platform-js status:untriaged
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 74/100
midnightntwrk/platform-js#38 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
ranxianglei/billion-context#7068 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
mybigday/whisper.rn#348 ·
-
enhancement severity:low
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Battle-Cattle/BCUK-Bot-4#1075 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 67/100
ilan-pinto/roaring-lions#1552 ·
Maintainer antworten meist innerhalb von 1 Tag