<commit_before>#!/bin/sh
# Spec Runner

# To make this file runnable:
#     $ chmod +x *.sh.command

projectHome=$(cd $(dirname $0); pwd)

info() {
   # Check for Node.js installation and download project dependencies
    cd $projectHome
    pwd
    echo
    echo "Node.js:"
    which node || { echo "Need to install Node.js: https://nodejs.org"; exit; }
    node --version
    test -d node_modules || npm install
    npm update
    npm outdated
    echo
    }

showVersions() {
    cd $projectHome
    echo "Local changes:"
    git status --short
    echo
    echo "Releases:"
    git tag
    echo
    echo "Current version:"
    versionLocal=v$(grep '"version"' package.json | awk -F'"' '{print $4}')
    echo $versionLocal
    echo
    echo "To publish release:"
    echo "   cd $projectHome"
    echo "   git tag -af $versionLocal -m release"
    echo "   git remote -v"
    echo "   git push origin --tags --force"
    echo "   npm publish"
    echo
    }

echo
echo "node-fetch-json"
echo "==============="
info
showVersions
npm test
echo
node read-me-example.js
echo
<commit_msg>New version of npm installs faster<commit_after>#!/bin/sh
# Spec Runner

# To make this file runnable:
#     $ chmod +x *.sh.command

projectHome=$(cd $(dirname $0); pwd)

info() {
   # Check for Node.js installation and download project dependencies
    cd $projectHome
    pwd
    echo
    echo "Node.js:"
    which node || { echo "Need to install Node.js: https://nodejs.org"; exit; }
    node --version
    npm install
    npm update
    npm outdated
    echo
    }

showVersions() {
    cd $projectHome
    echo "Local changes:"
    git status --short
    echo
    echo "Releases:"
    git tag
    echo
    echo "Current version:"
    versionLocal=v$(grep '"version"' package.json | awk -F'"' '{print $4}')
    echo $versionLocal
    echo
    echo "To publish release:"
    echo "   cd $projectHome"
    echo "   git tag -af $versionLocal -m release"
    echo "   git remote -v"
    echo "   git push origin --tags --force"
    echo "   npm publish"
    echo
    }

echo
echo "node-fetch-json"
echo "==============="
info
showVersions
npm test
echo
node read-me-example.js
echo

{'fraction_non_alphanumeric': 0.12494236975564776, 'fraction_numerical': 0.0018441678192715537, 'mean_word_length': 2.494363929146538, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1035631', 'n_tokens_mistral': 713, 'n_tokens_neox': 691, 'n_words': 240}