Skip to content

Commit fb13fcc

Browse files
authored
Only format while which include AWS SDK for JavaScript (#703)
1 parent a2ee528 commit fb13fcc

File tree

4 files changed

+8
-1
lines changed

4 files changed

+8
-1
lines changed

.changeset/tame-bugs-cross.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+
Only format while which include AWS SDK for JavaScript
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
const env = {...process.env, ...this.config.env || {}}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
const env = {...process.env, ...this.config.env || {}}

src/transforms/v2-to-v3/transformer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const transformer = async (file: FileInfo, api: API) => {
4444
const v2ClientNamesRecord = getClientNamesRecord(j, source, importType);
4545

4646
if (!v2GlobalName && Object.keys(v2ClientNamesRecord).length === 0) {
47-
return source.toSource();
47+
return file.source;
4848
}
4949

5050
if (v2GlobalName) {

0 commit comments

Comments
 (0)