Skip to content

refactor: align ndarray/* errors and remove namespace self-ref#12102

Merged
kgryte merged 1 commit into
developfrom
philipp/fix-propagation-2026-05-12
May 12, 2026
Merged

refactor: align ndarray/* errors and remove namespace self-ref#12102
kgryte merged 1 commit into
developfrom
philipp/fix-propagation-2026-05-12

Conversation

@Planeshifter
Copy link
Copy Markdown
Member

Description

What is the purpose of this pull request?

Propagating fixes merged to develop between 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 @throws JSDoc annotations and, for ndarray/iter/rows, ndarray/iter/columns, ndarray/iter/row-entries, and ndarray/iter/column-entries, in the corresponding runtime TypeError messages as well. ndarray/base/rot90 required 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 by ndarray/transpose, ndarray/vconcat, and ndarray/base/diagonal.

    Source: c77fbd9

    Target packages:

    • ndarray/diagonal
    • ndarray/rot90
    • ndarray/rot180
    • ndarray/to-rot90
    • ndarray/to-rot180
    • ndarray/base/rot90
    • ndarray/base/to-rot90
    • ndarray/base/to-rot180
    • ndarray/base/fill-diagonal
    • ndarray/iter/rows
    • ndarray/iter/columns
    • ndarray/iter/row-entries
    • ndarray/iter/column-entries
  • Propagates c77fbd9 across the remaining namespace entries. Scans all 3,201 ns.push blocks in 91 files under lib/node_modules/@stdlib/namespace/lib/namespace/ and removes the one outstanding self-reference: the US_STATES_NAMES_CAPITALS entry in u.js, whose path (@stdlib/datasets/us-states-names-capitals) appeared in its own related array. 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_CAPITALS in lib/namespace/u.js)

Related Issues

Does this pull request have any related issues?

No.

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

Validation. For each propagation pattern, scope was determined by the search signature derived from the source commit: for the dimension-error pattern, rg-scanned lib/node_modules/@stdlib/ndarray/**/lib/*.js for the substring at least two dimensions in @throws JSDoc lines and throw new statements (descriptive text and .d.ts/README/repl.txt files were excluded as not error-message sites); for the namespace pattern, every ns.push({...}) block under lib/node_modules/@stdlib/namespace/lib/namespace/ was parsed for entries listing their own path in their related array. 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.ts were deliberately excluded — the source commit did not touch those classes of file, so they are out of scope. No site was flagged needs-human; none were dropped during patch application.

Checklist

Please ensure the following tasks are completed before submitting this pull request.

AI Assistance

When authoring the changes proposed in this PR, did you use any kind of AI assistance?

  • Yes
  • No

If you answered "yes" above, how did you use AI assistance?

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Disclosure

If you answered "yes" to using AI assistance, please provide a short disclosure indicating how you used AI assistance. This helps reviewers determine how much scrutiny to apply when reviewing your contribution. Example disclosures: "This PR was written primarily by Claude Code." or "I consulted ChatGPT to understand the codebase, but the proposed changes were fully authored manually by myself.".

This PR was generated by Claude Code as part of an automated fix-propagation routine. The routine identifies generalizable fix patterns in recent develop commits, 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

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).
@stdlib-bot
Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
namespace $\color{red}40062/40165$
$\color{green}+99.74%$
$\color{green}113/113$
$\color{green}+100.00%$
$\color{red}2/11$
$\color{green}+18.18%$
$\color{red}40062/40165$
$\color{green}+99.74%$
ndarray/base/fill-diagonal $\color{green}117/117$
$\color{green}+100.00%$
$\color{green}3/3$
$\color{green}+100.00%$
$\color{green}1/1$
$\color{green}+100.00%$
$\color{green}117/117$
$\color{green}+100.00%$
ndarray/base/rot90 $\color{green}182/182$
$\color{green}+100.00%$
$\color{green}19/19$
$\color{green}+100.00%$
$\color{green}1/1$
$\color{green}+100.00%$
$\color{green}182/182$
$\color{green}+100.00%$
ndarray/base/to-rot180 $\color{green}117/117$
$\color{green}+100.00%$
$\color{green}3/3$
$\color{green}+100.00%$
$\color{green}1/1$
$\color{green}+100.00%$
$\color{green}117/117$
$\color{green}+100.00%$
ndarray/base/to-rot90 $\color{green}120/120$
$\color{green}+100.00%$
$\color{green}3/3$
$\color{green}+100.00%$
$\color{green}1/1$
$\color{green}+100.00%$
$\color{green}120/120$
$\color{green}+100.00%$
ndarray/diagonal $\color{green}142/142$
$\color{green}+100.00%$
$\color{green}16/16$
$\color{green}+100.00%$
$\color{green}1/1$
$\color{green}+100.00%$
$\color{green}142/142$
$\color{green}+100.00%$
ndarray/iter/column-entries $\color{green}290/290$
$\color{green}+100.00%$
$\color{green}27/27$
$\color{green}+100.00%$
$\color{green}4/4$
$\color{green}+100.00%$
$\color{green}290/290$
$\color{green}+100.00%$
ndarray/iter/columns $\color{green}285/285$
$\color{green}+100.00%$
$\color{green}27/27$
$\color{green}+100.00%$
$\color{green}4/4$
$\color{green}+100.00%$
$\color{green}285/285$
$\color{green}+100.00%$
ndarray/iter/row-entries $\color{green}290/290$
$\color{green}+100.00%$
$\color{green}27/27$
$\color{green}+100.00%$
$\color{green}4/4$
$\color{green}+100.00%$
$\color{green}290/290$
$\color{green}+100.00%$
ndarray/iter/rows $\color{green}285/285$
$\color{green}+100.00%$
$\color{green}27/27$
$\color{green}+100.00%$
$\color{green}4/4$
$\color{green}+100.00%$
$\color{green}285/285$
$\color{green}+100.00%$
ndarray/rot180 $\color{green}129/129$
$\color{green}+100.00%$
$\color{green}11/11$
$\color{green}+100.00%$
$\color{green}1/1$
$\color{green}+100.00%$
$\color{green}129/129$
$\color{green}+100.00%$
ndarray/rot90 $\color{green}142/142$
$\color{green}+100.00%$
$\color{green}16/16$
$\color{green}+100.00%$
$\color{green}1/1$
$\color{green}+100.00%$
$\color{green}142/142$
$\color{green}+100.00%$
ndarray/to-rot180 $\color{green}129/129$
$\color{green}+100.00%$
$\color{green}11/11$
$\color{green}+100.00%$
$\color{green}1/1$
$\color{green}+100.00%$
$\color{green}129/129$
$\color{green}+100.00%$
ndarray/to-rot90 $\color{green}142/142$
$\color{green}+100.00%$
$\color{green}16/16$
$\color{green}+100.00%$
$\color{green}1/1$
$\color{green}+100.00%$
$\color{green}142/142$
$\color{green}+100.00%$

The above coverage report was generated for the changes in this PR.

@Planeshifter Planeshifter requested a review from kgryte May 12, 2026 15:05
@Planeshifter Planeshifter marked this pull request as ready for review May 12, 2026 15:05
@Planeshifter Planeshifter requested a review from a team May 12, 2026 15:05
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label May 12, 2026
@kgryte kgryte merged commit 65f9d6f into develop May 12, 2026
36 checks passed
@kgryte kgryte deleted the philipp/fix-propagation-2026-05-12 branch May 12, 2026 17:16
@kgryte kgryte removed the Needs Review A pull request which needs code review. label May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants