-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
Relative paths should be invalid #20
Comments
Let's discuss this first.
path.join('./foo') // foo |
Note you can do things like Ideally the conversion should by done by the user but Maybe you could try to get the relative path and exclude from filtering if they are outside the current directory, I don't know. Here is another simplified example not mixing with relative ignore patters:
I don't think it should filter |
I've tried to upgrade There are lots of runtime logics that make With |
Blocking the acceptance of relative paths by throwing errors is a relatively harsh change that has made it difficult for downstream libraries (e.g., eslint) to upgrade. Given that relative paths have undefined treatment in ".gitignore" and the usage of this library beyond ".gitignore" behavior, it seems fair to give downstream users the chance to customize the handling of these cases for their own cases. xref: kaelzhang#20
I think
node-ignore
should not filter relative paths starting with./
or../
Similarly, relative ignore paths should be discarded as invalid:
The text was updated successfully, but these errors were encountered: