<h3 dir="auto">Is there an existing issue for this?</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the existing issues</li>
</ul>
<h3 dir="auto">Current Behavior</h3>
<p dir="auto">I have a project using NPM 7 workspaces. One package is named <code class="notranslate">button</code>.</p>
<p dir="auto">If I run <code class="notranslate">npm -w button version minor</code>, then the version number in button's <code class="notranslate">package.json</code> gets incremented as I would expect. However, the root-level <code class="notranslate">package-lock.json</code> does not get modified.</p>
<p dir="auto">If I later run an <code class="notranslate">npm -w button install</code> then the value in <code class="notranslate">packages.button.version</code> gets updated to reflect the current version.</p>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">I would expect the value at <code class="notranslate">packages.button.version</code> in the root-level <code class="notranslate">package-lock.json</code> file to get updated at the same time as button's <code class="notranslate">package.json</code>, when the <code class="notranslate">npm version</code> command is run.</p>
<h3 dir="auto">Steps To Reproduce</h3>
<ol dir="auto">
<li>Set up a project with one package, run <code class="notranslate">npm --workspaces install</code> to generate basic <code class="notranslate">package-lock.json</code></li>
<li>Run <code class="notranslate">npm -w [package name] version minor</code></li>
<li>See that the package's <code class="notranslate">package.json</code> has been updated but the root level <code class="notranslate">package-lock.json</code> has not</li>
<li>Run <code class="notranslate">npm -w [package name] install</code></li>
<li>See that the root level <code class="notranslate">package-lock.json</code> has one change in it: the sub-package's version number.</li>
</ol>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>OS: macOS 11.5.2</li>
<li>Node: 16.7.0</li>
<li>npm: 7.20.3</li>
</ul>
<h3 dir="auto">Is there an existing issue for this?</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the existing issues</li>
</ul>
<h3 dir="auto">Current Behavior</h3>
<p dir="auto">Workspace<br>
Package A</p>
<p dir="auto">Package B<br>
peerDependencies<br>
Package A</p>
<p dir="auto">I have the following situation, where Package B has a peerDependency of Package A.</p>
<p dir="auto">I run npm version 1.2.3 --workspaces</p>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">I would expect:</p>
<ul dir="auto">
<li>
<p dir="auto">The versions of Package A and Package B to be updated to 1.2.3<br>
This works as expected</p>
</li>
<li>
<p dir="auto">The version of the Package A peerDependency in Package B to be updated to 1.2.3<br>
This doesn't work as expected</p>
</li>
</ul>
<h3 dir="auto">Steps To Reproduce</h3>
<ol dir="auto">
<li>Please see above</li>
</ol>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>OS:  Windows 10</li>
<li>Node: 16.8.0</li>
<li>npm: 7.21.0</li>
</ul>