title: List NPM workspaces similar to lerna ls
body: <p>I'm looking for an NPM command similar to <code>lerna ls</code> that would print out all workspaces.</p>
  <p>For example, let's say I have <code>package1</code> and <code>package2</code> in a <code>packages</code> sub-directory and my package.json looks like this:</p>
  <pre><code>&quot;workspaces&quot;: [
   &quot;./packages/*&quot;
  ]
  </code></pre>
  <p>I would like to get a list of NPM 7 workspaces. For the example I would expect:</p>
  <ul>
  <li>packages/package1</li>
  <li>packages/package2</li>
  </ul>
  <p>I was hoping <code>npm ls -p --depth 0</code> would do this, but unfortunately it's printing out other dependencies as well.</p>
  <p>I guess I could use <code>npm ls -json</code> and parse out the top level dependencies. However, I'm hoping there's a better way?</p>