<commit_before>// @flow
import type {Args, Opts} from '../types';
import Project from '../Project';
import * as processes from '../utils/processes';
import * as fs from '../utils/fs';
import * as path from 'path';
import * as logger from '../utils/logger';
import * as messages from '../utils/messages';
import pathIsInside from 'path-is-inside';

export default async function install(args: Args, opts: Opts) {
  let cwd = process.cwd();
  let project = await Project.init(cwd);
  let workspaces = await project.getWorkspaces();

  let {
    graph: dependencyGraph,
    valid: dependencyGraphValid,
  } = await project.getDependencyGraph(workspaces);

  let projectDependencies = project.pkg.getAllDependencies();

  let directoriesToCreate = [];
  let symlinksToCreate = [];
  let valid = true;

  let workspacesToDependencies = {};

  for (let workspace of workspaces) {
    let dependencies = workspace.pkg.getAllDependencies();

    workspacesToDependencies[workspace.pkg.config.name] = dependencies;

    directoriesToCreate.push(workspace.pkg.nodeModules);
    directoriesToCreate.push(workspace.pkg.nodeModulesBin);

    for (let [name, version] of dependencies) {
      let matched = projectDependencies.get(name);

      console.log(name);

      if (dependencyGraph.has(name)) {
        continue;
      }

      if (!matched) {
        valid = false;
        logger.error(messages.depMustBeAddedToProject(workspace.pkg.config.name, name));
        continue;
      }<commit_msg>remove log<commit_after>// @flow
import type {Args, Opts} from '../types';
import Project from '../Project';
import * as processes from '../utils/processes';
import * as fs from '../utils/fs';
import * as path from 'path';
import * as logger from '../utils/logger';
import * as messages from '../utils/messages';
import pathIsInside from 'path-is-inside';

export default async function install(args: Args, opts: Opts) {
  let cwd = process.cwd();
  let project = await Project.init(cwd);
  let workspaces = await project.getWorkspaces();

  let {
    graph: dependencyGraph,
    valid: dependencyGraphValid,
  } = await project.getDependencyGraph(workspaces);

  let projectDependencies = project.pkg.getAllDependencies();

  let directoriesToCreate = [];
  let symlinksToCreate = [];
  let valid = true;

  let workspacesToDependencies = {};

  for (let workspace of workspaces) {
    let dependencies = workspace.pkg.getAllDependencies();

    workspacesToDependencies[workspace.pkg.config.name] = dependencies;

    directoriesToCreate.push(workspace.pkg.nodeModules);
    directoriesToCreate.push(workspace.pkg.nodeModulesBin);

    for (let [name, version] of dependencies) {
      let matched = projectDependencies.get(name);

      if (dependencyGraph.has(name)) {
        continue;
      }

      if (!matched) {
        valid = false;
        logger.error(messages.depMustBeAddedToProject(workspace.pkg.config.name, name));
        continue;
      }
{'fraction_non_alphanumeric': 0.12351543942992874, 'fraction_numerical': 0.0, 'mean_word_length': 3.64251968503937, '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': '2608134', 'n_tokens_mistral': 867, 'n_tokens_neox': 820, 'n_words': 222}