<commit_before>#!/usr/bin/env bash

set -u -e -o pipefail

TRAVIS=${TRAVIS:-}
CI_MODE=${CI_MODE:-}

# Setup environment
readonly thisDir=$(cd $(dirname $0); pwd)
source ${thisDir}/_travis-fold.sh


# If the previous commands in the `script` section of .travis.yaml failed, then abort.
# The variable is not set in early stages of the build, so we default to 0 there.
# https://docs.travis-ci.com/user/environment-variables/
if [[ ${TRAVIS_TEST_RESULT=0} == 1 ]]; then
  exit 1;
fi


mkdir -p ${LOGS_DIR}


# TODO: install nvm?? it's already on travis so we don't need it
#curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash


# Install node
#nvm install ${NODE_VERSION}


# Install version of npm that we are locked against
travisFoldStart "install-npm"
  npm install -g npm@${NPM_VERSION}
travisFoldEnd "install-npm"


# Install all npm dependencies according to shrinkwrap.json
travisFoldStart "npm-install"
  node tools/npm/check-node-modules --purge || npm install
travisFoldEnd "npm-install"

<commit_msg>ci: short-circuit npm install for aio builds that use yarn only<commit_after>#!/usr/bin/env bash

set -u -e -o pipefail

TRAVIS=${TRAVIS:-}
CI_MODE=${CI_MODE:-}

# Setup environment
readonly thisDir=$(cd $(dirname $0); pwd)
source ${thisDir}/_travis-fold.sh


# If the previous commands in the `script` section of .travis.yaml failed, then abort.
# The variable is not set in early stages of the build, so we default to 0 there.
# https://docs.travis-ci.com/user/environment-variables/
if [[ ${TRAVIS_TEST_RESULT=0} == 1 ]]; then
  exit 1;
fi


mkdir -p ${LOGS_DIR}


# TODO: install nvm?? it's already on travis so we don't need it
#curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash


# Install node
#nvm install ${NODE_VERSION}

if [[ ${CI_MODE} != "aio" && ${CI_MODE} != 'docs_test' ]]; then
  # Install version of npm that we are locked against
  travisFoldStart "install-npm"
    npm install -g npm@${NPM_VERSION}
  travisFoldEnd "install-npm"


  # Install all npm dependencies according to shrinkwrap.json
  travisFoldStart "npm-install"
    node tools/npm/check-node-modules --purge || npm install
  travisFoldEnd "npm-install"
fi


{'fraction_non_alphanumeric': 0.1286101083032491, 'fraction_numerical': 0.008122743682310469, 'mean_word_length': 4.096551724137931, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '4854020', 'n_tokens_mistral': 821, 'n_tokens_neox': 770, 'n_words': 243}