codemod icon indicating copy to clipboard operation
codemod copied to clipboard

Added experimental migration engine

Open arybitskiy opened this issue 1 year ago • 1 comments

Please check if the PR fulfills these requirements:

Please include the following information in your pull request:

// with this engine something like this is possible:
jsFiles`app/*.{js,ts}`
  .astGrep`console.log($A)`
  .replaceWith`console.error($A)`;
// or change json
jsonFiles`**/package.json`
  .update((packageJson) => ({
    ...packageJson,
    license: "MIT",
  }));

// or any other format

  • Any other information (if needed):

  • it supports any language (you just import appropriate function)

  • it supports file traversing

  • all-in-one-place

  • something like jQuery for migration

  • it is much easier than gritQL

  • something like inline tests could be added too..

  • potentially it will play nice with LLM (maybe @ppashakhanloo and @panuganti can confirm or not that)

arybitskiy avatar Apr 23 '24 17:04 arybitskiy

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

Name Status Preview Comments Updated (UTC)
codemod ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 23, 2024 6:05pm
studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 23, 2024 6:05pm

vercel[bot] avatar Apr 23 '24 17:04 vercel[bot]