<commit_before>'use strict';

const _              = require('lodash');
const updateNotifier = require('update-notifier');

/**
 * Expose a CLI with given actions as subcommands
 * @param {Array} actions Array of subclasses of Action
 * @param {Object} pkg The package.json contents
 * @returns {Array}
 */
module.exports = function (actions, pkg) {

    updateNotifier({pkg}).notify();

    const yargs = require('yargs').usage('$0 <cmd> [args]');

    _.each(actions, Action => (new Action()).register(yargs));

    return yargs
        .help('h')
        .version()
        .alias('h', 'help')
        .alias('v', 'version')
        .argv;
};
<commit_msg>Fix error caused by aliasing "v" to "version" on yargs<commit_after>'use strict';

const _              = require('lodash');
const updateNotifier = require('update-notifier');

/**
 * Expose a CLI with given actions as subcommands
 * @param {Array} actions Array of subclasses of Action
 * @param {Object} pkg The package.json contents
 * @returns {Array}
 */
module.exports = function (actions, pkg) {

    updateNotifier({pkg}).notify();

    const yargs = require('yargs').usage('$0 <cmd> [args]');

    _.each(actions, Action => (new Action()).register(yargs));

    return yargs
        .help('h')
        .version()
        .alias('h', 'help')
        .argv;
};

{'fraction_non_alphanumeric': 0.16289592760180996, 'fraction_numerical': 0.0015082956259426848, 'mean_word_length': 3.108359133126935, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '7163888', 'n_tokens_mistral': 408, 'n_tokens_neox': 391, 'n_words': 115}