jscodeshift icon indicating copy to clipboard operation
jscodeshift copied to clipboard

Ignore pattern doesn't work with relative paths starting with two dots (../)

Open makker opened this issue 1 year ago • 1 comments

I'm running my transform with command npx jscodeshift -t transforms/replace-indexes.ts ../company.reactapp/src --ignore-pattern **/node_modules/** I would expect the command to ignore all files in the node_modules directory. What happens instead is no files is ignored. Took me whole day to figure out that the relative path coused the issue. If I used an absolute path the the ignore pattern works just fine.

What little I managed to test, the true issue might be in micromatch library that handles the GLOB matching.

makker avatar Apr 13 '23 12:04 makker

Same issue here, glad you documented it.

rgosse avatar Sep 07 '23 12:09 rgosse