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

"yarn version" command commits unstaged changes in package.json #7690

Open
jdolearydl opened this issue Nov 14, 2019 · 1 comment
Open

"yarn version" command commits unstaged changes in package.json #7690

jdolearydl opened this issue Nov 14, 2019 · 1 comment

Comments

@jdolearydl
Copy link

Do you want to request a feature or report a bug?
bug

What is the current behavior?
Yarn will commit unstaged changes to package.json when it increments the version during yarn version --<version type>

If the current behavior is a bug, please provide the steps to reproduce.

  1. Make a change to package.json and do not stage the change
  2. Run yarn version --minor
  3. Observe that the unstaged change in package.json has been committed along with the automatic change of incrementing the version.

What is the expected behavior?
I would assume that yarn would warn and/or abort if package.json has other changes.

Please mention your node.js, yarn and operating system version.
Windows 10, Node v10.15.1, Yarn v1.19.1

@jdolearydl jdolearydl changed the title yarn version commits unstaged changes in package.json "yarn version" command commits unstaged changes in package.json Nov 14, 2019
@ghost
Copy link

ghost commented Apr 15, 2020

You bring up a good point. I would also like a warning and confirmation would come up.

This seems like more of a feature request than a bug since the original behavior looks like the intended functionality.

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

1 participant