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

Package.json is being ignore if part of the full path matches #253

Open
chrisgalvan opened this issue Jul 7, 2018 · 4 comments
Open

Package.json is being ignore if part of the full path matches #253

chrisgalvan opened this issue Jul 7, 2018 · 4 comments

Comments

@chrisgalvan
Copy link

My package.json and package-lock.json are being ignored by https://github.com/conventional-changelog/standard-version when trying to bump the version, the reason is that the full path of my package.json contains some words or matches with some specification in .gitignore file

let's say I have this

# ignore user files
/user/
*.user*

and my project is in the following path

c:/users/myuser/dev/myapp/

so this always evaluates to true:

if (dotgit.ignore(configPath)) return

I have posted something related in the PR #230

@alerque
Copy link

alerque commented Oct 14, 2019

This just bit me. I have time*.json in my git ignore list, and it blocked bumping the version in package.json. Whatever pseudo-parsing is causing this is ridiculous and really needs to be fixed and brought inline with actual gitignore parsing. Searching through issues before I found this turned up lots of things that are probably related.

@alerque
Copy link

alerque commented Oct 14, 2019

Actually it turns out I had a layered issue on top of this one that is related but not quite the same: but also a too-greedy match being done. See bcoe/dotgitignore#7

@amoshydra
Copy link

Thinking of the possible fixes here:

Option 1:

Spawn and parse the output of git check-ignore

Option 2:

Re-implement / update the gitignore algorithm in JavaScript inside the dotgitignore library to match the one from git.


For the purpose of standard-version, given that git is already required / used in the environment.

What do you think if we go with option 1 and rely on git to perform the check instead?

@amoshydra
Copy link

amoshydra commented Sep 4, 2022

This issue is fixed in absolute-version#1

Tested with [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants