title: "npm update" is installing a beta version of the module over the stable version that installed after "npm install"
body: <p>Currently the npm package <a href="https://www.npmjs.org/package/mongoose" rel="noreferrer">mongoose</a> is on version 3.8.12. Running <code>npm install mongoose --save</code> correctly installs version 3.8.12 and saves the dependency to package.json as follows:</p>
  <pre><code>&quot;dependencies&quot;: {
    &quot;mongoose&quot;: &quot;^3.8.12&quot;
  }
  </code></pre>
  <p>If you look in <code>node_modules/mongoose/package.json</code> you can see that the installed version is indeed 3.8.12. However, if I now run <code>npm update</code> then npm will go ahead and install an unstable version of mongoose (3.9.0). I assume this is because of the caret in the dependency entry which tells npm to go ahead and upgrade minor versions (i.e. 3.8 to 3.9). That's fine, except I don't want any prerelease versions. If I modify the dependency and remove the caret then <code>npm update</code> works as expected, except of course that I now have to manually upgrade the dependency version even for minor and patch updates.</p>
  <p>You can see from running <code>npm info mongoose</code> that they have a &quot;latest&quot; tag and an &quot;unstable&quot; tag.</p>
  <p><img src="https://i.imgur.com/bdQLC9U.png" alt="" /></p>
  <p>So clearly <code>npm install</code> uses latest unless otherwise specified, while <code>npm update</code> is ignoring the tag altogether and grabbing the latest minor version it's aware of.</p>
  <p>Is there a way to modify the dependency so <code>npm update</code> will pull in the latest minor version but ignore any prerelease versions?</p>
  <h2>UPDATE</h2>
  <p>Same issue occurs if I try to use <code>3.x.x</code> as the dependency. I was hoping that would still allow me to upgrade through minor versions without prerelease versions but that's not the case :/</p>
  <p>Tilde (<code>~3.8.12</code>) technically works but it's a bandaid. The only reason it &quot;works&quot; is because the breaking changes being introduced are in <code>3.9.0-unstable</code> and tilde doesn't allow npm to upgrade across minor versions. If these &quot;unstable&quot; changes were introduced in <code>3.8.13-unstable</code> then this same issue would occur even when using the tilde.</p>
  <h2>UPDATE 2</h2>
  <p>I also tried manually specifying the &quot;latest&quot; tag: <code>^3.8.12-latest</code>. That didn't change anything; <code>npm update</code> ignores the tag entirely, even if it's explicitly in the dependency listing itself :/</p>