fixes for yarn-lock translator

This commit is contained in:
DavHau 2022-03-02 12:44:12 +07:00
parent 54b9d1a61e
commit 07a2e7cd9f
3 changed files with 9 additions and 8 deletions

View File

@ -34,10 +34,11 @@ let
l.map
(proj:
translateOne {
inherit translatorName utils name noDev nodejs;
inherit translatorName utils noDev nodejs;
name = proj.name;
source = "${args.source}/${proj.relPath}";
tree = tree.getNodeFromPath proj.relPath;
packageLock = (getPackageLock proj).jsonContent;
packageLock = (getPackageLock proj).jsonContent or null;
relPath = proj.relPath;
workspaces = proj.subsystemInfo.workspaces or [];
})
@ -72,7 +73,7 @@ let
dev = ! noDev;
packageJson =
(tree.getNodeFromPath "${relPath}/package.json").jsonContent;
(tree.getNodeFromPath "package.json").jsonContent;
packageLockDeps =
if packageLock == null then

View File

@ -34,7 +34,8 @@ let
l.map
(proj:
translateOne {
inherit translatorName utils name noDev nodejs;
inherit translatorName utils noDev nodejs;
name = proj.name;
source = "${args.source}/${proj.relPath}";
tree = tree.getNodeFromPath proj.relPath;
yarnLock =
@ -71,7 +72,7 @@ let
dev = ! noDev;
packageJson =
(tree.getNodeFromPath "${relPath}/package.json").jsonContent;
(tree.getNodeFromPath "package.json").jsonContent;
packageJsonDeps = nodejsUtils.getPackageJsonDeps packageJson noDev;
@ -299,7 +300,7 @@ let
in
{
name = defaultPackage;
version = packageJson.version;
version = packageJson.version or "unknown";
dependencies = [
{inherit name; version = dependencyAttrs.version;}
];

View File

@ -22,6 +22,5 @@ utils.writePureShellScript
--attribute-name prettier \
--arg name="{automatic}" \
--arg noDev=false \
--arg nodejs=14 \
--arg peer=false
--arg nodejs=14
''