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

[Bug]: Codemod incorrectly transforms to package 'client-memory-db' instead of 'client-memorydb' #949

Closed
1 task
ashishdhingra opened this issue Oct 23, 2024 · 2 comments · Fixed by #951
Closed
1 task
Labels
bug Something isn't working p2 This is a standard priority issue

Comments

@ashishdhingra
Copy link

Self-service

  • I'd be willing to implement a fix

Describe the bug

There is an issue reported in CDK repo by external customer: issue aws/aws-cdk#31755 (comment).

CDK team has shell script that reads CLIENT_PACKAGE_NAMES_MAP.ts to generate SDK v2 to v3 mapping. As mentioned in issue comment, it transforms MemoryDB from CLIENT_NAMES.ts to memory-db here. Per MemoryDBClient, the service name is memorydb (not memory-db) with package name as @aws-sdk/client-memorydb.

Steps to reproduce

N/A

Observed behavior

SDK v2-to-v3 mapping is incorrect for Memory DB service. It is memory-db.

Expected behavior

SDK v2-to-v3 mapping for Memory DB service should be memorydb.

Environment

aws-sdj-js-codemod: latest

Additional context

No response

@ashishdhingra ashishdhingra added bug Something isn't working triage Triaging bugs labels Oct 23, 2024
@trivikr
Copy link
Member

trivikr commented Oct 23, 2024

Verified that this is a bug

$ cat example.ts
import AWS from "aws-sdk";
const client = new AWS.MemoryDB();

$ npx aws-sdk-js-codemod@latest -t v2-to-v3 example.ts

$ cat example.ts 
import { MemoryDB } from "@aws-sdk/client-memory-db";
const client = new MemoryDB();

The package https://www.npmjs.com/@aws-sdk/client-memory-db doesn't exist.
It's https://www.npmjs.com/@aws-sdk/client-memorydb

@trivikr trivikr removed the triage Triaging bugs label Oct 23, 2024
@trivikr trivikr added the p2 This is a standard priority issue label Oct 23, 2024
@trivikr trivikr changed the title [Bug]: Codemod [Bug]: Codemod incorrectly transforms to package 'client-memory-db' instead of 'client-memorydb' Oct 23, 2024
Copy link
Contributor

github-actions bot commented Nov 7, 2024

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 Nov 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working p2 This is a standard priority issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants