<commit_before>#! /usr/bin/env node
const fs = require("fs");
const path = require("path");

let packageFile = require("../package.json");

const typeDefault = "yarn";
let type          = typeDefault;


// Try to get value of --type flag
const args = process.argv.slice(2);
const flag = args[0];

if (flag === "-t" || flag === "--type") {
  if (args[1] !== undefined) {<commit_msg>Try to get and validate package.json.<commit_after>#! /usr/bin/env node
const fs = require("fs");
const path = require("path");


// Try to get and validate package.json
try {
  let packageFile = require("../package.json");
}
catch(error) {
  console.log("Error Invalid JSON detected in package.json");
  console.log(error);
  process.exit(1);
}


const typeDefault = "yarn";
let type          = typeDefault;


// Try to get value of --type flag
const args = process.argv.slice(2);
const flag = args[0];

if (flag === "-t" || flag === "--type") {
  if (args[1] !== undefined) {
{'fraction_non_alphanumeric': 0.18580375782881003, 'fraction_numerical': 0.007306889352818371, 'mean_word_length': 3.4813084112149535, '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': '3164735', 'n_tokens_mistral': 313, 'n_tokens_neox': 308, 'n_words': 99}