e>npm update -S</code> or <code>npm update --save</code>.  For example if
<code>package.json</code> contains:</p>
<pre><code>&quot;dependencies&quot;: {
  &quot;dep1&quot;: &quot;^1.1.1&quot;
}
</code></pre><p>Then <code>npm update --save</code> will install <code>dep1@1.2.2</code> (i.e., <code>latest</code>),
and <code>package.json</code> will be modified:</p>
<pre><code>&quot;dependencies&quot;: {
  &quot;dep1&quot;: &quot;^1.2.2&quot;
}
</code></pre><p>Note that <code>npm</code> will only write an update