refactor: align ndarray/* errors and remove namespace self-ref#12102
Merged
Conversation
Propagates fix from c77fbd9 ("refactor: align `ndarray/base/diagonal` error message and remove `namespace` self-refs") to sibling packages. In `ndarray/*` lib/main.js files, replaces the `at least two dimensions` phrasing with `two or more dimensions` in `@throws` JSDoc tags and in runtime error messages, aligning with the wording established by `ndarray/transpose`, `ndarray/vconcat`, `ndarray/base/diagonal`, and others. In `ndarray/base/rot90/lib/main.js`, the runtime throw already used the aligned wording; only the `@throws` JSDoc lagged. In `lib/node_modules/@stdlib/namespace/lib/namespace/u.js`, removes the self-reference in the `US_STATES_NAMES_CAPITALS` entry's `related` array (the entry's own path was listed among its related packages).
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
kgryte
approved these changes
May 12, 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
Propagating fixes merged to
developbetween 2026-05-11T13:56:05-07:00 and 2026-05-12T01:42:58-07:00 to sibling packages.This pull request:
Propagates the error-message wording introduced in c77fbd9 across thirteen
ndarray/*packages, replacing"at least two dimensions"with"two or more dimensions"in@throwsJSDoc annotations and, forndarray/iter/rows,ndarray/iter/columns,ndarray/iter/row-entries, andndarray/iter/column-entries, in the corresponding runtimeTypeErrormessages as well.ndarray/base/rot90required only a JSDoc update, as its runtime throw already carried the aligned phrasing. This brings the full set of dimension-arity error messages into conformance with the wording established byndarray/transpose,ndarray/vconcat, andndarray/base/diagonal.Source: c77fbd9
Target packages:
ndarray/diagonalndarray/rot90ndarray/rot180ndarray/to-rot90ndarray/to-rot180ndarray/base/rot90ndarray/base/to-rot90ndarray/base/to-rot180ndarray/base/fill-diagonalndarray/iter/rowsndarray/iter/columnsndarray/iter/row-entriesndarray/iter/column-entriesPropagates c77fbd9 across the remaining namespace entries. Scans all 3,201
ns.pushblocks in 91 files underlib/node_modules/@stdlib/namespace/lib/namespace/and removes the one outstanding self-reference: theUS_STATES_NAMES_CAPITALSentry inu.js, whosepath(@stdlib/datasets/us-states-names-capitals) appeared in its ownrelatedarray. As with the source commit, the self-ref was the last element, so the preceding entry's trailing comma is also removed to maintain consistent style.Source: c77fbd9
Target package:
namespace(entry:US_STATES_NAMES_CAPITALSinlib/namespace/u.js)Related Issues
No.
Questions
No.
Other
Validation. For each propagation pattern, scope was determined by the search signature derived from the source commit: for the dimension-error pattern,
rg-scannedlib/node_modules/@stdlib/ndarray/**/lib/*.jsfor the substringat least two dimensionsin@throwsJSDoc lines andthrow newstatements (descriptive text and.d.ts/README/repl.txt files were excluded as not error-message sites); for the namespace pattern, everyns.push({...})block underlib/node_modules/@stdlib/namespace/lib/namespace/was parsed for entries listing their ownpathin theirrelatedarray. Two independent validation agents confirmed every site by reading the surrounding code; an adaptation pass produced exact diffs; a style-consistency pass approved the resulting wording. Sites that would have cascaded into tests, READMEs, or.d.tswere deliberately excluded — the source commit did not touch those classes of file, so they are out of scope. No site was flaggedneeds-human; none were dropped during patch application.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was generated by Claude Code as part of an automated fix-propagation routine. The routine identifies generalizable fix patterns in recent
developcommits, searches for sibling sites with the same defect, runs multi-agent validation (two independent validators, one adaptation reviewer, one style-consistency reviewer) against each candidate site, and produces a draft PR applying the equivalent fix at every validated location.Generated by Claude Code