chore: add missing keywords to two array/base/assert packages#13334
Draft
Planeshifter wants to merge 2 commits into
Draft
chore: add missing keywords to two array/base/assert packages#13334Planeshifter wants to merge 2 commits into
array/base/assert packages#13334Planeshifter wants to merge 2 commits into
Conversation
Add `test` and `validate` keywords to bring `array/base/assert/contains` in line with 24/26 (92%) of its `array/base/assert/*` siblings, which consistently include both keywords in their `package.json`. The functional character of the package - testing whether an array contains a given value - matches the assertion utility siblings that already carry these keywords (e.g. `has-equal-values`, `has-same-values`). Keywords only affect discoverability metadata; no source code, tests, or documented behavior change.
Add `test` and `validate` keywords to bring `array/base/assert/is-sorted-ascending` in line with 24/26 (92%) of its `array/base/assert/*` siblings, which consistently include both keywords in their `package.json`. The functional character of the package - testing whether an array is sorted in ascending order - matches the assertion utility siblings that already carry these keywords. Keywords only affect discoverability metadata; no source code, tests, or documented behavior change.
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
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 pull request:
testandvalidatekeywords toarray/base/assert/containsandarray/base/assert/is-sorted-ascendingto bring them in line with the rest of thearray/base/assert/*namespace.Namespace summary
@stdlib/array/base/assert/.package.jsonshape, README section list,manifest.jsonshape, test/benchmark/example file naming, JSDoc shape, error construction, dependency graph.testkeyword (24/26 = 92%),validatekeyword (24/26 = 92%), file-tree presence oflib/index.js,lib/main.js,benchmark/,examples/,test/,docs/,docs/types/,docs/repl.txt(26/26), returned typeboolean(26/26),@examplepresent in exported JSDoc (26/26), error constructionnone(26/26 - allbase/packages skip validation).benchmark.js, split by whether the function iterates over an array); README##section list (65%[Usage, Examples]vs 35%[Usage, Notes, Examples]); assignment form inmain.js(58%function foo() {}vs 42%var isX = contains(dtypes(...)), correlated with whether the function is factory-produced).array/base/assert/containsAdd
testandvalidateto thekeywordsarray. 24 of the 26 packages in this namespace carry both — the siblinghas-*assertions (has-equal-values,has-same-values, ...) share the same functional shape ascontains(test-a-property-of-an-array) and list both keywords.containsis one of two holdouts.array/base/assert/is-sorted-ascendingAdd
testandvalidateto thekeywordsarray. Same rationale:is-sorted-ascendingtests an array-level property and matches thehas-*sibling shape, but currently omits both keywords. The other 24 packages in the namespace include them.Related Issues
None.
Questions
No.
Other
Validation
package.jsontop-level/scripts/keywords,manifest.jsonshape, README##/###heading sequence, test/benchmark/example filename lists.lib/main.jsandlib/index.jsfor public signature, exported JSDoc block (@param/@returns/@throws/@example), error-construction form, and dependency set (require()calls). Semantic space is uniform: 0throwstatements across the namespace (the sole exception iscontains/lib/factory.js, which is public API and intentional), 0lib/validate.jsfiles, and all 26 exported functions returnboolean. This is expected forbase/packages, which trust their inputs.testandvalidatekeyword additions incontainsandis-sorted-ascendingcleared the 75% majority threshold and all pre-validation gates (no open-PR collision, no autogenerated files touched, ≥90% ecosystem-wide presence for the added keywords inassert/*namespaces, materiality satisfied by batching two outliers).test.factory.js/test.main.jsincontains(factory sub-API is intentional; other 25 packages have no factory to test).benchmark.length.js/benchmark.accessors.length.json thehas-*cluster and oncontains/is-sorted-ascending(semantic-driven: only packages that iterate over an array benchmark across lengths). README## Notessection presence (no majority - 65/35 split).__stdlib__package.json key (54% presence - no majority; tracks a dtype-name-check subgroup). The fiveis-*arraypackages using thestdassert/assertionkeyword cluster instead ofstdtypes/types(81/19 split, but the 5 form a coherent subgroup by design).Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was authored by Claude Code running a cross-package drift-detection routine over
@stdlib/array/base/assert/*. The routine extracted structural and semantic features from all 26 non-autogenerated members, identifiedtest/validatekeyword presence (92% majority) as the sole finding surviving the drift filters, and applied the mechanicalpackage.jsonedits.@stdlib-js/reviewers
Generated by Claude Code