title: How does `npm outdated -g` actually work?
body: <p>I have some globally installed packages and I want to update some of them. I checked with </p>
  
  <pre><code>$ npm outdated -g
  Package                 Current  Wanted  Latest  Location
  eslint                   5.16.0  5.16.0   6.8.0  global
  jshint                   2.10.2  2.11.0  2.11.0  global
  n                        2.1.12  2.1.12   6.2.0  global
  npx                      10.2.0  10.2.2  10.2.2  global
  </code></pre>
  
  <p>I tried </p>
  
  <pre><code>$ npm update -g eslint --dd
  </code></pre>
  
  <p>but I got the message </p>
  
  <pre><code>outdated not updating eslint because it's currently at the maximum version that matches its specified semver range
  </code></pre>
  
  <p>I checked the documentation with </p>
  
  <pre><code>$ npm help outdated
  </code></pre>
  
  <blockquote>
    <ul>
    <li><strong>wanted</strong> is the maximum version of the package that satisfies the
    semver range specified in <strong>package.json</strong>. If there's no available semver
    range (i.e.  you're running <strong>npm outdated --global</strong>, or the package isn't included in <strong>package.json</strong>), then <strong>wanted</strong> shows the currently-installed version.</li>
    </ul>
  </blockquote>
  
  <p>But that's obviously not true because </p>
  
  <pre><code>$ npm update -g jshint
  </code></pre>
  
  <p>worked and the values of <code>Current</code> and <code>Wanted</code> for the package <code>jshint</code> were different before the update. How is the value of <code>wanted</code> actually defined?</p>
  
  <p>Sidequestion: What is the npm-way to update all outdated packages and what is the npm-way to update one package?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>To check if it's related to major and minor version numbers I installed</p>
  
  <pre><code>$ npm install -g n@6.1.0
  $ npm install -g eslint@6.7.0
  $ npm install -g generator-wombytes-cpp@0.2.0
  </code></pre>
  
  <p>and I updated the other packages. Now the output is</p>
  
  <pre><code>$ npm outdated -g
  Package                 Current  Wanted  Latest  Location
  eslint                    6.7.0   6.8.0   6.8.0  global
  generator-wombytes-cpp    0.2.0   0.2.0   0.3.0  global
  n                         6.1.0   6.2.0   6.2.0  global
  </code></pre>
  
  <p>There is a different behavior for these packages.</p>