<commit_before>var fork = require('child_process').fork
var filewatcher = require('filewatcher')
var ipc = require('./ipc')
var resolveMain = require('./resolveMain')
var compiler = require('./compiler')
var fs = require('fs')
var tsNodeVersion = require('ts-node').VERSION
var tsVersion = require('typescript').version
var kill = require('tree-kill')
var readline = require('readline')

module.exports = function(script, scriptArgs, nodeArgs, opts) {
  if (typeof script !== 'string' || script.length === 0) {
    throw new TypeError('`script` must be a string')
  }

  if (!Array.isArray(scriptArgs)) {
    throw new TypeError('`scriptArgs` must be an array')
  }

  if (!Array.isArray(nodeArgs)) {
    throw new TypeError('`nodeArgs` must be an array')
  }

  // The child_process
  var child

  var wrapper = resolveMain(__dirname + '/wrap.js')
  var main = resolveMain(script)
  var cfg = require('./cfg')(main, opts)
  var log = require('./log')(cfg)
  var notify = require('./notify')(cfg, log)
  opts.log = log
  compiler.init(opts)

  compiler.notify = notify
  compiler.stop = stop
  // Run ./dedupe.js as preload script
  if (cfg.dedupe) process.env.NODE_DEV_PRELOAD = __dirname + '/dedupe'

  var watcher = filewatcher({
    forcePolling: opts.poll,
    interval: parseInt(opts.interval),
    debounce: parseInt(opts.debounce),
    recursive: true
  })
  var starting = false
  watcher.on('change', restart)

  watcher.on('fallback', function(limit) {
    log.warn('node-dev ran out of file handles after watching %s files.', limit)
    log.warn('Falling back to polling which uses more CPU.')
    log.info('Run ulimit -n 10000 to increase the file descriptor limit.')
    if (cfg.deps) log.info('... or add `--no-deps` to use less file handles.')
  })<commit_msg>disable recusive on linux<commit_after>var fork = require('child_process').fork
var filewatcher = require('filewatcher')
var ipc = require('./ipc')
var resolveMain = require('./resolveMain')
var compiler = require('./compiler')
var fs = require('fs')
var tsNodeVersion = require('ts-node').VERSION
var tsVersion = require('typescript').version
var kill = require('tree-kill')
var readline = require('readline')

module.exports = function(script, scriptArgs, nodeArgs, opts) {
  if (typeof script !== 'string' || script.length === 0) {
    throw new TypeError('`script` must be a string')
  }

  if (!Array.isArray(scriptArgs)) {
    throw new TypeError('`scriptArgs` must be an array')
  }

  if (!Array.isArray(nodeArgs)) {
    throw new TypeError('`nodeArgs` must be an array')
  }

  // The child_process
  var child

  var wrapper = resolveMain(__dirname + '/wrap.js')
  var main = resolveMain(script)
  var cfg = require('./cfg')(main, opts)
  var log = require('./log')(cfg)
  var notify = require('./notify')(cfg, log)
  opts.log = log
  compiler.init(opts)

  compiler.notify = notify
  compiler.stop = stop
  // Run ./dedupe.js as preload script
  if (cfg.dedupe) process.env.NODE_DEV_PRELOAD = __dirname + '/dedupe'

  var watcher = filewatcher({
    forcePolling: opts.poll,
    interval: parseInt(opts.interval),
    debounce: parseInt(opts.debounce),
    recursive: process.platform !== 'linux'
  })
  var starting = false
  watcher.on('change', restart)

  watcher.on('fallback', function(limit) {
    log.warn('node-dev ran out of file handles after watching %s files.', limit)
    log.warn('Falling back to polling which uses more CPU.')
    log.info('Run ulimit -n 10000 to increase the file descriptor limit.')
    if (cfg.deps) log.info('... or add `--no-deps` to use less file handles.')
  })
{'fraction_non_alphanumeric': 0.14771460423634336, 'fraction_numerical': 0.0033444816053511705, 'mean_word_length': 3.8963165075034105, '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': '7095755', 'n_tokens_mistral': 1146, 'n_tokens_neox': 1112, 'n_words': 330}