docs: populate Examples section and add baseline tests for _tools/licenses/licenses#12273
Open
Planeshifter wants to merge 2 commits into
Open
docs: populate Examples section and add baseline tests for _tools/licenses/licenses#12273Planeshifter wants to merge 2 commits into
Examples section and add baseline tests for _tools/licenses/licenses#12273Planeshifter wants to merge 2 commits into
Conversation
…licenses/licenses` - Filled in placeholder `## Examples` section in README.md using the existing `examples/index.js` snippet (the `<section class="examples">` wrapper was present but the heading and code block were commented out; 9 of 11 sibling packages in `@stdlib/_tools/licenses` already populate this section). - Added `test/test.js` with a smoke test asserting the main export is a function and a callback-argument validation test (9 of 11 sibling packages already have a `test/test.js`; `licenses` had no tests at all). - Added the corresponding `test` entry to `directories` in `package.json`.
Member
Author
|
/stdlib update-copyright-years |
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
Restore two convention-required artifacts in
@stdlib/_tools/licenses/licensesthat were missing relative to its sibling packages.Namespace summary
@stdlib/_tools/licensesheader,header-regexp,header-regexp-table,infer,insert-header,insert-header-file-list,licenses,remove-header,remove-header-file-list,update-header,update-header-file-list)package.jsonshape, README section list,manifest.json, test/example/benchmark file naming, public signature, return kind, validation prologue, error construction, JSDoc shape, source-level@stdlib/*dependenciestest/test.js(9/11), populated## ExamplesREADME section (9/11),errorConstruction === 'format'(9/11)binfield /bin/cliartifacts (7/11),__stdlib__andospackage.json fields (6/11), presence of## CLI(7/11) and## Notes(6/11) README sections,returnKind(6/11valuevs 5/11void),publicSignatureandvalidationPrologue(highly variable across packages with intentionally different APIs)_tools/licenses/licensesThe
<section class="examples">wrapper inREADME.mdwas scaffolded but its heading and code block were commented out; this PR populates the section with a runnable snippet derived from the existingexamples/index.js. The package shipped without atest/directory at all; this PR addstest/test.jswith a smoke test asserting the main export is a function and a callback-argument validation test exercising the documentedTypeError.package.jsongains the corresponding"test": "./test"entry underdirectories. Conformance for both structural features: 9/11 (82%).Related Issues
No.
Questions
No.
Other
Validation
package.jsonkeys, README section list (case-preserved, h2/h3, in order),manifest.jsonshape, and naming of files undertest//examples//benchmark/were collected per package from the working tree.lib/main.js,lib/index.js, and (where present)lib/validate.js, returning a fixed JSON schema covering public signature, return kind, validation prologue, error construction, JSDoc shape, and@stdlib/*source dependencies.Deliberately excluded
inferhas the same two structural drifts (missingtest/test.js, unpopulated## Examples), butinfer/lib/main.jsis annotated@private(internal-only API). The cross-reference pass returnedneeds-humanon both candidates, so they were dropped pending a maintainer decision on whether the@privateannotation should override the namespace convention.header-regexpandinfererror construction. Flagged as outliers because they don't useformatfor error construction, but neither file constructs validation errors of its own:header-regexpdelegates input validation tolicenseHeader(line 50 comment), andinferonly propagates errors fromglob/readFilescallbacks. The semantic-review pass marked both as intentional deviations.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was authored by Claude Code running an automated cross-package API-drift detection routine over the eleven packages in
@stdlib/_tools/licenses. Candidate fixes were generated by majority-vote analysis (75% threshold) and gated through three independent validation passes before any change was applied. The applied changes are mechanical: the README example is the existingexamples/index.jsrewritten as an inline snippet using the public require path, and the test file follows the minimal sibling pattern (tape('main export is a function', ...)) plus a single validation case for the documentedTypeError. Full audit trail — including dropped candidates and rejection reasons — is in the local run report.@stdlib-js/reviewers
Generated by Claude Code