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]: npx does not use the latest version of the codemod #180
Comments
This seems to be the default behavior of npm CLI as discussed in npm/cli#2329 We can recommend running $ npx aws-sdk-js-codemod@latest --version
Need to install the following packages:
aws-sdk-js-codemod@0.6.3
Ok to proceed? (y) y
aws-sdk-js-codemod: 0.6.3
...
$ npx aws-sdk-js-codemod@latest --version
Need to install the following packages:
aws-sdk-js-codemod@0.6.3
Ok to proceed? (y) y
aws-sdk-js-codemod: 0.6.3
... |
We'll probably add an FAQ to README requesting users to clear their npm cache. Example gist https://gist.github.com/karlhorky/3e092d1def377f409976566db2e46029 We may also request user to run |
A message can be added in Existing output $ npx aws-sdk-js-codemod --help
-----------------------------------------------------------------------------------------------
aws-sdk-js-codemod is a lightweight wrapper over jscodeshift.
It processes --help, --version and --transform options before passing them downstream.
You can provide names of the custom transforms instead of a local path or url:
v2-to-v3 Converts AWS SDK for JavaScript APIs in a Javascript/TypeScript codebase from
version 2 (v2) to version 3 (v3).
Example: aws-sdk-js-codemod -t v2-to-v3 example.js
-----------------------------------------------------------------------------------------------
... The new section could be: $ npx aws-sdk-js-codemod --help
-----------------------------------------------------------------------------------------------
aws-sdk-js-codemod is a lightweight wrapper over jscodeshift.
It processes --help, --version and --transform options before passing them downstream.
You can provide names of the custom transforms instead of a local path or url:
v2-to-v3 Converts AWS SDK for JavaScript APIs in a Javascript/TypeScript codebase from
version 2 (v2) to version 3 (v3).
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.
----------------------------------------------------------------------------------------------- |
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. |
Describe the bug
npx does not use the latest version of codemod
Steps to reproduce
To reproduce, you need to have an older version of
aws-sdk-js-codemod
installedRun the following commands:
Observed behavior
When latest is explicitly passed, it uses the latest version.
But it does not override the previously installed version
Expected behavior
Default documentation should update how to use the latest version.
The current usage recommends
npx aws-sdk-js-codemod
which will use the catched version: https://github.com/awslabs/aws-sdk-js-codemod#usageThe text was updated successfully, but these errors were encountered: