Added experimental migration engine
Please check if the PR fulfills these requirements:
- [x] The commit message follows our code of conduct and contributing guidelines
- [x] Tests for the changes have been added (for bug fixes/features)
- [x] Docs have been added / updated (for bug fixes / features)
Please include the following information in your pull request:
-
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...) feature
-
What is the new behavior (if this is a feature change)? Example of migration engine. It can use syntax highlight inside tag literals and possibly types inside tag literals.
// 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)
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 |