title: How to update package-lock.json without doing npm install?
body: <p><strong>Question</strong></p>
  <p>What is the way to update/generate <code>package-lock.json</code> without making a real installation of <code>node_modules</code> (what <code>npm install</code> does)?</p>
  <p>I want just a valid <code>package-lock.json</code> based on my <code>package.json</code>, that's it.</p>
  <p><strong>Motivation</strong></p>
  <p>You might use <code>yarn</code> locally, when CI server uses <code>npm</code>. It's probably not the best practice, but still might ok as a temporary solution.</p>
  <p><strong>Bonus question</strong>: Same for <code>yarn</code>. Is it possible to generate <code>yarn-lock.json</code> without doing a real installation?</p>