codemod
codemod copied to clipboard
[codemod][FP/FN] nuxt/4/migration-recipe
Re-reporting #1247 as it's been closed by @mohab-sameh with no reason but hasn't actually been adressed.
Original
import withNuxt from './.nuxt/eslint.config.mjs';
Expected
import withNuxt from './.nuxt/eslint.config.mjs';
Actual
import withNuxt from '.nuxt/eslint.config.mjs';
(nothing else in the eslint file was modified).
Estimated impact
Numbers about your specific codemod run:
- Total number of files/instances transformed: 1
- Number of files/instances missed by the codemod (FN): 0
- Number of files/instances mistakenly transformed (FP): 1
Logs:
// Please insert the contents of a log file generated by the codemod run here.
Additional context
In a regular nuxt project with eslint using flatconfig configured, i'm running the following migration script (according to the nuxt docs).
npx codemod@latest nuxt/4/migration-recipe
This also updates eslint.config.mjs (wrongly)
Result:
Now unfortunately - the modification causes eslint to complain (quite loudly)
Oops! Something went wrong! :(c to cancel.
ESLint: 9.9.0
TypeError [ERR_INVALID_MODULE_SPECIFIER]: Invalid module ".nuxt/eslint.config.mjs" is not a valid package name imported from /home/xmatt/devel/javascript/nuxtfast/eslint.config.mjs
at parsePackageName (node:internal/modules/esm/resolve:782:11)
at packageResolve (node:internal/modules/esm/resolve:805:5)
at moduleResolve (node:internal/modules/esm/resolve:927:18)
at defaultResolve (node:internal/modules/esm/resolve:1169:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:383:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:352:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:227:38)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:87:39)
at link (node:internal/modules/esm/module_job:86:36)
ELIFECYCLE Command failed with exit code 2.
Reverting this line fixes the problem - though i guess this shouldn't happen for a smooth migration between nuxt3 to nuxt4.
Thanks for reporting the issue. I let @amirabbas-gh to take a look at this
closing this out. this repo has been repurposed for the brand new Codemod CLI, and wont be used for codemod issues.
sorry about that. and thanks again for caring and reporting the issue.
@alexbit-codemod Where did YOU migrate my issue to, and when will you (or someone else) work on it to fix this? I've asked about the right place for this issue before but got no response. Now you close it - without mentioning "you shoul raise it someplace else" - which is the same as "we don't care, goodbye".
So your "thanks" is quite ironic and slightly offending, but anyway strongly missplaced in my view - as i did care and reported an issue - but this project didn't, and ignored ignored the issue for months - closing
Ignoring it for half a year - not a good look. Closing it with "we don't care, sorry" - even worse look.
So to conclude, "the brand new codemod CLI" doesn't care about being faulty and buggy, then?
Please reopen this (alternatively, i'll re-report this in this repository (the project causing the problem) - as there was no instruction given where else it should be reported).
Given that this project doesn't seem to care about it's issues - maybe you can suggest alternative projects (competitors to codemod) which provide something similar instead? Maybe that project WILL care about being buggy. so i can propose the projects i care about to stop using a project with such shitty behavior?