title: Correct way to use yarn/npm from node script
body: <p>Inside my script I want to use some functionality from <code>yarn</code>/<code>npm</code></p>
  
  <p>Like get results of <code>yarn info packageName</code>. I could spawn command and get output, but I believe there should be more correct way to do that. </p>
  
  <p>Can't find any documentation about usage of <code>yarn</code> as package. Any ideas?</p>