<commit_before>var goog = global.goog = {};

var SHADOW_IMPORTED = global.SHADOW_IMPORTED = {};
var PATH = require("path");
var VM = require("vm");
var FS = require("fs");

var SHADOW_PROVIDE = function(name) {
  return goog.exportPath_(name, undefined);
};

var SHADOW_REQUIRE = function(name) {
  return true;
};

var SHADOW_WRAP = function(js) {
  var code = "(function (require, module, __filename, __dirname) {\n";
  // this is part of goog/base.js and for some reason the only global var not on goog or goog.global
  code += "var COMPILED = false;\n"
  code += js;
  code += "\n});";
  return code;
};

var SHADOW_IMPORT = global.SHADOW_IMPORT = function(src) {
  if (CLOSURE_DEFINES["shadow.debug"]) {
    console.info("SHADOW load:", src);
  }

  SHADOW_IMPORTED[src] = true;

  // SHADOW_IMPORT_PATH is an absolute path
  var filePath = PATH.resolve(SHADOW_IMPORT_PATH, src);

  var js = FS.readFileSync(filePath);
<commit_msg>fix require issue using new Closure Library in node env<commit_after>var goog = global.goog = {};

var SHADOW_IMPORTED = global.SHADOW_IMPORTED = {};
var PATH = require("path");
var VM = require("vm");
var FS = require("fs");

var SHADOW_PROVIDE = function(name) {
  return goog.exportPath_(name, undefined);
};

var SHADOW_REQUIRE = function(name) {
  if (goog.isInModuleLoader_()) {
    return goog.module.getInternal_(name);
  }
  return true;
};

var SHADOW_WRAP = function(js) {
  var code = "(function (require, module, __filename, __dirname) {\n";
  // this is part of goog/base.js and for some reason the only global var not on goog or goog.global
  code += "var COMPILED = false;\n"
  code += js;
  code += "\n});";
  return code;
};

var SHADOW_IMPORT = global.SHADOW_IMPORT = function(src) {
  if (CLOSURE_DEFINES["shadow.debug"]) {
    console.info("SHADOW load:", src);
  }

  SHADOW_IMPORTED[src] = true;

  // SHADOW_IMPORT_PATH is an absolute path
  var filePath = PATH.resolve(SHADOW_IMPORT_PATH, src);

  var js = FS.readFileSync(filePath);

{'fraction_non_alphanumeric': 0.14035087719298245, 'fraction_numerical': 0.0, 'mean_word_length': 4.184415584415585, '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': '6874413', 'n_tokens_mistral': 727, 'n_tokens_neox': 708, 'n_words': 189}