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

Bump files are skipped using absolute path file #902

Open
vallsv opened this issue May 7, 2022 · 2 comments · Fixed by absolute-version/commit-and-tag-version#1 · May be fixed by #903
Open

Bump files are skipped using absolute path file #902

vallsv opened this issue May 7, 2022 · 2 comments · Fixed by absolute-version/commit-and-tag-version#1 · May be fixed by #903
Labels

Comments

@vallsv
Copy link

vallsv commented May 7, 2022

Hi,

standard-version was never bumping package.json on one of my project.

After some checks it looks like the file is filtered based on the absolute path of the file.
As result dotgitignore can incorrectly answer that a file is ignored by .gitignore based on parent directory not part of the project.

How to reproduce

  • create a js project in /home/user/myproject/ with package.json
  • create a .gitignore containing home
  • try to release a new version
  • package.json is not updated because the abs path /home/user/myproject/package.json contains home

Current behavior

My package.json is not bumped.

Expected behavior

My package.json have to be bumped.

Environment

Possible Solution

Use relative path instead of absolute path for configFiles

@vallsv vallsv added the bug label May 7, 2022
@vallsv vallsv changed the title Bump file are skipped using absolute path file Bump files are skipped using absolute path file May 7, 2022
@vallsv vallsv linked a pull request May 7, 2022 that will close this issue
@vallsv
Copy link
Author

vallsv commented May 7, 2022

I also don't really understand why files are filtered based on .gitignore.
For example why would you not bump package-lock.json even if it is part of the .gitignore?
But that's another question anyway.

@acidicX
Copy link

acidicX commented May 19, 2022

Just stumbled onto the same bug, thanks for reporting @vallsv

(same behaviour on 9.5.0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 participants