Skip to content

Conversation

@danadajian
Copy link
Contributor

  • Created s3Client.ts to export s3 from bun as s3Client for easier mocking
  • Updated all S3 operations to use Bun's native S3 API:
    • getKeysFromS3: uses s3Client.list() instead of S3Client.listObjectsV2
    • getTemporaryObjectUrl: uses s3Client.presign() instead of getSignedUrl
    • copyS3File: uses s3Client.file() with exists(), arrayBuffer(), and write()
    • acceptVisualChanges: updated to use copyS3File helper
  • Removed @aws-sdk/client-s3 and @aws-sdk/s3-request-presigner dependencies
  • Updated all tests to mock s3Client instead of reimplementing functions
  • Fixed test isolation by using beforeEach with mock.clearAllMocks()
  • All tests pass when run together

📝 Description

🔗 Related Issues

- Created s3Client.ts to export s3 from bun as s3Client for easier mocking
- Updated all S3 operations to use Bun's native S3 API:
  - getKeysFromS3: uses s3Client.list() instead of S3Client.listObjectsV2
  - getTemporaryObjectUrl: uses s3Client.presign() instead of getSignedUrl
  - copyS3File: uses s3Client.file() with exists(), arrayBuffer(), and write()
  - acceptVisualChanges: updated to use copyS3File helper
- Removed @aws-sdk/client-s3 and @aws-sdk/s3-request-presigner dependencies
- Updated all tests to mock s3Client instead of reimplementing functions
- Fixed test isolation by using beforeEach with mock.clearAllMocks()
- All tests pass when run together
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.

2 participants