<commit_before>language: node_js
node_js:
  - "0.8"
  - "0.10"
  - "0.12"
  - "1.8"
  - "2.5"
  - "3.3"
  - "4.9"
  - "5.12"
  - "6.14"
  - "7.10"
  - "8.13"
  - "9.11"
  - "10.6"
sudo: false
cache:
  directories:
    - node_modules
before_install:
  # Skip updating shrinkwrap / lock
  - "npm config set shrinkwrap false"
  # Setup Node.js version-specific dependencies
  - "test $TRAVIS_NODE_VERSION != '0.8' || npm rm --save-dev istanbul"
  - "test $(echo $TRAVIS_NODE_VERSION | cut -d. -f1) -ge 6 || npm rm --save-dev $(grep -E '\"eslint\\S*\"' package.json | cut -d'\"' -f2)"
  # Update Node.js modules
  - "test ! -d node_modules || npm prune"
  - "test ! -d node_modules || npm rebuild"
script:
  # Run test script, depending on istanbul install
  - "test ! -z $(npm -ps ls istanbul) || npm test"
  - "test   -z $(npm -ps ls istanbul) || npm run-script test-ci"
  - "test   -z $(npm -ps ls eslint  ) || npm run-script lint"
after_script:
  - "test -e ./coverage/lcov.info && npm install coveralls@2 && cat ./coverage/lcov.info | coveralls"<commit_msg>build: restructure Travis CI build steps<commit_after>language: node_js
node_js:
  - "0.8"
  - "0.10"
  - "0.12"
  - "1.8"
  - "2.5"
  - "3.3"
  - "4.9"
  - "5.12"
  - "6.14"
  - "7.10"
  - "8.13"
  - "9.11"
  - "10.6"
sudo: false
cache:
  directories:
    - node_modules
before_install:
  # Configure npm
  - |
    # Skip updating shrinkwrap / lock
    npm config set shrinkwrap false
  # Setup Node.js version-specific dependencies
  - |
    # eslint for linting
    # - remove on Node.js < 6
    if [[ "$(cut -d. -f1 <<< "$TRAVIS_NODE_VERSION")" -lt 6 ]]; then
      node -pe 'Object.keys(require("./package").devDependencies).join("\n")' | \
        grep -E '^eslint(-|$)' | \
        xargs npm rm --save-dev
    fi
  - |
    # istanbul for coverage
    # - remove on Node.js < 0.10
    if [[ "$(cut -d. -f1 <<< "$TRAVIS_NODE_VERSION")" -eq 0 && "$(cut -d. -f2 <<< "$TRAVIS_NODE_VERSION")" -lt 10 ]]; then
      npm rm --silent --save-dev istanbul
    fi
  # Update Node.js modules
  - |
    # Prune and rebuild node_modules
    if [[ -d node_modules ]]; then
      npm prune
      npm rebuild
    fi
script:
  - |
    # Run test script, depending on istanbul install
    if npm -ps ls istanbul | grep -q istanbul; then
      npm run-script test-ci
    else
      npm test
    fi
  - |
    # Run linting, depending on eslint install
    if npm -ps ls eslint | grep -q eslint; then
      npm run-script lint
    fi
after_script:
  - |
    # Upload coverage to coveralls if exists
    if [[ -f ./coverage/lcov.info ]]; then
      npm install --save-dev coveralls@2
      coveralls < ./coverage/lcov.info
    fi
{'fraction_non_alphanumeric': 0.16142322097378278, 'fraction_numerical': 0.03220973782771536, 'mean_word_length': 2.1497641509433962, 'pattern_counts': {'":': 0, '<': 15, '<?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': '1292227', 'n_tokens_mistral': 1115, 'n_tokens_neox': 1044, 'n_words': 288}