Skip to content

Commit

Permalink
Adds is_workspace properties to uv parent components (#1590)
Browse files Browse the repository at this point in the history
Signed-off-by: Prabhu Subramanian <[email protected]>
  • Loading branch information
prabhu authored Jan 22, 2025
1 parent 459dfe1 commit f7a6a4c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
5 changes: 1 addition & 4 deletions lib/evinser/evinser.js
Original file line number Diff line number Diff line change
Expand Up @@ -1017,10 +1017,7 @@ export function isFilterableType(language, userDefinedTypesMap, typeFullName) {
return true;
}
}
if (userDefinedTypesMap[typeFullName]) {
return true;
}
return false;
return !!userDefinedTypesMap[typeFullName];
}

/**
Expand Down
14 changes: 14 additions & 0 deletions lib/helpers/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -4793,6 +4793,20 @@ export async function parsePyLockData(lockData, lockFile, pyProjectFile) {
// Nested workspace is not supported
const wcompMap = parsePyProjectTomlFile(awpyproj);
if (wcompMap?.parentComponent) {
wcompMap.parentComponent.properties =
wcompMap.parentComponent.properties || [];
wcompMap.parentComponent.properties.push({
name: "internal:is_workspace",
value: "true",
});
wcompMap.parentComponent.properties.push({
name: "SrcFile",
value: awpyproj,
});
wcompMap.parentComponent.properties.push({
name: "internal:virtual_path",
value: relative(dirname(lockFile), dirname(awpyproj)),
});
workspaceComponentMap[wcompMap.parentComponent.name] =
wcompMap.parentComponent;
workspacePyProjMap[wcompMap.parentComponent.name] = awpyproj;
Expand Down
2 changes: 1 addition & 1 deletion types/lib/helpers/utils.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f7a6a4c

Please sign in to comment.