googleapis / nodejs-storage

Node.js client for Google Cloud Storage: unified object storage for developers and enterprises, from live data serving to data analytics/ML to data archiving.
https://cloud.google.com/storage/
Apache License 2.0
896 stars 370 forks source link

feat: add includeFoldersAsPrefixes for managed folders #2413

Closed ddelgrosso1 closed 7 months ago

ddelgrosso1 commented 7 months ago

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

Fixes #2384 🦕

ddelgrosso1 commented 7 months ago

There are some assumptions baked into the paginator dependency. The biggest issue is that paginator assumes only a single return value whereas getFiles returns not only File objects but the raw response. In order to access prefixes on the raw response autoPaginate must be set to false.

Fixing this in paginator is not a straightforward process and would likely break other libraries.