Skip to content

Commit 24f87df

Browse files
authored
Check for source 'aws-sdk' while removing default imports (#54)
1 parent d79927f commit 24f87df

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.changeset/calm-toys-destroy.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"aws-sdk-js-codemod": patch
3+
---
4+
5+
Check for source 'aws-sdk' while removing default imports

src/transforms/v2-to-v3/utils/removeDefaultImportIfNotUsed.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export const removeDefaultImportIfNotUsed = (
1414
source
1515
.find(j.ImportDeclaration, {
1616
specifiers: [{ type: "ImportDefaultSpecifier", local: { name: defaultImportName } }],
17+
source: { value: "aws-sdk" },
1718
})
1819
.forEach((declerationPath) => {
1920
// Remove default import from ImportDecleration.

0 commit comments

Comments
 (0)