fix(yarn): read yarnrc contents properly

Properly fixes #2020
This commit is contained in:
Rhys Arkins 2018-05-26 18:22:32 +02:00
parent 941d06172d
commit a9f47ca0b0

View file

@ -35,7 +35,6 @@ async function extractDependencies(content, packageFile, config) {
: 'app'; : 'app';
const lockFiles = { const lockFiles = {
yarnrc: '.yarnrc',
yarnLock: 'yarn.lock', yarnLock: 'yarn.lock',
packageLock: 'package-lock.json', packageLock: 'package-lock.json',
shrinkwrapJson: 'npm-shrinkwrap.json', shrinkwrapJson: 'npm-shrinkwrap.json',
@ -71,6 +70,10 @@ async function extractDependencies(content, packageFile, config) {
npmrc = undefined; npmrc = undefined;
} }
} }
const yarnrc =
(await platform.getFile(
upath.join(path.dirname(packageFile), '.yarnrc')
)) || undefined;
let lernaDir; let lernaDir;
let lernaPackages; let lernaPackages;
@ -131,6 +134,7 @@ async function extractDependencies(content, packageFile, config) {
packageJsonVersion, packageJsonVersion,
packageJsonType, packageJsonType,
npmrc, npmrc,
yarnrc,
...lockFiles, ...lockFiles,
lernaDir, lernaDir,
lernaClient, lernaClient,