Skip to content

Commit

Permalink
Tweaks to uv workspace
Browse files Browse the repository at this point in the history
Signed-off-by: Prabhu Subramanian <[email protected]>
  • Loading branch information
prabhu committed Jan 6, 2025
1 parent 38f3322 commit bfcf303
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
4 changes: 3 additions & 1 deletion lib/cli/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3034,7 +3034,9 @@ export async function createPythonBom(path, options) {
}
}
}
const requirementsMode = reqFiles?.length || reqDirFiles?.length;
// When we identify uv lock files, do not parse requirements files
const requirementsMode =
(reqFiles?.length || reqDirFiles?.length) && !uvLockFiles.length;
const poetryMode = poetryFiles?.length;

// TODO: Support for nested directories
Expand Down
5 changes: 4 additions & 1 deletion lib/helpers/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -4304,7 +4304,10 @@ export function parsePyProjectTomlFile(tomlFile) {
Array.isArray(tomlData.tool.uv.workspace?.members)
) {
for (const amember of tomlData.tool.uv.workspace.members) {
workspacePaths.push(amember.replace(/\/\*$/, "/**/pyproject.toml"));
const memberPyProjPaths = amember.endsWith("/*")
? amember.replace(/\/\*$/, "/**/pyproject.toml")
: `${amember}/**/pyproject.toml`;
workspacePaths.push(memberPyProjPaths);
}
}
// uv and others
Expand Down
2 changes: 1 addition & 1 deletion types/lib/cli/index.d.ts.map

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

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 bfcf303

Please sign in to comment.