<commit_before>"use strict";

const env = process.env.BABEL_ENV || process.env.NODE_ENV;
const envOpts = {
  loose: true,
};

switch(env) {
  case "development":
    envOpts.debug = true;
    // fall-through
  case "test":
    envOpts.targets = {
      node: "current"
  };
}

const config = {
  comments: false,
  presets: [["@babel/env", envOpts]],
  plugins: [
    // TODO: Use @babel/preset-flow when
    // https://github.com/babel/babel/issues/7233 is fixed
    "@babel/plugin-transform-flow-strip-types",
    ["@babel/proposal-class-properties", { loose: true }],
    "@babel/proposal-export-namespace-from",
    "@babel/proposal-numeric-separator",
    ["@babel/proposal-object-rest-spread", { useBuiltIns: true }],
  ],
  overrides: [
    {
      test: "packages/babylon",
      plugins: [
        "babel-plugin-transform-charcodes",
        ["@babel/transform-for-of", { assumeArray: true }],
      ],
    },
  ],
};

// we need to do this as long as we do not test everything from source
if (process.env.BABEL_ENV === "cov") {
  config.auxiliaryCommentBefore = "istanbul ignore next";
  config.plugins.push("babel-plugin-istanbul");
}

module.exports = config;
<commit_msg>Also run coverage with node: current (#7479)<commit_after>"use strict";

const env = process.env.BABEL_ENV || process.env.NODE_ENV;
const envOpts = {
  loose: true,
};

switch(env) {
  case "development":
    envOpts.debug = true;
    // fall-through
  case "test":
  case "cov":
    envOpts.targets = {
      node: "current"
  };
}

const config = {
  comments: false,
  presets: [["@babel/env", envOpts]],
  plugins: [
    // TODO: Use @babel/preset-flow when
    // https://github.com/babel/babel/issues/7233 is fixed
    "@babel/plugin-transform-flow-strip-types",
    ["@babel/proposal-class-properties", { loose: true }],
    "@babel/proposal-export-namespace-from",
    "@babel/proposal-numeric-separator",
    ["@babel/proposal-object-rest-spread", { useBuiltIns: true }],
  ],
  overrides: [
    {
      test: "packages/babylon",
      plugins: [
        "babel-plugin-transform-charcodes",
        ["@babel/transform-for-of", { assumeArray: true }],
      ],
    },
  ],
};

// we need to do this as long as we do not test everything from source
if (env === "cov") {
  config.auxiliaryCommentBefore = "istanbul ignore next";
  config.plugins.push("babel-plugin-istanbul");
}

module.exports = config;

{'fraction_non_alphanumeric': 0.16659707724425887, 'fraction_numerical': 0.005010438413361169, 'mean_word_length': 3.05414551607445, 'pattern_counts': {'":': 5, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '6903048', 'n_tokens_mistral': 841, 'n_tokens_neox': 817, 'n_words': 164}