Skip to content

feat: option to include subfolder prefixes in bucket.list() - #1168

Merged
bosschaert merged 2 commits into
mainfrom
bucket-list-pre
Nov 25, 2025
Merged

bosschaert merged 2 commits into
mainfrom
bucket-list-pre

Conversation

@bosschaert

Copy link
Copy Markdown
Contributor

To include subfolder prefixes in the result, use:

bucket.list(path, { subPrefixes: true })

Comment on lines +49 to +52
/**
* whether to include subfolder prefixes
*/
subPrefixes: boolean;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you also settle for prefixes only? They are sub folders, but not sub prefixes 😉

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@github-actions

Copy link
Copy Markdown

This PR will trigger a minor release when merged.

@bosschaert
bosschaert merged commit fa6758f into main Nov 25, 2025
6 checks passed
@bosschaert
bosschaert deleted the bucket-list-pre branch November 25, 2025 15:19
@tripodsan

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version @adobe/helix-shared-storage-v1.9.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@tripodsan tripodsan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok for me. but I think includePrefixes would be a better option name

async list(prefix, opts = false) {
const {
shallow = false, maxItems = Number.POSITIVE_INFINITY,
shallow = false, maxItems = Number.POSITIVE_INFINITY, prefixes = false,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe use includePrefixes ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

naming is hard 😉
let me change it to be includePrefixes before anyone is actually using it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed in PR: #1169

@tripodsan

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 9.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants