Skip to content

Commit 004bd3c

Browse files
committed
refactor: remove remaining s3 imports
1 parent 3c2fec8 commit 004bd3c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

packages/core/src/test/awsService/s3/commands/uploadFile.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
import assert from 'assert'
77
import * as vscode from 'vscode'
8-
import { S3 } from 'aws-sdk'
98
import {
109
FileSizeBytes,
1110
getFilesToUpload,
@@ -20,6 +19,7 @@ import { MockOutputChannel } from '../../../mockOutputChannel'
2019
import { getTestWindow } from '../../../shared/vscode/window'
2120
import sinon from 'sinon'
2221
import { Upload } from '@aws-sdk/lib-storage'
22+
import { Bucket } from '@aws-sdk/client-s3'
2323

2424
describe('uploadFileCommand', function () {
2525
const bucketName = 'bucket-name'
@@ -253,7 +253,7 @@ describe('promptUserForBucket', async function () {
253253
const fileLocation = vscode.Uri.file('/file.jpg')
254254

255255
let s3: S3Client
256-
let buckets: S3.Bucket[]
256+
let buckets: Bucket[]
257257

258258
const promptUndef: <T extends vscode.QuickPickItem>(opts: {
259259
picker: vscode.QuickPick<T>

packages/core/src/test/shared/ui/sam/bucketPrompter.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
*/
55

66
import assert from 'assert'
7-
import { S3 } from 'aws-sdk'
87
import sinon from 'sinon'
98
import { S3Client } from '../../../../shared/clients/s3'
109
import * as SamUtilsModule from '../../../../shared/sam/utils'
1110
import { createBucketNamePrompter } from '../../../../shared/ui/sam/bucketPrompter'
1211
import { AsyncCollection } from '../../../../shared/utilities/asyncCollection'
1312
import { RequiredProps } from '../../../../shared/utilities/tsUtils'
1413
import { samDeployUrl } from '../../../../shared/constants'
14+
import { Bucket } from '@aws-sdk/client-s3'
1515

1616
describe('createBucketNamePrompter', () => {
1717
let sandbox: sinon.SinonSandbox
@@ -32,7 +32,7 @@ describe('createBucketNamePrompter', () => {
3232
{ Name: 'bucket1', region: 'us-east-1' },
3333
{ Name: 'bucket2', region: 'us-east-1' },
3434
{ Name: 'bucket3', region: 'us-east-1' },
35-
] as unknown as AsyncCollection<RequiredProps<S3.Bucket, 'Name'> & { readonly region: string }>
35+
] as unknown as AsyncCollection<RequiredProps<Bucket, 'Name'> & { readonly region: string }>
3636

3737
const stub = sandbox.stub(s3Client, 'listBucketsIterable').callsFake(() => {
3838
return buckets
@@ -59,7 +59,7 @@ describe('createBucketNamePrompter', () => {
5959

6060
it('should include no items found message if no stacks exist', () => {
6161
const stub = sandbox.stub(s3Client, 'listBucketsIterable').callsFake(() => {
62-
return [] as unknown as AsyncCollection<RequiredProps<S3.Bucket, 'Name'> & { readonly region: string }>
62+
return [] as unknown as AsyncCollection<RequiredProps<Bucket, 'Name'> & { readonly region: string }>
6363
})
6464
sandbox.stub(SamUtilsModule, 'getRecentResponse').returns(undefined) // Mock recent bucket
6565

0 commit comments

Comments
 (0)