<commit_before>var fs = require('fs');
var resolve = require('path').resolve;
var join = require('path').join;
var cp = require('child_process');

// get library path
var lib = resolve(__dirname);

fs.readdirSync(lib).forEach(function(mod) {
  var modPath = join(lib, mod);
  // ensure path has package.json
  if (!fs.existsSync(join(modPath, 'package.json'))) return;

  // Determine OS and set command accordingly
  const cmd = /^win/.test(process.platform) ? 'npm.cmd' : 'npm';

  // install folder
  cp.spawn(cmd, ['install'], { env: process.env, cwd: modPath, stdio: 'inherit' });
});<commit_msg>Change install to ci to avoid messing with package-lock.json (#3758)<commit_after>var fs = require('fs');
var resolve = require('path').resolve;
var join = require('path').join;
var cp = require('child_process');

// get library path
var lib = resolve(__dirname);

fs.readdirSync(lib).forEach(function(mod) {
  var modPath = join(lib, mod);
  // ensure path has package.json
  if (!fs.existsSync(join(modPath, 'package.json'))) return;

  // Determine OS and set command accordingly
  const cmd = /^win/.test(process.platform) ? 'npm.cmd' : 'npm';

  // install folder
  cp.spawn(cmd, ['ci'], { env: process.env, cwd: modPath, stdio: 'inherit' });
});
{'fraction_non_alphanumeric': 0.17492012779552715, 'fraction_numerical': 0.003194888178913738, 'mean_word_length': 4.495614035087719, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5063593', 'n_tokens_mistral': 415, 'n_tokens_neox': 400, 'n_words': 113}