Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Use v3 client name when transforming clients created with global import #593

Closed
1 task
trivikr opened this issue Oct 3, 2023 · 2 comments · Fixed by #594
Closed
1 task
Labels
enhancement New feature or request

Comments

@trivikr
Copy link
Member

trivikr commented Oct 3, 2023

Self-service

  • I'd be willing to implement this feature

Problem

The v2-to-v3 transformer uses client name from v2 resulting in named imports in transformed code.
This adds local names for the imports.

Example input:

import AWS from "aws-sdk";
const cognito = new AWS.CognitoIdentityServiceProvider();

Example output:

import { CognitoIdentityProvider as CognitoIdentityServiceProvider } from "@aws-sdk/client-cognito-identity-provider";
const cognito = new CognitoIdentityServiceProvider();

Solution

Transform the client creation to use v3 client name as follows:

import { CognitoIdentityProvider } from "@aws-sdk/client-cognito-identity-provider";
const cognito = new CognitoIdentityProvider();

Alternatives

N/A

Additional context

No response

@trivikr trivikr added enhancement New feature or request p3 This is a minor priority issue labels Oct 3, 2023
@trivikr trivikr added wontfix This will not be worked on and removed p3 This is a minor priority issue labels Oct 3, 2023
@trivikr

This comment was marked as outdated.

@trivikr trivikr closed this as not planned Won't fix, can't repro, duplicate, stale Oct 3, 2023
@trivikr trivikr reopened this Oct 13, 2023
@trivikr trivikr added wontfix This will not be worked on and removed wontfix This will not be worked on labels Oct 13, 2023
@trivikr trivikr closed this as completed Oct 15, 2023
@github-actions
Copy link
Contributor

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 30, 2023
@trivikr trivikr removed the wontfix This will not be worked on label Nov 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant