<commit_before>var fs = require("fs");
var path = require("path");
var files = require("../fs/mini-files.js");

function getDevBundle() {
  return require("./dev-bundle.js");
}
exports.getDevBundle = getDevBundle;

exports.getEnv = function (options) {
  var devBundle = options && options.devBundle;
  var devBundlePromise = typeof devBundle === "string"
    ? Promise.resolve(files.convertToOSPath(devBundle))
    : getDevBundle();

  return devBundlePromise.then(function (devBundleDir) {
    var paths = [
      // When npm looks for node, it must find dev_bundle/bin/node.
      path.join(devBundleDir, "bin"),
      // Also make available any scripts installed by packages in
      // dev_bundle/lib/node_modules, such as node-gyp.
      path.join(devBundleDir, "lib", "node_modules", ".bin")
    ];

    var env = Object.create(process.env);

    // This allows node-gyp to find Node headers and libraries in
    // dev_bundle/.node-gyp.
    env.USERPROFILE = devBundleDir;
<commit_msg>Always use dev_bundle/.npm as the cache for `meteor npm ...` commands.<commit_after>var fs = require("fs");
var path = require("path");
var files = require("../fs/mini-files.js");

function getDevBundle() {
  return require("./dev-bundle.js");
}
exports.getDevBundle = getDevBundle;

exports.getEnv = function (options) {
  var devBundle = options && options.devBundle;
  var devBundlePromise = typeof devBundle === "string"
    ? Promise.resolve(files.convertToOSPath(devBundle))
    : getDevBundle();

  return devBundlePromise.then(function (devBundleDir) {
    var paths = [
      // When npm looks for node, it must find dev_bundle/bin/node.
      path.join(devBundleDir, "bin"),
      // Also make available any scripts installed by packages in
      // dev_bundle/lib/node_modules, such as node-gyp.
      path.join(devBundleDir, "lib", "node_modules", ".bin")
    ];

    var env = Object.create(process.env);

    // Make sure we don't try to use the global ~/.npm cache accidentally.
    if (! env.NPM_CONFIG_CACHE) {
      env.NPM_CONFIG_CACHE = path.join(devBundleDir, ".npm");
    }

    // This allows node-gyp to find Node headers and libraries in
    // dev_bundle/.node-gyp.
    env.USERPROFILE = devBundleDir;

{'fraction_non_alphanumeric': 0.13282305267897343, 'fraction_numerical': 0.0, 'mean_word_length': 3.3483365949119372, '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': '7571292', 'n_tokens_mistral': 692, 'n_tokens_neox': 673, 'n_words': 182}