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

Execute all codemodes using one command #403

Merged
merged 3 commits into from
Jan 11, 2024
Merged

Execute all codemodes using one command #403

merged 3 commits into from
Jan 11, 2024

Conversation

nlopin
Copy link
Contributor

@nlopin nlopin commented Jan 9, 2024

Closes #399

What

Allows users to run all codemods with a command npx @freenow/wave run_v2_migration src/**/*

How

I made several attempts, but the leaner one is to have a proxy Bash script that passes all provided arguments to the jscodeshift CLI.

It scans the codemods folder and executes the jscodeshift with every transformation function. If we add more migrations, they will be executed together with old.

Media

Example Run

@nlopin nlopin changed the base branch from main to next January 9, 2024 18:52
Signed-off-by: Nikolai Lopin <[email protected]>
Copy link
Contributor

@martimalek martimalek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added some suggestions for the docs, I tested the command in partner-dashboard and it executed fine 👌🏽

@nlopin
Copy link
Contributor Author

nlopin commented Jan 11, 2024

I've added all the Migration guide suggestions to a separate PR: #406

@nlopin nlopin merged commit ac8e9b8 into next Jan 11, 2024
10 checks passed
@nlopin nlopin deleted the exec-all-codemodes branch January 11, 2024 16:26
nlopin pushed a commit that referenced this pull request Jan 19, 2024
* feat: allow to execute all codemods at once

Signed-off-by: Nikolai Lopin <[email protected]>

* style: improve console output

Signed-off-by: Nikolai Lopin <[email protected]>

* Apply suggestions from code review

Co-authored-by: martimalek <[email protected]>

---------

Signed-off-by: Nikolai Lopin <[email protected]>
Co-authored-by: martimalek <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Allow to execute all codemods with one command
3 participants