-
Notifications
You must be signed in to change notification settings - Fork 10
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 not doing anything #486
Comments
I am seeing the same issue on 0.14.1. When I run against my project, it succeeds without error, but makes no changes. |
I'm not able to reproduce this, as codemod migrates the code for me. $ cat example.ts
import AWS from "aws-sdk";
const region = "us-west-2";
const client = new AWS.DynamoDB({ region });
client.listTables({}, (err, data) => {
if (err) console.log(err, err.stack);
else console.log(data);
});
$ npx aws-sdk-js-codemod@latest -t v2-to-v3 example.ts
...
Results:
0 errors
0 unmodified
0 skipped
1 ok
Time elapsed: 0.262seconds
$ cat example.ts
import { DynamoDB } from "@aws-sdk/client-dynamodb";
const region = "us-west-2";
const client = new DynamoDB({ region });
client.listTables({}, (err, data) => {
if (err) console.log(err, err.stack);
else console.log(data);
}); This is a basic transformation, and should have worked in In the past, I'd noticed the jscodeshift didn't run our transform on certain platforms or configurations. For example, one user in #478 had to pass transform file explicitly. From your report, it appears that transformer was run but no transformation happened. |
Hi, I'm sorry but I no longer possess the environment in which I was trying to get the codemod to work. |
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. |
Self-service
Describe the bug
aws-sdk-js-codemod flags all files using 'old code' as 'ok'.
Steps to reproduce
Follow the 'using codemod' steps as listed on
https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/migrating-to-v3.html
Observed behavior
the script returned
where example .ts is
Expected behavior
Expected to actually modify the file instead of pasting the same text in again.
Environment
Additional context
No response
The text was updated successfully, but these errors were encountered: