Skip to content

feat: migrate left-pad and pad-left to ast-grep, add computeCallReplacementEdits util#197

Merged
43081j merged 4 commits into
es-tooling:mainfrom
gameroman:pad-left
May 28, 2026
Merged

feat: migrate left-pad and pad-left to ast-grep, add computeCallReplacementEdits util#197
43081j merged 4 commits into
es-tooling:mainfrom
gameroman:pad-left

Conversation

@gameroman
Copy link
Copy Markdown
Contributor

@gameroman gameroman commented May 22, 2026

🔗 Linked issue

See #111
Closes #110

📚 Description

This migrates the left-pad and pad-left codemods to use ast-grep

Adds shared computeCallReplacementEdits util

  • refactors other codemods to use computeCallReplacementEdits, where relevant

@gameroman gameroman marked this pull request as ready for review May 22, 2026 20:50
@43081j
Copy link
Copy Markdown
Collaborator

43081j commented May 24, 2026

is the description just wrong?

it contains a lot more than left-pad and pad-left.

let me know before i review 👍

@gameroman
Copy link
Copy Markdown
Contributor Author

is the description just wrong?

it contains a lot more than left-pad and pad-left.

let me know before i review 👍

I've added computeCallReplacementEdits util for left-pad and pad-left codemods and then noticed that some other codemods can use it too so I refactored them

@gameroman gameroman force-pushed the pad-left branch 2 times, most recently from f32bffc to 4bc8015 Compare May 25, 2026 12:01
Copy link
Copy Markdown
Collaborator

@dreyfus92 dreyfus92 left a comment

Choose a reason for hiding this comment

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

overall looks good, but you have 2 options here either you update the pr's title & desc or split this to match the pr's intention

@gameroman gameroman changed the title feat: migrate left-pad and pad-left to ast-grep feat: migrate left-pad and pad-left to ast-grep, add computeCallReplacementEdits util May 25, 2026
@gameroman gameroman requested a review from dreyfus92 May 25, 2026 20:26
@gameroman gameroman force-pushed the pad-left branch 2 times, most recently from 9c78cdd to 2203ade Compare May 25, 2026 21:02
dreyfus92
dreyfus92 previously approved these changes May 25, 2026
@43081j 43081j merged commit d3cfa98 into es-tooling:main May 28, 2026
3 checks passed
@gameroman gameroman deleted the pad-left branch May 28, 2026 12:51
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.

3 participants