You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As it is, I think the stage plugin is already an awesome feature that really comes in handy when staging modifications after adding a dependency. One thing that I think could be improved is how it handles the file package.json. It would be nice if it only staged modifications related to dependency management (and maybe other fields yarn modifies).
I have a use case: I'm writing a script that I have declared in the "scripts" section of my package.json. I figured I needed package x, so I decided to add it with yarn add and then staged the addition with yarn stage. The problem is that my addition to the "scripts" section of package.json ended up being staged too. Because of that, I need to call git reset -p in order to unstage hunks that are not the result of yarn add.
It would be great if only relevant parts of package.json were staged with yarn stage. What are your thoughts on that?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi there.
As it is, I think the
stage
plugin is already an awesome feature that really comes in handy when staging modifications after adding a dependency. One thing that I think could be improved is how it handles the filepackage.json
. It would be nice if it only staged modifications related to dependency management (and maybe other fields yarn modifies).I have a use case: I'm writing a script that I have declared in the "scripts" section of my
package.json
. I figured I needed package x, so I decided to add it withyarn add
and then staged the addition withyarn stage
. The problem is that my addition to the "scripts" section ofpackage.json
ended up being staged too. Because of that, I need to callgit reset -p
in order to unstage hunks that are not the result ofyarn add
.It would be great if only relevant parts of
package.json
were staged withyarn stage
. What are your thoughts on that?Beta Was this translation helpful? Give feedback.
All reactions