<commit_before>'use strict';
const fs = require('fs');
const path = require('path');
const ncp = require('ncp').ncp;
const temp = require('temp');// .track();
const execa = require('execa');
const tempDirName = 'node-elm-compiler';
const promisify = require('native-promisify');

const makeTempDir = () => promisify(temp.mkdir)(tempDirName);

const defaultOptions = {output: 'html'};

const compileElmInDir = (dir, opts) => {
	return execa('elm-make', ['--yes', 'main.elm', `--output=main.${opts.output}`], {cwd: dir})
		.then(() => dir)
		.catch(err => {
			throw new Error(err.stderr);
		});
};

const copyCachedFilesToDir = (dir) => {
	return new Promise((resolve, reject) => {
		ncp(path.resolve(__dirname, './cache'), dir, function (err) {
			if (err) {<commit_msg>fix(clean tmp folder after it runs)<commit_after>'use strict';
const fs = require('fs');
const path = require('path');
const ncp = require('ncp').ncp;
const temp = require('temp').track();
const execa = require('execa');
const tempDirName = 'node-elm-compiler';
const promisify = require('native-promisify');

const makeTempDir = () => promisify(temp.mkdir)(tempDirName);

const defaultOptions = {output: 'html'};

const compileElmInDir = (dir, opts) => {
	return execa('elm-make', ['--yes', 'main.elm', `--output=main.${opts.output}`], {cwd: dir})
		.then(() => dir)
		.catch(err => {
			throw new Error(err.stderr);
		});
};

const copyCachedFilesToDir = (dir) => {
	return new Promise((resolve, reject) => {
		ncp(path.resolve(__dirname, './cache'), dir, function (err) {
			if (err) {
{'fraction_non_alphanumeric': 0.2086007702182285, 'fraction_numerical': 0.0, 'mean_word_length': 4.973180076628353, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '7329405', 'n_tokens_mistral': 549, 'n_tokens_neox': 531, 'n_words': 128}