From 056ed6f4eef8b34fe9edb6e0065d79fd86a25bc6 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 30 Sep 2026 00:50:23 +0000 Subject: [PATCH 1/3] docs: document thrown errors in `@stdlib/_tools/pkgs/dep-list` Added the two `@throws {TypeError}` annotations for options validation (`options argument must be an object`, `must provide valid options`), which are present in 21 of the 23 namespace siblings having a `lib/validate.js` (91%; 84% of all 25 members). `depList` propagates the errors returned by `lib/validate.js` via `throw err`, and `test/test.js` already asserts both, so the annotations were the only thing missing. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_014UdGBAZUyqVKsGZygrZaJk --- lib/node_modules/@stdlib/_tools/pkgs/dep-list/lib/main.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/node_modules/@stdlib/_tools/pkgs/dep-list/lib/main.js b/lib/node_modules/@stdlib/_tools/pkgs/dep-list/lib/main.js index 0a9b74289f30..dc20eed32a54 100644 --- a/lib/node_modules/@stdlib/_tools/pkgs/dep-list/lib/main.js +++ b/lib/node_modules/@stdlib/_tools/pkgs/dep-list/lib/main.js @@ -59,6 +59,8 @@ function ascending( a, b ) { * @param {boolean} [options.dev=false] - boolean indicating whether to return development dependencies * @param {boolean} [options.manifest=true] - boolean indicating whether to return dependencies from `manifest.json` files * @throws {TypeError} first argument must be a string +* @throws {TypeError} options argument must be an object +* @throws {TypeError} must provide valid options * @returns {(StringArray|EmptyArray)} dependencies * * @example From 9a321eaeabaad495f9ec64468f04667aa83e24a5 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 30 Sep 2026 00:50:33 +0000 Subject: [PATCH 2/3] docs: correct annotations in `@stdlib/_tools/pkgs/namespace-deps` Corrected two option types and added two missing `@throws` annotations: - `options.dev` was annotated `{string}` while `lib/validate.js` checks `isBoolean`, its own annotation reads `{boolean}`, and the default is `false`; public option types agree with `lib/validate.js` in 22 of 23 siblings (96%; 88% of all 25 members). - `options.level` was annotated `{number}` while `lib/validate.js` checks `isPositiveInteger` and annotates it `{PositiveInteger}`. - Added `@throws {TypeError} options argument must be an object` and `@throws {TypeError} must provide valid options`, present in 21 of the 23 siblings having a `lib/validate.js` (91%; 84% of all members). `namespaceDeps` propagates both via `throw err` and `test/test.js` and `test/test.validate.js` already assert them. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_014UdGBAZUyqVKsGZygrZaJk --- .../@stdlib/_tools/pkgs/namespace-deps/lib/main.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/_tools/pkgs/namespace-deps/lib/main.js b/lib/node_modules/@stdlib/_tools/pkgs/namespace-deps/lib/main.js index dae022d0730d..7319227d5b47 100644 --- a/lib/node_modules/@stdlib/_tools/pkgs/namespace-deps/lib/main.js +++ b/lib/node_modules/@stdlib/_tools/pkgs/namespace-deps/lib/main.js @@ -56,9 +56,11 @@ function ascending( a, b ) { * * @param {string} pkg - package * @param {Options} [options] - function options -* @param {string} [options.dev=false] - boolean indicating whether to return development dependencies -* @param {number} [options.level=1] - dependency level +* @param {boolean} [options.dev=false] - boolean indicating whether to return development dependencies +* @param {PositiveInteger} [options.level=1] - dependency level * @throws {TypeError} first argument must be a string +* @throws {TypeError} options argument must be an object +* @throws {TypeError} must provide valid options * @returns {(StringArray|EmptyArray)} dependencies * * @example From c6c595295df14faf93d45d3c4edd6012b19baae7 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 30 Sep 2026 00:50:42 +0000 Subject: [PATCH 3/3] docs: mark `options` as optional in `@stdlib/_tools/pkgs/installed` Bracketed the `options` parameter annotation. `pkgs` dispatches on `arguments.length`, treating a single argument as the callback, and both the README signature (`pkgs( [options], clbk )`) and `examples/index.js` call the function without options. The child options were already bracketed. 22 of the 23 namespace siblings taking an options argument bracket it (96%; 88% of all 25 members). Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_014UdGBAZUyqVKsGZygrZaJk --- lib/node_modules/@stdlib/_tools/pkgs/installed/lib/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/_tools/pkgs/installed/lib/main.js b/lib/node_modules/@stdlib/_tools/pkgs/installed/lib/main.js index ea06fdf525ef..db48af0e4ab8 100644 --- a/lib/node_modules/@stdlib/_tools/pkgs/installed/lib/main.js +++ b/lib/node_modules/@stdlib/_tools/pkgs/installed/lib/main.js @@ -44,7 +44,7 @@ var debug = createDebug( 'installed-pkgs:main' ); /** * Generates a list of installed package dependencies. * -* @param {Options} options - function options +* @param {Options} [options] - function options * @param {string} [options.dir] - root directory from which to search * @param {NonNegativeInteger} [options.depth] - search depth * @param {boolean} [options.dev=true] - boolean indicating whether to include dev dependencies