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) (v: v ? discover)
discoverers; discoverers;
discoverProjects = source: discoverProjects =
let {
tree = dlib.prepareSourceTree { inherit source; }; source ? null,
in tree ? dlib.prepareSourceTree { inherit source; },
}:
l.flatten l.flatten
(l.map (l.map
(discoverer: discoverer.discover { inherit tree; }) (discoverer: discoverer.discover { inherit tree; })

View File

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