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

Refactor: ConditionallyRender #7825

Closed
wants to merge 1 commit into from
Closed

Conversation

Tymek
Copy link
Member

@Tymek Tymek commented Aug 9, 2024

How to reproduce changes

In correct directory

cd frontend

Get codemod script

wget https://gist.githubusercontent.com/Tymek/08967aed564b7f138907deb8b4642284/raw/3655e33cf34ca8c13460d720211534c4a72ee3e9/transform.js
[ "$(sha256sum transform.js)" = "ef18a6ed4580338335246221799e9de2c6f29e3c8f74e243eb345f8fea024358  transform.js" ] && echo "Checksum matches" || { echo "Checksum does not match"; false; }

Make sure it has correct checksum, and run transformations.
(twice for tsx, because we have ~50 nested ConditionallyRender elements)

npx jscodeshift --extensions=tsx -t=transform.js ./src
npx jscodeshift --extensions=tsx -t=transform.js ./src
npx jscodeshift --extensions=jsx -t=transform.js ./src

Finish with some cleanup:

./node_modules/.bin/biome lint src --write --unsafe
./node_modules/.bin/biome format src --write

rm transform.js
rm -r src/component/common/ConditionallyRender

Copy link

vercel bot commented Aug 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 12, 2024 11:27am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Visit Preview Aug 12, 2024 11:27am

Copy link
Contributor

github-actions bot commented Aug 9, 2024

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Manifest Files

@Tymek
Copy link
Member Author

Tymek commented Sep 2, 2024

#8046

@Tymek Tymek closed this Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant