Changelog - 2026-11-05
listObjects on Bun S3 lists the top level by default
Bug Fix Breaking ChangeIn one line. BunS3Helper.listObjects no longer lists the whole bucket tree when you leave out useRecursive: both storage helpers now return only the top level, so the same call gives the same answer on disk and on S3.
What changed
- One default.
useRecursivedefaults tofalseonBunS3Helperand onDiskHelper.IListObjectsOptionsalready documentedfalse; only the Bun S3 helper did otherwise (true). - What
falsemeans on S3. The call sendsdelimiter: '/', so keys below the first folder level are not returned.truesends no delimiter and lists everything underprefix.
Who is affected
- Code that calls
BunS3Helper.listObjectswithoutuseRecursiveand expects every key under the prefix. It now gets the top level only. PassuseRecursive: trueto keep the old listing. - Code that already passes
useRecursive, and code that usesDiskHelper. No action needed. - The static-asset list route. No action needed: it passes
useRecursivefrom itsrecursivequery parameter.
Breaking changes
WARNING
A BunS3Helper.listObjects call with no useRecursive returns fewer objects than before.
Before:
typescript
// Every key under the prefix, at any depth
const objects = await storage.listObjects({ bucket: { name: 'uploads' }, prefix: 'photos/' });After:
typescript
// The top level only; ask for the tree explicitly
const objects = await storage.listObjects({
bucket: { name: 'uploads' },
prefix: 'photos/',
useRecursive: true,
});Details
- The same default is now tested on both helpers, with a fake S3 client for the Bun S3 side.
- The storage helper reference lists
falsefor both helpers in its parameter table and in its comparison table.
| File | Package |
|---|---|
src/modules/storage/bun-s3/helper.ts | helpers |