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
yarn audit > out.json
//some file reading, processing, and storage
for(i = 0; i < 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
}
Is the above possible in node js or any other script that can be used in a node project?