Merge pull request #102 from tgunnoe/workspace-name-fix

fix: use name attr before workspace path
This commit is contained in:
DavHau 2022-04-02 03:41:24 +07:00 committed by GitHub
commit 2b4c65a589
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -289,10 +289,11 @@
})
packageJsonDeps;
workspaceDependendencies =
workspaceDependencies =
l.mapAttrsToList
(wsName: wsJson: {
name = wsName;
(wsPath: wsJson: {
# If the name attr doesn't exist, use the relative path as name
name = wsJson.name or wsPath;
version = wsJson.version or "unknown";
})
workspacesPackageJson;
@ -300,7 +301,7 @@
{
name = defaultPackage;
version = packageJson.version or "unknown";
dependencies = defaultPackageDependencies ++ workspaceDependendencies;
dependencies = defaultPackageDependencies ++ workspaceDependencies;
}
];