lion/scripts/yarn-lock-scan.js
2019-06-28 11:51:47 +02:00

10 lines
369 B
JavaScript

const fs = require('fs');
const path = require('path');
const yarnLockPath = './yarn.lock';
const data = fs.readFileSync(path.resolve(yarnLockPath), 'utf8');
if (data.match(/artifactory/g)) {
throw new Error(
'Artifactory references in your yarn.lock! Please make sure you are using the official yarn or npm registry when downloading your dependencies!',
);
}