<commit_before>#!/usr/bin/env node
const assert = require('assert')
const fs = require('fs')
const path = require('path')
const util = require('util')

const chalk = require('chalk')
const cheerio = require('cheerio')
const globby = require('globby')
const merge = require('lodash/merge')
const parser = require('@babel/parser')
const traverse = require('@babel/traverse').default

const log = i => console.log(i, '\n')
const objectLog = o => console.log(util.inspect(o, false, null, true), '\n')

const DEFAULT_UNAMED = 'default (unnamed)'

module.exports = class Shrimpit {
  constructor(argv) {
    // Remove execPath and path from argv.
    const [, , ...src] = argv

    this.allowedTypes = /^\.(jsx?|tsx?|vue)$/
    this.filesTree = {}
    this.namespaceImports = []
    this.isVueTemplate = /^\.vue$/
    this.modules = {
      exports: [],
      imports: [],
    }
    this.src = this.cleanSrc(src)
    this.parseOpts = {<commit_msg>Support the .mjs file extension<commit_after>#!/usr/bin/env node
const assert = require('assert')
const fs = require('fs')
const path = require('path')
const util = require('util')

const chalk = require('chalk')
const cheerio = require('cheerio')
const globby = require('globby')
const merge = require('lodash/merge')
const parser = require('@babel/parser')
const traverse = require('@babel/traverse').default

const log = i => console.log(i, '\n')
const objectLog = o => console.log(util.inspect(o, false, null, true), '\n')

const DEFAULT_UNAMED = 'default (unnamed)'

module.exports = class Shrimpit {
  constructor(argv) {
    // Remove execPath and path from argv.
    const [, , ...src] = argv

    this.allowedTypes = /^\.(mjs|jsx?|tsx?|vue)$/
    this.filesTree = {}
    this.namespaceImports = []
    this.isVueTemplate = /^\.vue$/
    this.modules = {
      exports: [],
      imports: [],
    }
    this.src = this.cleanSrc(src)
    this.parseOpts = {
{'fraction_non_alphanumeric': 0.17121848739495799, 'fraction_numerical': 0.0, 'mean_word_length': 3.6237864077669903, 'pattern_counts': {'":': 0, '<': 3, '<?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': '7596565', 'n_tokens_mistral': 636, 'n_tokens_neox': 623, 'n_words': 152}