fix output of package-lock2 translator

This commit is contained in:
DavHau 2022-02-25 21:38:08 +07:00
parent 57bc7e9c41
commit 8fbd1d51a9
2 changed files with 14 additions and 15 deletions

View File

@ -13,10 +13,11 @@ let
(v: v ? discover)
discoverers;
discoverProjects = source:
let
tree = dlib.prepareSourceTree { inherit source; };
in
discoverProjects =
{
source ? null,
tree ? dlib.prepareSourceTree { inherit source; },
}:
l.flatten
(l.map
(discoverer: discoverer.discover { inherit tree; })

View File

@ -38,20 +38,18 @@ let
allProjectsTranslated =
l.map
(proj:
translateOne
{
inherit translatorName utils name noDev nodejs;
source = "${args.source}/${proj.relPath}";
packageLock = getLock proj;
})
proj // {
dreamLock =
translateOne {
inherit translatorName utils name noDev nodejs;
source = "${args.source}/${proj.relPath}";
packageLock = getLock proj;
};
})
projects;
in
l.foldl'
l.recursiveUpdate
{}
# reverse the project list so the first defaultPacke persists
(lib.reverseList allProjectsTranslated);
allProjectsTranslated;
translateOne =