Skip to content

docs: propagate recent develop fixes to sibling packages (2026-06-29)#13198

Open
Planeshifter wants to merge 4 commits into
developfrom
philipp/fix-propagation-2026-06-29
Open

docs: propagate recent develop fixes to sibling packages (2026-06-29)#13198
Planeshifter wants to merge 4 commits into
developfrom
philipp/fix-propagation-2026-06-29

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Description

Propagating fixes merged to develop between 285b78193 (2026-06-28 15:08 -0700) and 7cdcb0a4d (2026-06-29 02:09 -0700) to sibling packages with the same underlying defect.

Pattern: replace throw with console.error in fs/* JSDoc @example blocks

Source commit 285b78193 rewrote two @example blocks in fs/unlink/lib/{index,sync}.js so that the callback-style if ( error ) { throw error; } and sync-style if ( err instanceof Error ) { throw err; } guards log via console.error( <ident>.message ) instead of rethrowing — copy-pasted snippets no longer crash the file. The identical pattern was present across the rest of fs/*. The source commit's intent was incomplete: fs/unlink/lib/main.js itself still carried the unfixed callback example. This patch applies the source commit's exact line shape to every confirmed sibling, preserving each call site's variable name (err vs error) and indentation.

  • 285b78193 (chore: fix JavaScript lint errors)
    • @stdlib/fs/append-file
    • @stdlib/fs/close
    • @stdlib/fs/open
    • @stdlib/fs/read-file
    • @stdlib/fs/read-file-list
    • @stdlib/fs/read-json
    • @stdlib/fs/read-ndjson
    • @stdlib/fs/read-wasm
    • @stdlib/fs/rename
    • @stdlib/fs/resolve-parent-path
    • @stdlib/fs/resolve-parent-path-by
    • @stdlib/fs/resolve-parent-paths
    • @stdlib/fs/unlink (the lib/main.js callback example that the source commit didn't reach)
    • @stdlib/fs/write-file

Pattern: add // MAIN // section header to number/*/base/identity/lib/main.js

Source commit f29ec0b8e inserted the // MAIN // section comment between 'use strict'; and the first JSDoc in number/uint32/base/identity/lib/main.js. The six sibling integer/float-32 identity packages had the same omission; float64's identity already carries the header and was used as the structural reference. None of the targets import anything, so only // MAIN // is needed — no // MODULES // block.

  • f29ec0b8e (docs: add source section header)
    • @stdlib/number/float32/base/identity
    • @stdlib/number/int8/base/identity
    • @stdlib/number/int16/base/identity
    • @stdlib/number/int32/base/identity
    • @stdlib/number/uint8/base/identity
    • @stdlib/number/uint16/base/identity

Related Issues

None.

Questions

No.

Other

Validation

  • Search scope: per pattern, scoped first to the source commit's namespace (fs/*/lib/*.js for the JSDoc throw replacement; number/*/base/identity/lib/main.js for the section header) and confined there — both patterns are intrinsically namespace-local.
  • Two independent opus validation passes confirmed at every candidate site that (a) the defect text appears as cited, (b) the surrounding context is structurally analogous to the source commit's, and (c) the proposed replacement is the source commit's exact shape. The two passes converged on 33 of 36 candidate fs/* sites and 6 of 6 identity-header sites.
  • A sonnet style-consistency pass verified that the JSDoc ( x ) spacing convention, indentation prefix, and section-header capitalization match the canonical form set by the source commits.

Deliberately excluded:

  • Three validate.js example blocks in fs/resolve-parent-path, fs/resolve-parent-path-by, and fs/resolve-parent-paths: the throw err; line in those files uses a 3-space indent that diverges from the source commit's 5-space indent. One validator flagged the mismatch as needs-human; per the two-validator-must-agree rule, the sites drop. Logged for a follow-up routine pass.
  • chore: fix JavaScript lint errors (7cdcb0a4d) — single-site Object.keys@stdlib/utils/keys swap in _tools/makie/makie/lib/main.js. A full sweep of _tools/**/lib/**/*.js and _tools/**/bin/**/*.js returned zero additional sites.
  • docs: add examples (ce4edb122) — included a shadow-name bug fix (function BigIntfunction isBigInt in assert/is-bigint/lib/object.js). A sweep of every assert/is-*/lib/{object,primitive,generic}.js file (72 files across 32 packages) returned zero additional sites with a function name shadowing a global JS type.
  • Autogenerated namespace-TOC, REPL, and related-packages docs from the stdlib-bot commits (e9f75542, 82e402213, 26d85f803, 591dea2e): generator-owned files; the fix belongs in the generator.

Checklist

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

This PR was authored by Claude Code on behalf of @Planeshifter as an automated propagation of fixes merged to develop over the prior 24 hours. Candidate source commits were filtered for generalisable patterns, sibling sites located via grep-able pattern signatures, and each proposed patch independently validated by parallel reviewer agents (two opus validation passes plus a sonnet style-consistency pass) before commits were applied in the primary worktree. A human will audit and promote the PR out of draft.


@stdlib-js/reviewers


Generated by Claude Code

claude added 2 commits June 29, 2026 13:15
Propagates fix from 285b781 ("chore: fix JavaScript lint errors") to
sibling `fs/*` packages whose JSDoc `@example` blocks rethrow the error
parameter from the callback or sync return path. Re-throwing inside an
example breaks the snippet when copied to a script; logging the error
message keeps the example illustrative without crashing.
…main.js`

Propagates fix from f29ec0b ("docs: add source section header") to the
sibling identity packages under `number/{float32,int8,int16,int32,uint8,
uint16}/base/identity`, which lacked the `// MAIN //` section comment
between `'use strict';` and the first JSDoc block. Aligns each sibling
with the canonical layout already present in `number/float64/base/identity`.
@stdlib-bot

stdlib-bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
fs/append-file $\\color{green}177/177$
$\\color{green}+0.00\\%$
$\\color{green}10/10$
$\\color{green}+0.00\\%$
$\\color{green}2/2$
$\\color{green}+0.00\\%$
$\\color{green}177/177$
$\\color{green}+0.00\\%$
fs/close $\\color{green}206/206$
$\\color{green}+0.00\\%$
$\\color{green}11/11$
$\\color{green}+0.00\\%$
$\\color{green}2/2$
$\\color{green}+0.00\\%$
$\\color{green}206/206$
$\\color{green}+0.00\\%$
fs/open $\\color{green}195/195$
$\\color{green}+0.00\\%$
$\\color{green}12/12$
$\\color{green}+0.00\\%$
$\\color{green}2/2$
$\\color{green}+0.00\\%$
$\\color{green}195/195$
$\\color{green}+0.00\\%$
fs/read-file-list $\\color{green}479/479$
$\\color{green}+0.00\\%$
$\\color{green}46/46$
$\\color{green}+0.00\\%$
$\\color{green}8/8$
$\\color{green}+0.00\\%$
$\\color{green}479/479$
$\\color{green}+0.00\\%$
fs/read-file $\\color{green}181/181$
$\\color{green}+0.00\\%$
$\\color{green}10/10$
$\\color{green}+0.00\\%$
$\\color{green}2/2$
$\\color{green}+0.00\\%$
$\\color{green}181/181$
$\\color{green}+0.00\\%$
fs/read-json $\\color{green}268/268$
$\\color{green}+0.00\\%$
$\\color{green}38/38$
$\\color{green}+0.00\\%$
$\\color{green}3/3$
$\\color{green}+0.00\\%$
$\\color{green}268/268$
$\\color{green}+0.00\\%$
fs/read-ndjson $\\color{green}268/268$
$\\color{green}+0.00\\%$
$\\color{green}38/38$
$\\color{green}+0.00\\%$
$\\color{green}3/3$
$\\color{green}+0.00\\%$
$\\color{green}268/268$
$\\color{green}+0.00\\%$
fs/read-wasm $\\color{green}259/259$
$\\color{green}+0.00\\%$
$\\color{green}28/28$
$\\color{green}+0.00\\%$
$\\color{green}3/3$
$\\color{green}+0.00\\%$
$\\color{green}259/259$
$\\color{green}+0.00\\%$
fs/rename $\\color{green}164/164$
$\\color{green}+0.00\\%$
$\\color{green}6/6$
$\\color{green}+0.00\\%$
$\\color{green}2/2$
$\\color{green}+0.00\\%$
$\\color{green}164/164$
$\\color{green}+0.00\\%$
fs/resolve-parent-path-by $\\color{red}385/388$
$\\color{green}+0.00\\%$
$\\color{red}48/50$
$\\color{green}+0.00\\%$
$\\color{green}6/6$
$\\color{green}+0.00\\%$
$\\color{red}385/388$
$\\color{green}+0.00\\%$
fs/resolve-parent-path $\\color{green}324/324$
$\\color{green}+0.00\\%$
$\\color{green}41/41$
$\\color{green}+0.00\\%$
$\\color{green}4/4$
$\\color{green}+0.00\\%$
$\\color{green}324/324$
$\\color{green}+0.00\\%$
fs/resolve-parent-paths $\\color{green}787/787$
$\\color{green}+0.00\\%$
$\\color{green}112/112$
$\\color{green}+0.00\\%$
$\\color{green}21/21$
$\\color{green}+0.00\\%$
$\\color{green}787/787$
$\\color{green}+0.00\\%$
fs/unlink $\\color{green}162/162$
$\\color{green}+0.00\\%$
$\\color{green}6/6$
$\\color{green}+0.00\\%$
$\\color{green}2/2$
$\\color{green}+0.00\\%$
$\\color{green}162/162$
$\\color{green}+0.00\\%$
fs/write-file $\\color{green}176/176$
$\\color{green}+0.00\\%$
$\\color{green}10/10$
$\\color{green}+0.00\\%$
$\\color{green}2/2$
$\\color{green}+0.00\\%$
$\\color{green}176/176$
$\\color{green}+0.00\\%$
number/float32/base/identity $\\color{green}170/170$
$\\color{green}+0.00\\%$
$\\color{green}5/5$
$\\color{green}+0.00\\%$
$\\color{green}2/2$
$\\color{green}+0.00\\%$
$\\color{green}170/170$
$\\color{green}+0.00\\%$
number/int16/base/identity $\\color{green}159/159$
$\\color{green}+0.00\\%$
$\\color{green}5/5$
$\\color{green}+0.00\\%$
$\\color{green}2/2$
$\\color{green}+0.00\\%$
$\\color{green}159/159$
$\\color{green}+0.00\\%$
number/int32/base/identity $\\color{green}159/159$
$\\color{green}+0.00\\%$
$\\color{green}5/5$
$\\color{green}+0.00\\%$
$\\color{green}2/2$
$\\color{green}+0.00\\%$
$\\color{green}159/159$
$\\color{green}+0.00\\%$
number/int8/base/identity $\\color{green}159/159$
$\\color{green}+0.00\\%$
$\\color{green}5/5$
$\\color{green}+0.00\\%$
$\\color{green}2/2$
$\\color{green}+0.00\\%$
$\\color{green}159/159$
$\\color{green}+0.00\\%$
number/uint16/base/identity $\\color{green}159/159$
$\\color{green}+0.00\\%$
$\\color{green}5/5$
$\\color{green}+0.00\\%$
$\\color{green}2/2$
$\\color{green}+0.00\\%$
$\\color{green}159/159$
$\\color{green}+0.00\\%$
number/uint8/base/identity $\\color{green}159/159$
$\\color{green}+0.00\\%$
$\\color{green}5/5$
$\\color{green}+0.00\\%$
$\\color{green}2/2$
$\\color{green}+0.00\\%$
$\\color{green}159/159$
$\\color{green}+0.00\\%$

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

claude added 2 commits June 29, 2026 13:23
The propagation in ffd5803 touched the JSDoc `@example` block at the
top of this file, which triggers lint of the full file. The file has a
pre-existing `stdlib/no-new-array` violation at line 96 (`new Array( len )`)
unrelated to this propagation. Reverting this site to keep the run
unblocked; the underlying `new Array` issue is left for a separate cleanup.
CI lint of the full file flagged a pre-existing stale eslint-disable
directive at line 95 (uses bare `handle-callback-err` instead of the
plugin-prefixed `n/handle-callback-err` that the current config requires).
The sibling `resolve-parent-path-by/lib/async.js` already uses the
prefixed form; this file was missed during the rule migration. Reverting
this propagation site to keep the run unblocked; the stale directive is
left for a separate cleanup.
@Planeshifter Planeshifter marked this pull request as ready for review June 29, 2026 14:57
@Planeshifter Planeshifter requested review from a team and kgryte June 29, 2026 14:57
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Review A pull request which needs code review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants