<NME> update-puppeteer-config.js
<BEF> const fs = require('fs');
const path = require('path');

console.log('extract puppeteer chromium version from module \'puppeteer\'');

const puppeteerPath = path.dirname(require.resolve('puppeteer'));
const puppeteerPackagePath = path.join(puppeteerPath, 'package.json');
// eslint-disable-next-line import/no-dynamic-require
const puppeteerJson = require(puppeteerPackagePath);
const chromiumRevision = puppeteerJson.puppeteer.chromium_revision;

const configPath = path.join(__dirname, '..', 'src', 'puppeteer-config.json');
// eslint-disable-next-line import/no-dynamic-require
const configJson = require(configPath);
configJson.chromiumRevision = chromiumRevision;

fs.writeFileSync(configPath, JSON.stringify(configJson, null, '  '));

console.log(`update 'src/puppeteer-config.json' file with puppeteer chroumium revision '${chromiumRevision}'`);

<MSG> get puppetter chromium revision from either puppeteer or puppeteer-core

<DFF> @@ -1,19 +1,33 @@
 const fs = require('fs');
 const path = require('path');
 
-console.log('extract puppeteer chromium version from module \'puppeteer\'');
+function checkIfCoreVariation() {
+  const packagePath = path.join(__dirname, '..', 'package.json');
+  // eslint-disable-next-line import/no-dynamic-require,global-require
+  const packageJson = require(packagePath);
 
-const puppeteerPath = path.dirname(require.resolve('puppeteer'));
-const puppeteerPackagePath = path.join(puppeteerPath, 'package.json');
-// eslint-disable-next-line import/no-dynamic-require
-const puppeteerJson = require(puppeteerPackagePath);
-const chromiumRevision = puppeteerJson.puppeteer.chromium_revision;
+  return (packageJson.name === 'israeli-bank-scrapers-core');
+}
 
-const configPath = path.join(__dirname, '..', 'src', 'puppeteer-config.json');
-// eslint-disable-next-line import/no-dynamic-require
-const configJson = require(configPath);
-configJson.chromiumRevision = chromiumRevision;
+function getPuppeteerChromiumVersion() {
+  const puppeteerLibrary = checkIfCoreVariation() ? 'puppeteer-core' : 'puppeteer';
+  const puppeteerPath = path.dirname(require.resolve(puppeteerLibrary));
+  const puppeteerPackagePath = path.join(puppeteerPath, 'package.json');
+  // eslint-disable-next-line import/no-dynamic-require,global-require
+  const puppeteerJson = require(puppeteerPackagePath);
+  return puppeteerJson.puppeteer.chromium_revision;
+}
 
-fs.writeFileSync(configPath, JSON.stringify(configJson, null, '  '));
+(function updatePuppeteerConfiguration() {
+  console.log('extract puppeteer chromium version from module \'puppeteer|pupetter-core\'');
 
-console.log(`update 'src/puppeteer-config.json' file with puppeteer chroumium revision '${chromiumRevision}'`);
+  const chromiumRevision = getPuppeteerChromiumVersion();
+  const configPath = path.join(__dirname, '..', 'src', 'puppeteer-config.json');
+  // eslint-disable-next-line global-require,import/no-dynamic-require
+  const configJson = require(configPath);
+  configJson.chromiumRevision = chromiumRevision;
+
+  fs.writeFileSync(configPath, JSON.stringify(configJson, null, '  '));
+
+  console.log(`update 'src/puppeteer-config.json' file with puppeteer chroumium revision '${chromiumRevision}'`);
+}())

get puppetter chromium revision from either puppeteer or puppeteer-core