Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { chain as providerChain } from "@smithy/property-provider";

// JS SDK v3 switched to credential providers to functions instead of objects.
// JS SDK v3 switched credential providers from classes to functions.
// The CredentialProviderChain is now a chain of providers.
// Reference: https://www.npmjs.com/package/@aws-sdk/credential-providers
providerChain(providers);
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { fromTemporaryCredentials } from "@aws-sdk/credential-providers";

// JS SDK v3 switched to credential providers to functions instead of objects.
// JS SDK v3 switched credential providers from classes to functions.
// This is the closest approximation from codemod of what your application needs.
// Reference: https://www.npmjs.com/package/@aws-sdk/credential-providers
fromTemporaryCredentials({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { fromCognitoIdentity } from "@aws-sdk/credential-providers";

// JS SDK v3 switched to credential providers to functions instead of objects.
// JS SDK v3 switched credential providers from classes to functions.
// This is the closest approximation from codemod of what your application needs.
// Reference: https://www.npmjs.com/package/@aws-sdk/credential-providers
fromCognitoIdentity();
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { fromInstanceMetadata } from "@aws-sdk/credential-providers";

// JS SDK v3 switched to credential providers to functions instead of objects.
// JS SDK v3 switched credential providers from classes to functions.
// This is the closest approximation from codemod of what your application needs.
// Reference: https://www.npmjs.com/package/@aws-sdk/credential-providers
fromInstanceMetadata();
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { fromContainerMetadata } from "@aws-sdk/credential-providers";

// JS SDK v3 switched to credential providers to functions instead of objects.
// JS SDK v3 switched credential providers from classes to functions.
// This is the closest approximation from codemod of what your application needs.
// Reference: https://www.npmjs.com/package/@aws-sdk/credential-providers
fromContainerMetadata();
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { fromEnv } from "@aws-sdk/credential-providers";

// JS SDK v3 switched to credential providers to functions instead of objects.
// JS SDK v3 switched credential providers from classes to functions.
// This is the closest approximation from codemod of what your application needs.
// Reference: https://www.npmjs.com/package/@aws-sdk/credential-providers
fromEnv("AWS");
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { fromIni } from "@aws-sdk/credential-providers";

// JS SDK v3 switched to credential providers to functions instead of objects.
// JS SDK v3 switched credential providers from classes to functions.
// This is the closest approximation from codemod of what your application needs.
// Reference: https://www.npmjs.com/package/@aws-sdk/credential-providers
fromIni({ profile: "profile-name" });
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { fromProcess } from "@aws-sdk/credential-providers";

// JS SDK v3 switched to credential providers to functions instead of objects.
// JS SDK v3 switched credential providers from classes to functions.
// This is the closest approximation from codemod of what your application needs.
// Reference: https://www.npmjs.com/package/@aws-sdk/credential-providers
fromProcess({ profile: "profile-name" });
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { fromContainerMetadata } from "@aws-sdk/credential-providers";

// JS SDK v3 switched to credential providers to functions instead of objects.
// JS SDK v3 switched credential providers from classes to functions.
// This is the closest approximation from codemod of what your application needs.
// Reference: https://www.npmjs.com/package/@aws-sdk/credential-providers
fromContainerMetadata();
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { fromSSO } from "@aws-sdk/credential-providers";

// JS SDK v3 switched to credential providers to functions instead of objects.
// JS SDK v3 switched credential providers from classes to functions.
// This is the closest approximation from codemod of what your application needs.
// Reference: https://www.npmjs.com/package/@aws-sdk/credential-providers
fromSSO({ profile: "profile-name" });
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { fromTokenFile } from "@aws-sdk/credential-providers";

// JS SDK v3 switched to credential providers to functions instead of objects.
// JS SDK v3 switched credential providers from classes to functions.
// This is the closest approximation from codemod of what your application needs.
// Reference: https://www.npmjs.com/package/@aws-sdk/credential-providers
fromTokenFile();
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { fromWebToken } from "@aws-sdk/credential-providers";

// JS SDK v3 switched to credential providers to functions instead of objects.
// JS SDK v3 switched credential providers from classes to functions.
// This is the closest approximation from codemod of what your application needs.
// Reference: https://www.npmjs.com/package/@aws-sdk/credential-providers
fromWebToken();
2 changes: 1 addition & 1 deletion src/transforms/v2-to-v3/apis/replaceAwsIdentity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export interface ReplaceAwsCredentialsOptions {
importType: ImportType;
}

const PROVIDER_SWITCH_COMMENT = ` JS SDK v3 switched to credential providers to functions instead of objects.`;
const PROVIDER_SWITCH_COMMENT = ` JS SDK v3 switched credential providers from classes to functions.`;

const getNewExpression = (identifier: string, className: string) =>
({
Expand Down