<commit_before>const path = require('path')
const webpack = require('webpack')
const chalk = require('chalk')
const figlet = require('figlet')
const boxen = require('boxen')
const formatWebpackMessages = require('react-dev-utils/formatWebpackMessages')

const log = {
  ok(...a) { console.log('::: ' + chalk.yellow(...a)) },
  warn(...a) { console.error('!!! ' + chalk.yellow(...a)) },
  err(...a) { console.error('!!! ' + chalk.red(...a)) },
  info(...a) { console.log('--- ' + chalk.blue(...a)) },
}

function noop() {}

function coloredBanner(text, colors = ['blue', 'red']) {
  const bannerText = text.replace(/\|/g, 'l') // In BigMoney font, 'l' (lowercase L) are much nicer than '|' (pipes)
  const bannerColors = { '$': colors[0], '_': colors[1], '|': colors[1], '\\': colors[1], '/': colors[1] }
  const banner = figlet.textSync(bannerText, { font: 'Big Money-nw' })
  const colored = banner.replace(/[^\s]/g, (c) => chalk[bannerColors[c] || 'white'](c))
  return `\n${colored}`
}

function yellowBox(message) {
  const boxenOptions = {
    padding: 1,
    align: 'center',
    borderColor: 'yellow',
  }

  return boxen(message, boxenOptions)
}

function createOutdatedMessage(outdatedDeps, latestDeps) {
  const outdatedMessages = outdatedDeps.map((dep, i) => {
    const updatedDep = latestDeps.find(latestDep => latestDep.name === dep.name)
    return `${chalk.blue(dep.name)} ${chalk.gray(dep.version)} → ${chalk.green(updatedDep.version)}`
  })

  return `
${chalk.yellow('Hey, an update for accurapp is available!')}
${outdatedMessages.join('\n')}
${chalk.yellow('Run')} ${chalk.cyan('yarn upgrade-interactive')} ${chalk.yellow('to update')}
`
}

function indent(text, prepend = '  ', firstLinePrepend = prepend) {
  return text
    .split(`\n`)
    .map((line, i) => `${i === 0 ? firstLinePrepend : prepend}${line}`)
    .join(`\n`)
}

function listLine(text, color = i => i) {
  return indent(text, '   ', color('\n • '))
}

function readWebpackConfig() {
  const cwd = process.cwd()
  return require(path.join(cwd, 'webpack.config.js'))
}
<commit_msg>🐈  📦  Updated upgrade command after yarn 1.0<commit_after>const path = require('path')
const webpack = require('webpack')
const chalk = require('chalk')
const figlet = require('figlet')
const boxen = require('boxen')
const formatWebpackMessages = require('react-dev-utils/formatWebpackMessages')

const log = {
  ok(...a) { console.log('::: ' + chalk.yellow(...a)) },
  warn(...a) { console.error('!!! ' + chalk.yellow(...a)) },
  err(...a) { console.error('!!! ' + chalk.red(...a)) },
  info(...a) { console.log('--- ' + chalk.blue(...a)) },
}

function noop() {}

function coloredBanner(text, colors = ['blue', 'red']) {
  const bannerText = text.replace(/\|/g, 'l') // In BigMoney font, 'l' (lowercase L) are much nicer than '|' (pipes)
  const bannerColors = { '$': colors[0], '_': colors[1], '|': colors[1], '\\': colors[1], '/': colors[1] }
  const banner = figlet.textSync(bannerText, { font: 'Big Money-nw' })
  const colored = banner.replace(/[^\s]/g, (c) => chalk[bannerColors[c] || 'white'](c))
  return `\n${colored}`
}

function yellowBox(message) {
  const boxenOptions = {
    padding: 1,
    align: 'center',
    borderColor: 'yellow',
  }

  return boxen(message, boxenOptions)
}

function createOutdatedMessage(outdatedDeps, latestDeps) {
  const outdatedMessages = outdatedDeps.map((dep, i) => {
    const updatedDep = latestDeps.find(latestDep => latestDep.name === dep.name)
    return `${chalk.blue(dep.name)} ${chalk.gray(dep.version)} → ${chalk.green(updatedDep.version)}`
  })

  return `
${chalk.yellow('Hey, an update for accurapp is available!')}
${outdatedMessages.join('\n')}
${chalk.yellow('Run')} ${chalk.cyan('yarn upgrade-interactive --latest')} ${chalk.yellow('to update')}
`
}

function indent(text, prepend = '  ', firstLinePrepend = prepend) {
  return text
    .split(`\n`)
    .map((line, i) => `${i === 0 ? firstLinePrepend : prepend}${line}`)
    .join(`\n`)
}

function listLine(text, color = i => i) {
  return indent(text, '   ', color('\n • '))
}

function readWebpackConfig() {
  const cwd = process.cwd()
  return require(path.join(cwd, 'webpack.config.js'))
}

{'fraction_non_alphanumeric': 0.21565342269028243, 'fraction_numerical': 0.003829583532790809, 'mean_word_length': 4.172029702970297, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '2262751', 'n_tokens_mistral': 1522, 'n_tokens_neox': 1477, 'n_words': 310}