• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

decentraland / catalyst-storage / 30155398097

25 Jul 2026 10:57AM UTC coverage: 92.615% (-1.7%) from 94.359%
30155398097

push

github

web-flow
feat!: migrate the S3 backend to AWS SDK v3 (#111)

* feat!: migrate the S3 backend to AWS SDK v3

v2 entered maintenance mode, and the v3 attempt in #66 was rolled back in #74
("as there are still so many issues with v3") — this ports the backend properly.

- @aws-sdk/client-s3 command objects replace the v2 method-per-operation client,
  and @aws-sdk/lib-storage's Upload replaces ManagedUpload for streaming
  multipart uploads.
- error classification follows v3's shapes: the code moves from `error.code` to
  `error.name` and the status from `error.statusCode` to
  `error.$metadata.httpStatusCode`, keeping the actionable 403-vs-404 warning
  from #107 intact.
- cancellation keeps its guarantees, but the attribution moves where v3 requires
  it. lib-storage's done() races the upload against an abort watcher that
  rejects with its own AbortError, a shape the shared translator deliberately
  refuses to credit, so this call site now tracks whether WE aborted the upload
  and converts only then — the porting note left in cancellation.ts for exactly
  this migration. that also means a genuine failure racing our abort is
  discarded by the SDK above this layer; the limitation is documented where it
  bites.
- tests move from the mock-aws-s3 emulator to an in-memory double built on a
  real S3Client with only send() intercepted (lib-storage reads endpoint and
  signing config, so a bare object cannot stand in). It honors abortSignal like
  the real client, so the cancellation tests drive lib-storage's genuine
  Upload.abort() path, and it supports Range — which lets the range tests assert
  served bytes, something the previous emulator could not do.
- drops aws-sdk, plus the dead @aws-sdk/util-stream-node and aws-sdk-client-mock
  left over from the reverted attempt (the latter was in `dependencies`, so a
  mocking library was shipping to consumers).

BREAKING CHANGE: createS3BasedFileSystemContentStorage now takes an S3Client
from @aws-sdk/client-s3 instea... (continued)

316 of 377 branches covered (83.82%)

Branch coverage included in aggregate %.

518 of 542 new or added lines in 9 files covered. (95.57%)

1 existing line in 1 file now uncovered.

888 of 923 relevant lines covered (96.21%)

103.57 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

95.78
/src/folder-based-storage-component.ts


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc