<commit_before>var fs = require("fs"),
    pathUtil = require("path"),
    nodeModulesDir = pathUtil.resolve(__dirname, "../../node_modules");

module.exports = function createFakePackageJSON(done) {
    var fakePackageJSON = '{ "main": "../../lib/index.js" }';

    fs.mkdir(nodeModulesDir + "/rewire", function onMkDir() {
        fs.writeFile(nodeModulesDir + "/rewire/package.json", fakePackageJSON, "utf8", done);
    });
};<commit_msg>fixed bug when node_modules folder is missing<commit_after>var fs = require("fs"),
    pathUtil = require("path"),
    nodeModulesDir = pathUtil.resolve(__dirname, "../../node_modules");

module.exports = function createFakePackageJSON(done) {
    var fakePackageJSON = '{ "main": "../../lib/index.js" }';

    fs.mkdir(nodeModulesDir, function onMkDirNodeModules() {
        fs.mkdir(nodeModulesDir + "/rewire", function onRewireMkDir() {
            fs.writeFile(nodeModulesDir + "/rewire/package.json", fakePackageJSON, "utf8", done);
        });
    });
};
{'fraction_non_alphanumeric': 0.17482517482517482, 'fraction_numerical': 0.001998001998001998, 'mean_word_length': 3.7942583732057416, 'pattern_counts': {'":': 2, '<': 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': '6876426', 'n_tokens_mistral': 303, 'n_tokens_neox': 308, 'n_words': 57}