<NME> prepare-israeli-bank-scrapers-core.js
<BEF> const fs = require('fs');
const path = require('path');
const checkIfCoreVariation = require('./core-utils');
const transformImports = require('./jscodeshift');

function updatePackageJson() {
  const packagePath = path.join(__dirname, '..', 'package.json');
  // eslint-disable-next-line import/no-dynamic-require,global-require
  const json = require(packagePath);

  json.dependencies['puppeteer-core'] = json.dependencies.puppeteer;
  delete json.dependencies.puppeteer;

  json.dependencies['@types/puppeteer-core'] = '*';
  delete json.dependencies['@types/puppeteer'];
  json.name = 'israeli-bank-scrapers-core';
  fs.writeFileSync(packagePath, JSON.stringify(json, null, '  '));

  console.log('change package.json name to \'israeli-bank-scrapers-core\' and use \'puppeteer-core\'');
}

(async function () {
  if (checkIfCoreVariation()) {
    console.log('library is already in core variation');
    process.exit(1);
    return;
  }

  updatePackageJson();
  await transformImports();
}());

<MSG> handle right @types property

<DFF> @@ -11,8 +11,8 @@ function updatePackageJson() {
   json.dependencies['puppeteer-core'] = json.dependencies.puppeteer;
   delete json.dependencies.puppeteer;
 
-  json.dependencies['@types/puppeteer-core'] = '*';
-  delete json.dependencies['@types/puppeteer'];
+  json.devDependencies['@types/puppeteer-core'] = '*';
+  delete json.devDependencies['@types/puppeteer'];
   json.name = 'israeli-bank-scrapers-core';
   fs.writeFileSync(packagePath, JSON.stringify(json, null, '  '));
 

handle right @types property