<commit_before>// package-test.js: check to make sure that all dependcies are sufficiently up
// to date. If dependencies are too outdated, exit with an error, failing `npm
// run update:packages` and thus eventually the entire build.

const package = require('./package.json');
const packageJson = require('package-json');
const SAFE_TIME = 1000 * 1 * 60 * 60 * 24 * 7; //7days
// webpack has a major update
// copy-webpack-plugin major update
// holding off on husky changes as the cli still has some weird necessary changes to run commitlint
const EXCEPTIONS = [
  'multicoin-address-validator',
  'postcss-import',
  'postcss-url',
  'webpack',
  'copy-webpack-plugin',
  'sass',
  'sass-loader',
  'husky',
  '@aave/protocol-js',
  'sass',
  'web3',
  'web3-core-helpers',
  'web3-core-method',
  'web3-core-requestmanager',
  'web3-utils',
  'remark-cli',
  'node-fetch',
  'vuetify',
  'vue-i18n',
  'stylelint',
  'stylelint-config-standard',
  'vue',
  'vue-router',
  'vuex',
  'eslint',
  'eslint-plugin-vue',
  'imagemin-mozjpeg', // issue with importing it to vue config will look into it more if we need it
  '@vue/eslint-config-prettier', // creates more warnings
  // versions for vue3
  'vue-router',
  'vuex',
  'eslint-plugin-vue',
  '@vue/test-utils',
  '@vue/babel-preset-app',
  '@vue/cli-plugin-babel',
  '@vue/cli-plugin-eslint',
  '@vue/cli-plugin-pwa',
  '@vue/cli-plugin-unit-jest',
  '@vue/cli-service',
  'vue-i18n',
  'vue',
  'trezor-connect', // currently in beta
  '@shapeshiftoss/hdwallet-core',
  '@shapeshiftoss/hdwallet-keepkey-webusb'
];
const CUSTOM_DIST = {
  ['babel-core']: 'bridge'
};
const ALL_PACKAGES = Object.assign(
  package.dependencies,
  package.devDependencies
);
const names = Object.keys(ALL_PACKAGES);
let updatesFound = false;
const looper = () => {
  if (!names.length) {
    if (updatesFound) {
      console.error(
        '\nREFUSING TO CONTINUE because above packages are TOO FAR OUT OF DATE!'
      );
      console.error(
        'In order to build MyEtherWallet, you must edit package.json.'
      );
      console.error(<commit_msg>fix: 🐛 require ESM<commit_after>// package-test.js: check to make sure that all dependcies are sufficiently up
// to date. If dependencies are too outdated, exit with an error, failing `npm
// run update:packages` and thus eventually the entire build.

const package = import('./package.json');
const packageJson = import('package-json');
const SAFE_TIME = 1000 * 1 * 60 * 60 * 24 * 7; //7days
// webpack has a major update
// copy-webpack-plugin major update
// holding off on husky changes as the cli still has some weird necessary changes to run commitlint
const EXCEPTIONS = [
  'multicoin-address-validator',
  'postcss-import',
  'postcss-url',
  'webpack',
  'copy-webpack-plugin',
  'sass',
  'sass-loader',
  'husky',
  '@aave/protocol-js',
  'sass',
  'web3',
  'web3-core-helpers',
  'web3-core-method',
  'web3-core-requestmanager',
  'web3-utils',
  'remark-cli',
  'node-fetch',
  'vuetify',
  'vue-i18n',
  'stylelint',
  'stylelint-config-standard',
  'vue',
  'vue-router',
  'vuex',
  'eslint',
  'eslint-plugin-vue',
  'imagemin-mozjpeg', // issue with importing it to vue config will look into it more if we need it
  '@vue/eslint-config-prettier', // creates more warnings
  // versions for vue3
  'vue-router',
  'vuex',
  'eslint-plugin-vue',
  '@vue/test-utils',
  '@vue/babel-preset-app',
  '@vue/cli-plugin-babel',
  '@vue/cli-plugin-eslint',
  '@vue/cli-plugin-pwa',
  '@vue/cli-plugin-unit-jest',
  '@vue/cli-service',
  'vue-i18n',
  'vue',
  'trezor-connect', // currently in beta
  '@shapeshiftoss/hdwallet-core',
  '@shapeshiftoss/hdwallet-keepkey-webusb'
];
const CUSTOM_DIST = {
  ['babel-core']: 'bridge'
};
const ALL_PACKAGES = Object(
  package.dependencies,
  package.devDependencies
);
const names = Object.keys(ALL_PACKAGES);
let updatesFound = false;
const looper = () => {
  if (!names.length) {
    if (updatesFound) {
      console.error(
        '\nREFUSING TO CONTINUE because above packages are TOO FAR OUT OF DATE!'
      );
      console.error(
        'In order to build MyEtherWallet, you must edit package.json.'
      );
      console.error(
{'fraction_non_alphanumeric': 0.15338740458015268, 'fraction_numerical': 0.01097328244274809, 'mean_word_length': 3.437037037037037, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '456601', 'n_tokens_mistral': 1522, 'n_tokens_neox': 1474, 'n_words': 378}