From 9c2a34f43619f140b64cb6788e050305996b3d30 Mon Sep 17 00:00:00 2001 From: Ruben Romero Montes Date: Tue, 14 Apr 2026 13:15:27 +0200 Subject: [PATCH 1/3] docs: document _getDependencyData() directory parameter semantics Add JSDoc to Base_pyproject._getDependencyData() explaining that manifestDir is the project directory and workspaceDir is the lock file directory. Documents when each should be used by lock-file-based vs non-lock-file providers. Implements TC-4102 Assisted-by: Claude Code --- src/providers/base_pyproject.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/providers/base_pyproject.js b/src/providers/base_pyproject.js index 0bf7fb8..d893afe 100644 --- a/src/providers/base_pyproject.js +++ b/src/providers/base_pyproject.js @@ -168,6 +168,17 @@ export default class Base_pyproject { /** * Resolve dependencies using the tool-specific command and parser. + * + * Called by {@link _createSbom} with two directory parameters: + * - `manifestDir` is where `pyproject.toml` lives (the project directory). + * - `workspaceDir` is where the lock file lives, resolved by `_findLockFileDir()`. + * Falls back to `manifestDir` when no lock file is found. + * + * Lock-file-based providers (uv, poetry) use `workspaceDir` for lock-file + * operations. Non-lock-file providers (pip) must use `manifestDir` because + * commands like `pip install .` run relative to the project directory. + * Subclasses that ignore `workspaceDir` should prefix it with `_`. + * * @param {string} manifestDir - directory containing the target pyproject.toml * @param {string} workspaceDir - workspace root (where the lock file lives), or same as manifestDir for standalone projects * @param {object} parsed - parsed pyproject.toml From 72c33741b426f8153fde5dbd12f6eff570088b6f Mon Sep 17 00:00:00 2001 From: Ruben Romero Montes Date: Tue, 14 Apr 2026 13:39:38 +0200 Subject: [PATCH 2/3] docs: address review feedback on _getDependencyData JSDoc Remove caller reference, fix inaccurate fallback claim, and correct workspaceDir description to scope it to uv only (poetry ignores it). Implements TC-4102 Assisted-by: Claude Code --- src/providers/base_pyproject.js | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/providers/base_pyproject.js b/src/providers/base_pyproject.js index d893afe..ed44fd3 100644 --- a/src/providers/base_pyproject.js +++ b/src/providers/base_pyproject.js @@ -169,18 +169,10 @@ export default class Base_pyproject { /** * Resolve dependencies using the tool-specific command and parser. * - * Called by {@link _createSbom} with two directory parameters: - * - `manifestDir` is where `pyproject.toml` lives (the project directory). - * - `workspaceDir` is where the lock file lives, resolved by `_findLockFileDir()`. - * Falls back to `manifestDir` when no lock file is found. - * - * Lock-file-based providers (uv, poetry) use `workspaceDir` for lock-file - * operations. Non-lock-file providers (pip) must use `manifestDir` because - * commands like `pip install .` run relative to the project directory. - * Subclasses that ignore `workspaceDir` should prefix it with `_`. - * * @param {string} manifestDir - directory containing the target pyproject.toml - * @param {string} workspaceDir - workspace root (where the lock file lives), or same as manifestDir for standalone projects + * @param {string} workspaceDir - workspace root (where the lock file lives); + * only used by providers that need workspace-level resolution (e.g. uv). + * Providers that don't use it should prefix with `_`. * @param {object} parsed - parsed pyproject.toml * @param {Object} opts * @returns {Promise} From 4c9dc957104c8a3e7e9591089b5105253b2164ee Mon Sep 17 00:00:00 2001 From: Ruben Romero Montes Date: Tue, 14 Apr 2026 13:46:06 +0200 Subject: [PATCH 3/3] docs: drop obvious JS convention from JSDoc Implements TC-4102 Assisted-by: Claude Code --- src/providers/base_pyproject.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/providers/base_pyproject.js b/src/providers/base_pyproject.js index ed44fd3..fcc309f 100644 --- a/src/providers/base_pyproject.js +++ b/src/providers/base_pyproject.js @@ -171,8 +171,7 @@ export default class Base_pyproject { * * @param {string} manifestDir - directory containing the target pyproject.toml * @param {string} workspaceDir - workspace root (where the lock file lives); - * only used by providers that need workspace-level resolution (e.g. uv). - * Providers that don't use it should prefix with `_`. + * only used by providers that need workspace-level resolution (e.g. uv) * @param {object} parsed - parsed pyproject.toml * @param {Object} opts * @returns {Promise}