-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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 add
in workspace adds to dependencies
when it should update devDependencies
#4971
Comments
yarn add
in workspace adds to dependencies
when it should update devDependencies
@greysteil I believe that's the correct behavior, since you should use |
So
|
Sorry for the delay! So I was able to verify this bug on my end. |
|
I can confirm that upgrading
|
--dev is not working for me, it just adds to dependencies |
In my case, if I tried to install packages available at npm registry, it successfully adds to devDependencies. |
@greysteil @kaylie-alexa below commands adds to devDependencies for me - Node: v12.16.3 |
So it looks like adding a local package that has the bug mentioned here #4878 will add it to the dependencies instead of devDependencies... Node: 12.18.5 |
Closing as this has been fixed in the v2. |
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
Changing directory into a workspace and using
yarn add nock
addsnock
to thedependencies
for the package.json, rather than updating the version indevDependencies
. Different versions ofnock
are then present within the same package.json in thedependencies
anddevDependencies
.I've created a repo so you can easily replicate, with a PR showing the erroneous result, here.
What is the expected behavior?
Yarn should update the
devDependencies
version of nock, like it would have done were we not in a workspace.Please mention your node.js, yarn and operating system version.
Node:
v8.9.1
Yarn:
v1.3.2
OS:
macOS 10.12.6
The text was updated successfully, but these errors were encountered: