<commit_before>'use strict';
var cp = require('child_process');
var fs = require('fs');
var path = require('path');

var _ = require('lodash');
var async = require('neo-async');
var cchangelog = require('conventional-changelog');
var semver = require('semver');

var COMMIT_PATTERN = /^(\w*)(\(([\w\$\.\-\* ]*)\))?\: (.*)$/;

function getUrl() {
  return require(path.join(__dirname, '..', 'package.json')).homepage;
}

module.exports = function(url, callback) {
  if (arguments.length === 1) {
    callback = url;
    url = null;
  }
  if (!url)
    url = getUrl();

  var dates = {};
  async.waterfall([
    function(next) {
      cp.exec('git for-each-ref --format "%(refname:short) %09 %(taggerdate:short)" refs/tags', function(err, stdout) {
        if (err)
          return next(err);

        var list = [];
        String(stdout).split('\n').forEach(function(v) {<commit_msg>fix(main) default callback<commit_after>'use strict';
var cp = require('child_process');
var fs = require('fs');
var path = require('path');

var _ = require('lodash');
var async = require('neo-async');
var cchangelog = require('conventional-changelog');
var semver = require('semver');

var COMMIT_PATTERN = /^(\w*)(\(([\w\$\.\-\* ]*)\))?\: (.*)$/;

function getUrl() {
  return require(path.join(__dirname, '..', 'package.json')).homepage;
}

function defaultCallback(err) {
  if (err) {
    console.error(err);
  }
}

module.exports = function(url, callback) {
  if (arguments.length === 0) {
    callback = defaultCallback;
    url = null;
  }
  if (arguments.length === 1) {
    if (typeof url === 'function') {
      callback = url;
      url = null;
    } else {
      callback = defaultCallback;
    }
  }
  if (!url)
    url = getUrl();

  var dates = {};
  async.waterfall([
    function(next) {
      cp.exec('git for-each-ref --format "%(refname:short) %09 %(taggerdate:short)" refs/tags', function(err, stdout) {
        if (err)
          return next(err);

        var list = [];
        String(stdout).split('\n').forEach(function(v) {
{'fraction_non_alphanumeric': 0.2049140049140049, 'fraction_numerical': 0.0034398034398034397, 'mean_word_length': 3.2416666666666667, 'pattern_counts': {'":': 0, '<': 3, '<?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': '6824309', 'n_tokens_mistral': 705, 'n_tokens_neox': 691, 'n_words': 149}