<commit_before>// @flow

import {resolve} from 'path';

import type Config from '../../config.js';
import {MessageError} from '../../errors.js';
import {registryNames} from '../../registries/index.js';
import type {Reporter} from '../../reporters/index.js';
import * as child from '../../util/child.js';
import * as fs from '../../util/fs.js';
import {run as runGlobal} from './global.js';

export function setFlags() {}

export function hasWrapper(): boolean {
  return true;
}

export async function run(
  config: Config,
  reporter: Reporter,
  flags: Object,
  args: Array<string>,
): Promise<void> {
  const [builderName, ... rest] = args;

  if (!builderName) {
    throw new MessageError(reporter.lang('invalidPackageName'));
  }

  const packageName = builderName.replace(/^(@[^\/]+\/)?/, '$1yarn-create-');
  const commandName = packageName.replace(/^@[^\/]+\//, '');

  await runGlobal(config, reporter, {}, ['add', packageName]);<commit_msg>Updates the yarn-create prefix (#3358)<commit_after>// @flow

import {resolve} from 'path';

import type Config from '../../config.js';
import {MessageError} from '../../errors.js';
import {registryNames} from '../../registries/index.js';
import type {Reporter} from '../../reporters/index.js';
import * as child from '../../util/child.js';
import * as fs from '../../util/fs.js';
import {run as runGlobal} from './global.js';

export function setFlags() {}

export function hasWrapper(): boolean {
  return true;
}

export async function run(
  config: Config,
  reporter: Reporter,
  flags: Object,
  args: Array<string>,
): Promise<void> {
  const [builderName, ... rest] = args;

  if (!builderName) {
    throw new MessageError(reporter.lang('invalidPackageName'));
  }

  const packageName = builderName.replace(/^(@[^\/]+\/)?/, '$1create-');
  const commandName = packageName.replace(/^@[^\/]+\//, '');

  await runGlobal(config, reporter, {}, ['add', packageName]);
{'fraction_non_alphanumeric': 0.20612668743509865, 'fraction_numerical': 0.003115264797507788, 'mean_word_length': 3.7114914425427874, 'pattern_counts': {'":': 0, '<': 7, '<?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': '2103341', 'n_tokens_mistral': 598, 'n_tokens_neox': 598, 'n_words': 169}