docs: add missing JSDoc example sections in _tools/pkgs packages#11804
Merged
docs: add missing JSDoc example sections in _tools/pkgs packages#11804
_tools/pkgs packages#11804Conversation
Added `@example` blocks to the public `depList` function's JSDoc (present in 92% of `_tools/pkgs` siblings, 23/25). Examples are lifted from the package README's existing usage snippets; no behavioral or signature changes. https://claude.ai/code/session_018TZhAvyL3P8FYzhGm4G1LH
Added `@example` blocks to the public `namespaceDeps` function's JSDoc (present in 92% of `_tools/pkgs` siblings, 23/25). Examples are lifted from the package README's existing usage snippets; no behavioral or signature changes. https://claude.ai/code/session_018TZhAvyL3P8FYzhGm4G1LH
…espace-deps}` examples Renamed the JSDoc `@example` result variable from `deps`/`devDeps` to `out` so the example does not shadow the module-scope `var deps = require( './deps.js' );` import. Without this rename, the example-runner shadowed the internal `deps` function and threw `deps is not a function` when invoking the public function. https://claude.ai/code/session_018TZhAvyL3P8FYzhGm4G1LH
_tools/pkgs with namespace JSDoc convention_tools/pkgs packages
_tools/pkgs packages_tools/pkgs packages
kgryte
approved these changes
Apr 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds
@exampleblocks to thedepListpublic function JSDoc in_tools/pkgs/dep-list, bringing it into line with the 92% of_tools/pkgssiblings that document at least one usage example. Examples are lifted directly from the package README: a basic invocation with a package identifier string and an options invocation usingdev: true. No behavioral, signature, or test changes.@exampleblocks to the publicnamespaceDepsJSDoc in_tools/pkgs/namespace-deps, bringing the package into conformance with the 92% of_tools/pkgssiblings that document at least one usage example. The two examples are lifted directly from the README: a basicnamespaceDeps( '@stdlib/assert' )call and adev: trueoptions variant. No signatures, behavior, or tests were changed.Related Issues
None.
Questions
No.
Other
Validation
What was checked:
package.jsonshape, README section structure, per-subdir file listings).publicSignature,validationPrologue,errorConstruction,jsdocShape,dependencies).dep-listandnamespace-depsreturnedconfirmed-driftfrom the semantic-review and cross-reference agents on thehasExamplefinding; no test or doc-tooling cascade was identified.What was deliberately excluded:
lib/sync.js(dep-list,installed,name2bucket,name2standalone,namespace-deps) — five packages are sync-only or async-only by design, so the async/sync split does not apply. Outliers missinglib/validate.js(name2bucket,name2standalone) similarly take no options object and validate inline. Markedinapplicableby the structural-review agent.installedis missing tests entirely, missingdirectories.test, and lacks a## Examplesheading; correcting any of these cascades into writing tests or example content, which is out of scope for mechanical drift correction.dep-listandnamespace-depshave empty<section class="notes">containers without### Notesheadings. Adding the heading without content would create a different kind of weirdness, and content requires package-specific judgement; dropped.publicSignatureandvalidationProloguevary with each function's input domain across the namespace; no namespace-wide pattern at ≥75%.Checklist
AI Assistance
How AI assistance was used:
Disclosure
This PR was authored end-to-end by Claude Code as part of an automated cross-package drift detection routine. Three independent validator sub-agents (one Opus semantic review, one Opus cross-reference, one Sonnet structural review) confirmed both
dep-listandnamespace-depsas mechanical-drift outliers before the change was applied. The example bodies were lifted verbatim from each package's existingREADME.md. A human maintainer should audit before promoting this PR out of draft.@stdlib-js/reviewers
Generated by Claude Code