mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-11-13 08:06:18 +03:00
fixes for yarn-lock translator
This commit is contained in:
parent
54b9d1a61e
commit
07a2e7cd9f
@ -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
|
||||
|
@ -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;}
|
||||
];
|
||||
|
@ -22,6 +22,5 @@ utils.writePureShellScript
|
||||
--attribute-name prettier \
|
||||
--arg name="{automatic}" \
|
||||
--arg noDev=false \
|
||||
--arg nodejs=14 \
|
||||
--arg peer=false
|
||||
--arg nodejs=14
|
||||
''
|
||||
|
Loading…
Reference in New Issue
Block a user