-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
fix: version does not git-commit nor git-tag when package in subdir #5442
base: latest
Are you sure you want to change the base?
Conversation
3037d35
to
f3b0c43
Compare
101dc1c
to
e785185
Compare
Thanks for the new PR for this @timothybonci! It looks good so far, but CI is showing a few more tests in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
libnpmversion tests are passing but cli tests for commands/version
are failing.
Yep, I missed that test locally. Thanks for kicking off the workflows, and thanks for fixing the git config in the .github ci. I'll fire up the debugger. |
b2f450f
to
4e600d6
Compare
Aha, there was a bug in the internal caller in lib/commands/version.js where we were passing the flag instead of the option property, so we were never properly overriding gitTagVersion with false. These tests were passing before because we'd short circuit the doGit check on git.is returning false. Now that we use git.find and find the repo, we pass to the next check for doGit, which properly fails. Now that it's fixed, we short circuit on the very first check for gitTagVersion, and correctly don't attempt any git operations. Long story short, I think I fixed it. I'd appreciate another run of the workflows. |
@lukekarrys would you please approve the test workflows to test the latest changes? |
4e600d6
to
a6ba364
Compare
a6ba364
to
1237825
Compare
Rebased to latest and fixed the two outstanding lint issues. |
1237825
to
65200f2
Compare
Rebased to latest again. @lukekarrys could you review? |
65200f2
to
f7e70aa
Compare
Sorry for the delay in reviewing this @timothybonci. I am out for a few weeks and will review it when I get back. Thanks for your continued work on this! |
f7e70aa
to
174a06b
Compare
174a06b
to
815f6b0
Compare
815f6b0
to
f0b0251
Compare
f0b0251
to
13b3e99
Compare
13b3e99
to
73cdc04
Compare
f6f1d65
to
55932bc
Compare
@lukekarrys are there any updates on this? It has been quite a few weeks. As a newcomer to NPM, I wasted a lot of time trying to figure out why this feature is not working according to docs :(. |
bumping because I need this feature. |
This would be extremely helpful to get merged. I've wasted a few days trying to understand why this behavior is different from the official docs. Workarounds are nice, but it's better to get it fixed properly. |
ETA: it looks like this repo is still all unit tests. We're not asking you to implement this so the unit test will have to do for now |
We're also urgently waiting for this bugfix. @lukekarrys @wraithgar - If I understand the latest comment correctly, the PR is now ready to be merged? If not, what still needs to be done? Thank you all for your engagement in this product! |
@lukekarrys @wraithgar @timothybonci Wondering if there will be an progress made on this PR for this bug fix? |
I think what's left is to fix the merge conflicts and to make sure we're ok with the tag it will make. Workspaces need to be tagged differently than the root project because without any changes they will collide with each other and the root project (since the tag is only the version, it's not namespaced in any way) |
After a year of silence, I'm not going to contribute further. I'm relinquishing any possible claims I may have on anything I've written in these commits/MR. I wish you all the best of luck. |
Change the git detection to use git.find in order to walk up through directories to find the git repo.
Add use case for detecting if you're in a subdirectory that is a workspace, and make that case the exception for creating the commit and tag.
References
Fixes #2010