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');
|
||||
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) {
|
||||
return {};
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ describe('workers/repository/apis', () => {
|
|||
it('ignores zero length lerna', async () => {
|
||||
const config = {
|
||||
api: {
|
||||
getFileJson: jest.fn(() => ({})),
|
||||
getFileJson: jest.fn(() => ({ packages: ['packages/*'] })),
|
||||
getSubDirectories: jest.fn(() => []),
|
||||
},
|
||||
logger,
|
||||
|
@ -70,7 +70,7 @@ describe('workers/repository/apis', () => {
|
|||
it('returns lerna package names', async () => {
|
||||
const config = {
|
||||
api: {
|
||||
getFileJson: jest.fn(() => ({})),
|
||||
getFileJson: jest.fn(() => ({ packages: ['packages/*'] })),
|
||||
getSubDirectories: jest.fn(() => ['a', 'b']),
|
||||
},
|
||||
logger,
|
||||
|
|
Loading…
Reference in a new issue