Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
makker opened this issue Apr 13, 2023 · 2 comments
Open

Comments

@makker
Copy link

makker commented Apr 13, 2023

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.

@rgosse
Copy link

rgosse commented Sep 7, 2023

Same issue here, glad you documented it.

@bjohansebas
Copy link

I have the same issue, so it would be great if it gets fixed since it’s a widely used package.

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

No branches or pull requests

3 participants