title: Run a set of yarn commands sequentially in a node script
body: <p>I want to use yarn commands sequentially and run it in a node script, in the intermediate steps, and mix it with js as needed. For example</p>
  <pre><code>yarn audit &gt; out.json
  
  //some file reading, processing, and storage
  
  for(i = 0; i &lt; libs.length; i++) {
  
      yarn add lib1@v1.1.1 //need to run this in a loop
      //print the console output as this is being done
  }
  </code></pre>
  <p>Is the above possible in node js or any other script that can be used in a node project?</p>