<commit_before>#!/bin/sh
echo "beginning ng-annotate defs-build"
rm -rf es5
mkdir es5

declare -a files=(ng-annotate.js ng-annotate-main.js run-tests.js)
for i in ${files[@]}
do
  echo "building $i with defs"
  ../node_modules/.bin/defs ../$i > es5/$i
done

cp ng-annotate es5/

echo "hard-coding version"
node --harmony inline-version.js

cd es5

echo "running tests (in es5 mode i.e. without --harmony)"
cp -r ../../tests .
/usr/bin/env node run-tests.js
echo "done self-build"
<commit_msg>build<commit_after>#!/bin/sh
echo "beginning ng-annotate defs-build"
rm -rf es5
mkdir es5

declare -a files=(ng-annotate.js ng-annotate-main.js run-tests.js)
DEFS="../node_modules/.bin/defs"
if [[ ! -f "$DEFS" ]]; then DEFS="../../../../node_modules/.bin/defs" ; fi
if [[ ! -f "$DEFS" ]]; then DEFS="defs" ; fi

for i in ${files[@]}
do
  echo "building $i with defs"
  $DEFS ../$i > es5/$i
done

cp ng-annotate es5/

echo "hard-coding version"
node --harmony inline-version.js

cd es5

echo "running tests (in es5 mode i.e. without --harmony)"
cp -r ../../tests .
/usr/bin/env node run-tests.js
echo "done self-build"

{'fraction_non_alphanumeric': 0.18288288288288287, 'fraction_numerical': 0.010810810810810811, 'mean_word_length': 3.0547445255474455, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '1492831', 'n_tokens_mistral': 448, 'n_tokens_neox': 434, 'n_words': 129}