<commit_before>'use strict'; // XXX
import * as path from 'path';
import { readFile } from '../utils';
import { DiffEntry, nextLeafDiffEntry } from '../diffEntry';


//
// Diff Entry
//
async function deployDiffSection(srcRoot: string, section: DiffEntry, diffRef: Firebase): Promise<void> {
    const sectionPath = section.path;

    const jsonPath = path.join(srcRoot, sectionPath + '.json');
    const jsonText = await readFile(jsonPath);
    const sectionDiff = JSON.parse(jsonText);

    const sectionRef = diffRef.child(sectionPath);
    await sectionRef.set(sectionDiff);
}

export async function deployDiff(srcRoot: string, diffEntries: DiffEntry[], diffRef: Firebase): Promise<void> {
    const sections = [];
    // TO MAKE HEROKU HAPPY, DO NOT USE Promise.all HERE
    for (const section of nextLeafDiffEntry(diffEntries)) {
        await deployDiffSection(srcRoot, section, diffRef);
    }
}<commit_msg>Remove unused variables<commit_after>'use strict'; // XXX
import * as path from 'path';
import { readFile } from '../utils';
import { DiffEntry, nextLeafDiffEntry } from '../diffEntry';


//
// Diff Entry
//
async function deployDiffSection(srcRoot: string, section: DiffEntry, diffRef: Firebase): Promise<void> {
    const sectionPath = section.path;

    const jsonPath = path.join(srcRoot, sectionPath + '.json');
    const jsonText = await readFile(jsonPath);
    const sectionDiff = JSON.parse(jsonText);

    const sectionRef = diffRef.child(sectionPath);
    await sectionRef.set(sectionDiff);
}

export async function deployDiff(srcRoot: string, diffEntries: DiffEntry[], diffRef: Firebase): Promise<void> {
    for (const section of nextLeafDiffEntry(diffEntries)) {
        await deployDiffSection(srcRoot, section, diffRef);
    }
}
{'fraction_non_alphanumeric': 0.1217292377701934, 'fraction_numerical': 0.0, 'mean_word_length': 4.298192771084337, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '5165887', 'n_tokens_mistral': 507, 'n_tokens_neox': 502, 'n_words': 147}