<commit_before>const { MIN_IE_VERSION, MIN_NODE_VERSION } = require('../constants');

// Package: Run in root
// Workspaces: Run in each package (using --config-file option)
const { context, tool } = process.beemo;
const { node, react } = tool.config.settings;
const plugins = [
  '@babel/plugin-proposal-class-properties',
  '@babel/plugin-proposal-export-default-from',
  '@babel/plugin-proposal-nullish-coalescing-operator',
  '@babel/plugin-proposal-optional-catch-binding',
  '@babel/plugin-proposal-optional-chaining',
  '@babel/plugin-syntax-dynamic-import',
  ['babel-plugin-transform-dev', { evaluate: false }],
];

if (!node) {
  plugins.push([
    '@babel/plugin-transform-runtime',
    {
      helpers: true,
      regenerator: process.env.NODE_ENV === 'test',
      useESModules: !!context.args.esm,
    },
  ]);
}

// Order is important!
const presets = [
  [
    '@babel/preset-env',
    {
      modules: context.args.esm ? false : 'commonjs',
      shippedProposals: true,
      targets: node ? { node: MIN_NODE_VERSION } : { ie: MIN_IE_VERSION },
      useBuiltIns: false,
    },
  ],
  '@babel/preset-typescript',
];

if (react) {
  presets.push('@babel/preset-react');
  plugins.push('babel-plugin-typescript-to-proptypes');
}

module.exports = {
  babelrc: false,
  comments: false,
  plugins,
  presets,
};<commit_msg>Enable core-js v3.<commit_after>const { MIN_IE_VERSION, MIN_NODE_VERSION } = require('../constants');

// Package: Run in root
// Workspaces: Run in each package (using --config-file option)
const { context, tool } = process.beemo;
const { node, react } = tool.config.settings;
const plugins = [
  '@babel/plugin-proposal-class-properties',
  '@babel/plugin-proposal-export-default-from',
  '@babel/plugin-proposal-nullish-coalescing-operator',
  '@babel/plugin-proposal-optional-catch-binding',
  '@babel/plugin-proposal-optional-chaining',
  '@babel/plugin-syntax-dynamic-import',
  ['babel-plugin-transform-dev', { evaluate: false }],
];

if (!node) {
  plugins.push([
    '@babel/plugin-transform-runtime',
    {
      corejs: 3,
      regenerator: process.env.NODE_ENV === 'test',
      useESModules: !!context.args.esm,
    },
  ]);
}

// Order is important!
const presets = [
  [
    '@babel/preset-env',
    {
      corejs: 3,
      loose: true,
      modules: context.args.esm ? false : 'commonjs',
      shippedProposals: true,
      targets: node ? { node: MIN_NODE_VERSION } : { ie: MIN_IE_VERSION },
      useBuiltIns: 'usage',
    },
  ],
  '@babel/preset-typescript',
];

if (react) {
  presets.push('@babel/preset-react');
  plugins.push('babel-plugin-typescript-to-proptypes');
}

module.exports = {
  babelrc: false,
  comments: false,
  plugins,
  presets,
};
{'fraction_non_alphanumeric': 0.16856827383143172, 'fraction_numerical': 0.001104158998895841, 'mean_word_length': 3.448445171849427, 'pattern_counts': {'":': 0, '<': 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': '7637553', 'n_tokens_mistral': 954, 'n_tokens_neox': 946, 'n_words': 162}