Skip to content

chore(files): declare AWS SDK as optionalDependencies for the s3/rustfs driver#159

Merged
pascal-klesse merged 2 commits into
mainfrom
chore/declare-aws-sdk-optional-deps
May 21, 2026
Merged

chore(files): declare AWS SDK as optionalDependencies for the s3/rustfs driver#159
pascal-klesse merged 2 commits into
mainfrom
chore/declare-aws-sdk-optional-deps

Conversation

@pascal-klesse
Copy link
Copy Markdown
Member

Problem

src/core/files ships an s3/rustfs storage driver that lazy-imports @aws-sdk/client-s3 and @aws-sdk/s3-request-presigner, but neither package was declared in package.json. Any consumer setting FEATURE_FILES_STORAGE_DEFAULT=s3 or rustfs therefore fails to boot — the storage factory throws aws-s3-operations: failed to load @aws-sdk/client-s3 — run bun add ….

(Companion to #158, which stops that error being masked as [ExceptionHandler] {}.)

Fix

  • Declare @aws-sdk/client-s3 + @aws-sdk/s3-request-presigner as optionalDependencies — the local/postgres drivers stay zero-cost (optional deps that fail to install don't break local), while s3/rustfs consumers get them resolved automatically.
  • Document the requirement in .env.example next to the FEATURE_FILES_STORAGE_DEFAULT toggle.

bun install resolves both packages; package.json remains valid.

Pascal Klesse added 2 commits May 21, 2026 15:09
…fs driver

The s3/rustfs storage driver in src/core/files lazy-imports
@aws-sdk/client-s3 + @aws-sdk/s3-request-presigner, but they were not
declared anywhere — so any consumer setting FEATURE_FILES_STORAGE_DEFAULT=s3
or rustfs hit a boot failure with the masked-but-now-descriptive
"failed to load @aws-sdk/client-s3" error.

Declares both as optionalDependencies (local/postgres drivers stay
zero-cost; s3/rustfs consumers get them resolved automatically) and
documents the requirement in .env.example next to the driver toggle.
@pascal-klesse pascal-klesse merged commit d362331 into main May 21, 2026
13 checks passed
@pascal-klesse pascal-klesse deleted the chore/declare-aws-sdk-optional-deps branch May 21, 2026 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant