"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getCorejsVersion = void 0;
var _fsExtra = require("../compiled/fs-extra");
const getCorejsVersion = pkgPath => {
  var _pkg$dependencies$cor;
  const pkg = (0, _fsExtra.readJsonSync)(pkgPath, {
    encoding: 'utf-8'
  });
  const version = ((_pkg$dependencies$cor = pkg.dependencies['core-js']) === null || _pkg$dependencies$cor === void 0 ? void 0 : _pkg$dependencies$cor.split('.').slice(0, 2).join('.')) || '3';
  return version;
};
exports.getCorejsVersion = getCorejsVersion;