mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-11 22:46:27 +00:00
fix(lerna): Use packages path from lerna.json (#542)
This commit is contained in:
parent
434def2bf4
commit
984b5a89b8
2 changed files with 4 additions and 3 deletions
|
@ -36,7 +36,8 @@ async function checkForLerna(config) {
|
||||||
}
|
}
|
||||||
config.logger.debug({ lernaJson }, 'Found lerna config');
|
config.logger.debug({ lernaJson }, 'Found lerna config');
|
||||||
try {
|
try {
|
||||||
const lernaPackages = await config.api.getSubDirectories('packages');
|
const packagesPath = lernaJson.packages[0].slice(0, -2);
|
||||||
|
const lernaPackages = await config.api.getSubDirectories(packagesPath);
|
||||||
if (lernaPackages.length === 0) {
|
if (lernaPackages.length === 0) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@ describe('workers/repository/apis', () => {
|
||||||
it('ignores zero length lerna', async () => {
|
it('ignores zero length lerna', async () => {
|
||||||
const config = {
|
const config = {
|
||||||
api: {
|
api: {
|
||||||
getFileJson: jest.fn(() => ({})),
|
getFileJson: jest.fn(() => ({ packages: ['packages/*'] })),
|
||||||
getSubDirectories: jest.fn(() => []),
|
getSubDirectories: jest.fn(() => []),
|
||||||
},
|
},
|
||||||
logger,
|
logger,
|
||||||
|
@ -70,7 +70,7 @@ describe('workers/repository/apis', () => {
|
||||||
it('returns lerna package names', async () => {
|
it('returns lerna package names', async () => {
|
||||||
const config = {
|
const config = {
|
||||||
api: {
|
api: {
|
||||||
getFileJson: jest.fn(() => ({})),
|
getFileJson: jest.fn(() => ({ packages: ['packages/*'] })),
|
||||||
getSubDirectories: jest.fn(() => ['a', 'b']),
|
getSubDirectories: jest.fn(() => ['a', 'b']),
|
||||||
},
|
},
|
||||||
logger,
|
logger,
|
||||||
|
|
Loading…
Reference in a new issue