Skip to content

Conversation

@trivikr
Copy link
Member

@trivikr trivikr commented Nov 2, 2023

Issue

Fixes: #676

Description

Adds disclaimer in README and process warning

Testing

The disclaimer is emitted at when codemod is run:

$ ./bin/aws-sdk-js-codemod -t v2-to-v3 ../test/example.ts 

╔════════════════════════════════════════════════════════╗
║ Please review the code change thoroughly for required  ║
║ functionality before deploying it to production.       ║
║                                                        ║
║ If the transformation is not complete or is incorrect, ║
║ please report the issue on GitHub.                     ║
╚════════════════════════════════════════════════════════╝

Processing 1 files... 
Spawning 1 workers...
Sending 1 files to free worker...
All done. 
Results: 
0 errors
1 unmodified
0 skipped
0 ok
Time elapsed: 0.229seconds

Warning is suppressed if AWS_SDK_JS_CODEMOD_SUPRESS_WARNING is set.

$ AWS_SDK_JS_CODEMOD_SUPRESS_WARNING=1 ./bin/aws-sdk-js-codemod -t v2-to-v3 ../test/example.ts
Processing 1 files... 
Spawning 1 workers...
Sending 1 files to free worker...
All done. 
Results: 
0 errors
1 unmodified
0 skipped
0 ok
Time elapsed: 0.203seconds

Skipping the following as the option is not available in JSCodeShift:

  • move disclaimer at the end of the transformation
  • emit disclaimer only if there are transformations

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@changeset-bot
Copy link

changeset-bot bot commented Nov 2, 2023

🦋 Changeset detected

Latest commit: 0927bd4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
aws-sdk-js-codemod Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@trivikr trivikr marked this pull request as ready for review November 7, 2023 20:21
@trivikr trivikr requested a review from a team as a code owner November 7, 2023 20:21
@trivikr trivikr merged commit e0176fb into main Nov 7, 2023
@trivikr trivikr deleted the disclaimer branch November 7, 2023 20:26
@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 Nov 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Emit a warning in console that codemod may not handle all cases

1 participant