Skip to content

Commit

Permalink
docs: recommend latest version of codemod in README (#569)
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr committed Sep 5, 2023
1 parent 8fb8221 commit d31a5d4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
5 changes: 5 additions & 0 deletions .changeset/shiny-drinks-deny.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"aws-sdk-js-codemod": patch
---

Recommend using latest version of aws-sdk-js-codemod
11 changes: 3 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,11 @@ To use aws-sdk-js-codemod, please install [Node.js][install-nodejs].

- Optionally execute dry-run for the transform, and print transformed files on stdout:
```console
npx aws-sdk-js-codemod --dry --print -t v2-to-v3 PATH...
npx aws-sdk-js-codemod@latest --dry --print -t v2-to-v3 PATH...
```
- Run transform, and make changes to files:
```console
npx aws-sdk-js-codemod -t v2-to-v3 PATH...
```
- To use the latest version of aws-sdk-js-codemod, clear your npx cache. You can either
manually delete folder `$(npm get cache)/_npx/*`, or run `clear-npx-cache`.
```console
npx clear-npx-cache
npx aws-sdk-js-codemod@latest -t v2-to-v3 PATH...
```

## Example
Expand All @@ -46,7 +41,7 @@ client.listTables({}, (err, data) => {
else console.log(data);
});

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

$ cat example.ts
import { DynamoDB } from "@aws-sdk/client-dynamodb";
Expand Down
4 changes: 1 addition & 3 deletions src/utils/getHelpParagraph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ You can provide names of the custom transforms instead of a local path or url:
${transforms.map((transform) => getTransformDescription(transform).join("\n"))}
Example: aws-sdk-js-codemod -t v2-to-v3 example.js
To use the latest version of aws-sdk-js-codemod, please clear your npx cache and re-run.
Example: npx aws-sdk-js-codemod@latest -t v2-to-v3 example.js
${separator}\n\n`;

0 comments on commit d31a5d4

Please sign in to comment.