<commit_before>/*
 * Prebuilt binary downloader for node-serialport
 */

const path = require("path");
const fs = require("fs-extra");
const pify = require("pify");
const download = require("download");
const decompress = require("decompress");

const BASE_URL = "https://github.com/EmergingTechnologyAdvisors/node-serialport/releases/download";
const ARCHS = ["darwin-x64", "linux-ia32", "linux-x64", "win32-ia32", "win32-x64"];

const SP_VERSION = require(path.join(__dirname, "..", "package.json")).dependencies.serialport;
console.log(`serialport version: ${SP_VERSION}`);

const EL_VERSIONS = process.argv.slice(2);

const CACHE_DIR = path.join(__dirname, "prebuild-cache");
const PKG_DIR = path.join(__dirname, "..", "node_modules", "serialport");
const DEST_DIR = path.join(PKG_DIR, "compiled");

const ELECTRON_VERSION_MAP = {
    "1.6.6": {node: "7.4.0", modules: "53"},
    "1.7.3": {node: "7.9.0", modules: "54"},
};

EL_VERSIONS.reduce((promise, elVer) => {
    return promise
    .then(() => {
        let vers = ELECTRON_VERSION_MAP[elVer];
        if (vers == null) {
            return Promise.reject(new Error(`Version mappings not found for Electron v${elVer}`));
        }
        console.log(`- Electron v${elVer} => node: ${vers.node}, modules: ${vers.modules}`);
        return ARCHS.reduce((promise, arch) => {<commit_msg>Update prebuild tool<commit_after>/*
 * Prebuilt binary downloader for node-serialport
 */

const path = require("path");
const fs = require("fs-extra");
const pify = require("pify");
const download = require("download");
const decompress = require("decompress");

const BASE_URL = "https://github.com/EmergingTechnologyAdvisors/node-serialport/releases/download";
const ARCHS = ["darwin-x64", "linux-ia32", "linux-x64", "win32-ia32", "win32-x64"];

const CACHE_DIR = path.join(__dirname, "prebuild-cache");
const PKG_DIR = path.join(__dirname, "..", "node_modules", "serialport");
const DEST_DIR = path.join(PKG_DIR, "compiled");

const SP_VERSION = require(path.join(PKG_DIR, "package.json")).version;
console.log(`serialport version: ${SP_VERSION}`);

const EL_VERSIONS = process.argv.slice(2);

const ELECTRON_VERSION_MAP = {
    "1.6.6": {node: "7.4.0", modules: "53"},
    "1.7.3": {node: "7.9.0", modules: "54"},
};

EL_VERSIONS.reduce((promise, elVer) => {
    return promise
    .then(() => {
        let vers = ELECTRON_VERSION_MAP[elVer];
        if (vers == null) {
            return Promise.reject(new Error(`Version mappings not found for Electron v${elVer}`));
        }
        console.log(`- Electron v${elVer} => node: ${vers.node}, modules: ${vers.modules}`);
        return ARCHS.reduce((promise, arch) => {
{'fraction_non_alphanumeric': 0.1833146277590722, 'fraction_numerical': 0.02319491208380097, 'mean_word_length': 4.35871743486974, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1436934', 'n_tokens_mistral': 940, 'n_tokens_neox': 901, 'n_words': 194}