Skip to content

Commit cbf9c21

Browse files
authored
Transform AWS.Endpoint to URL (#840)
1 parent 2197eb2 commit cbf9c21

13 files changed

+60
-0
lines changed

.changeset/famous-houses-wave.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": minor
3+
---
4+
5+
Transform AWS.Endpoint to URL
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import AWS = require("aws-sdk");
2+
3+
const endpoint = new AWS.Endpoint("http://localhost:8000/");
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
const endpoint = new URL("http://localhost:8000/");
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import AWS from "aws-sdk";
2+
3+
const endpoint = new AWS.Endpoint("http://localhost:8000/");
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
const endpoint = new URL("http://localhost:8000/");
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { Endpoint } from "aws-sdk";
2+
3+
const endpoint = new Endpoint("http://localhost:8000/");
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
const endpoint = new URL("http://localhost:8000/");
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import AWS from "aws-sdk";
2+
3+
const config = new AWS.Config({
4+
endpoint: "http://localhost"
5+
});
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
const config = {
2+
endpoint: "http://localhost"
3+
};

src/transforms/v2-to-v3/apis/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export * from "./isS3GetSignedUrlApiUsed";
1010
export * from "./isS3UploadApiUsed";
1111
export * from "./removePromiseCalls";
1212
export * from "./renameErrorCodeWithName";
13+
export * from "./replaceAwsEndpoint";
1314
export * from "./replaceAwsError";
1415
export * from "./replaceAwsIdentity";
1516
export * from "./replaceS3GetSignedUrlApi";

0 commit comments

Comments
 (0)